diff options
Diffstat (limited to 'src/testdir/test_timers.vim')
-rw-r--r-- | src/testdir/test_timers.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim index 9183e13df2..1b996c523d 100644 --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -137,6 +137,20 @@ func Test_timer_stopall() call assert_equal(0, len(info)) endfunc +def Test_timer_stopall_with_popup() + # Create a popup that times out after ten seconds. + # Another timer will fire in half a second and close it early after stopping + # all timers. + var pop = popup_create('Popup', {time: 10000}) + var tmr = timer_start(500, (_) => { + timer_stopall() + popup_clear() + }) + sleep 1 + assert_equal([], timer_info(tmr)) + assert_equal([], popup_list()) +enddef + func Test_timer_paused() let g:test_is_flaky = 1 let g:val = 0 |