mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.3772: timer info test fails on slow machine
Problem: Timer info test fails on slow machine.
Solution: Use WaitForAssert().
ff39a650b2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
cc6845db94
commit
1dd9cd2965
@ -98,8 +98,7 @@ func Test_timer_info()
|
|||||||
" check repeat count inside the callback
|
" check repeat count inside the callback
|
||||||
let g:timer_repeat = []
|
let g:timer_repeat = []
|
||||||
let tid = timer_start(10, {tid -> execute("call add(g:timer_repeat, timer_info(tid)[0].repeat)")}, #{repeat: 3})
|
let tid = timer_start(10, {tid -> execute("call add(g:timer_repeat, timer_info(tid)[0].repeat)")}, #{repeat: 3})
|
||||||
sleep 100m
|
call WaitForAssert({-> assert_equal([2, 1, 0], g:timer_repeat)})
|
||||||
call assert_equal([2, 1, 0], g:timer_repeat)
|
|
||||||
unlet g:timer_repeat
|
unlet g:timer_repeat
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user