diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-06-05 10:59:40 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-06-29 18:57:18 +0200 |
commit | 5c754a2d2263e455ba3704cd278d52b254d195df (patch) | |
tree | d32ae2a7529e2a99af9f1b9698514b23dc197cd4 /test/functional/eval/timer_spec.lua | |
parent | 2c39e0b03f083bac569901b62f0058559bacfc63 (diff) | |
download | rneovim-5c754a2d2263e455ba3704cd278d52b254d195df.tar.gz rneovim-5c754a2d2263e455ba3704cd278d52b254d195df.tar.bz2 rneovim-5c754a2d2263e455ba3704cd278d52b254d195df.zip |
timers: make repeat=0 work one-shot (consistent with vim)
Diffstat (limited to 'test/functional/eval/timer_spec.lua')
-rw-r--r-- | test/functional/eval/timer_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/eval/timer_spec.lua b/test/functional/eval/timer_spec.lua index 82b965c832..2f83edb9e4 100644 --- a/test/functional/eval/timer_spec.lua +++ b/test/functional/eval/timer_spec.lua @@ -22,6 +22,14 @@ describe('timers', function() eq(1,eval("g:val")) end) + it('works one-shot when repeat=0', function() + execute("call timer_start(50, 'MyHandler', {'repeat': 0})") + eq(0,eval("g:val")) + run(nil, nil, nil, 200) + eq(1,eval("g:val")) + end) + + it('works with repeat two', function() execute("call timer_start(50, 'MyHandler', {'repeat': 2})") eq(0,eval("g:val")) |