aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_timers.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-21 14:07:50 -0700
committerGitHub <noreply@github.com>2019-09-21 14:07:50 -0700
commitfd82ce4a3a9c9833e07db079debf6c9b94a2cfd3 (patch)
tree30520e000a28c2b2099c641ce33826aea0c07541 /src/nvim/testdir/test_timers.vim
parentb3e56957f8e9468497e5db508d97d7b560ccfe85 (diff)
parent111d34849a0670842b56c17c3922dbf0576bb39b (diff)
downloadrneovim-fd82ce4a3a9c9833e07db079debf6c9b94a2cfd3.tar.gz
rneovim-fd82ce4a3a9c9833e07db079debf6c9b94a2cfd3.tar.bz2
rneovim-fd82ce4a3a9c9833e07db079debf6c9b94a2cfd3.zip
Merge #11060 from janlazo/vim-8.1.1783
vim-patch:8.0.{1109,1529,1539,1621,1733,1771,1776},8.1.{1783,2054,2058}
Diffstat (limited to 'src/nvim/testdir/test_timers.vim')
-rw-r--r--src/nvim/testdir/test_timers.vim17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_timers.vim b/src/nvim/testdir/test_timers.vim
index 24c735865c..bd63d94729 100644
--- a/src/nvim/testdir/test_timers.vim
+++ b/src/nvim/testdir/test_timers.vim
@@ -141,7 +141,7 @@ endfunc
func Test_delete_myself()
let g:called = 0
let t = timer_start(10, 'StopMyself', {'repeat': -1})
- call WaitFor('g:called == 2')
+ call WaitForAssert({-> assert_equal(2, g:called)})
call assert_equal(2, g:called)
call assert_equal([], timer_info(t))
endfunc
@@ -208,7 +208,7 @@ func Test_timer_errors()
let g:call_count = 0
let timer = timer_start(10, 'FuncWithError', {'repeat': -1})
" Timer will be stopped after failing 3 out of 3 times.
- call WaitFor('g:call_count == 3')
+ call WaitForAssert({-> assert_equal(3, g:call_count)})
sleep 50m
call assert_equal(3, g:call_count)
endfunc
@@ -226,7 +226,7 @@ func Test_timer_catch_error()
let g:call_count = 0
let timer = timer_start(10, 'FuncWithCaughtError', {'repeat': 4})
" Timer will not be stopped.
- call WaitFor('g:call_count == 4')
+ call WaitForAssert({-> assert_equal(4, g:call_count)})
sleep 50m
call assert_equal(4, g:call_count)
endfunc
@@ -252,4 +252,15 @@ func Test_peek_and_get_char()
call timer_stop(intr)
endfunc
+func Test_ex_mode()
+ " Function with an empty line.
+ func Foo(...)
+
+ endfunc
+ let timer = timer_start(40, function('g:Foo'), {'repeat':-1})
+ " This used to throw error E749.
+ exe "normal Qsleep 100m\rvi\r"
+ call timer_stop(timer)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab