Mercurial > vim
view src/testdir/test_sleep.vim @ 33341:3dd54b0dab14 v9.0.1934
patch 9.0.1934: :bwipe fails after switching window from aucmd_win.
Commit: https://github.com/vim/vim/commit/46bdae036ac4121e305fc3ed4ef3f9fc928dcb25
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Sep 24 23:16:08 2023 +0200
patch 9.0.1934: :bwipe fails after switching window from aucmd_win.
Problem: :bwipe fails after switching window from aucmd_win.
Solution: Decrement b_nwindows after switching back to aucmd_win.
closes: #13160
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Sep 2023 23:30:04 +0200 |
parents | 98774a275d6d |
children |
line wrap: on
line source
" Test for sleep and sleep! commands func! s:get_time_ms() return float2nr(reltimefloat(reltime()) * 1000) endfunc func! s:assert_takes_longer(cmd, time_ms) let start = s:get_time_ms() execute a:cmd let end = s:get_time_ms() call assert_true(end - start >=# a:time_ms) endfun func! Test_sleep_bang() call s:assert_takes_longer('sleep 50m', 50) call s:assert_takes_longer('sleep! 50m', 50) call s:assert_takes_longer('sl 50m', 50) call s:assert_takes_longer('sl! 50m', 50) call s:assert_takes_longer('1sleep', 1000) call s:assert_takes_longer('normal 1gs', 1000) endfunc " vim: shiftwidth=2 sts=2 expandtab