mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
vim-patch:8.2.4577: message test is flaky
Problem: Message test is flaky. (Elimar Riesebieter)
Solution: Trigger the autocommand event only after startup is finished.
9323ca51c2
This commit is contained in:
@@ -151,12 +151,13 @@ func Test_fileinfo_after_echo()
|
|||||||
|
|
||||||
hide buffer a.txt
|
hide buffer a.txt
|
||||||
|
|
||||||
set updatetime=1
|
autocmd CursorHold * buf b.txt | w | echo "'b' written"
|
||||||
autocmd CursorHold * b b.txt | w | echo "'b' written"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
call writefile(content, 'Xtest_fileinfo_after_echo')
|
call writefile(content, 'Xtest_fileinfo_after_echo')
|
||||||
let buf = RunVimInTerminal('-S Xtest_fileinfo_after_echo', #{rows: 6})
|
let buf = RunVimInTerminal('-S Xtest_fileinfo_after_echo', #{rows: 6})
|
||||||
|
call term_sendkeys(buf, ":set updatetime=50\<CR>")
|
||||||
|
call term_sendkeys(buf, "0$")
|
||||||
call VerifyScreenDump(buf, 'Test_fileinfo_after_echo', {})
|
call VerifyScreenDump(buf, 'Test_fileinfo_after_echo', {})
|
||||||
|
|
||||||
call term_sendkeys(buf, ":q\<CR>")
|
call term_sendkeys(buf, ":q\<CR>")
|
||||||
|
@@ -54,9 +54,10 @@ describe('messages', function()
|
|||||||
|
|
||||||
hide buffer a.txt
|
hide buffer a.txt
|
||||||
|
|
||||||
set updatetime=1
|
autocmd CursorHold * buf b.txt | w | echo "'b' written"
|
||||||
autocmd CursorHold * b b.txt | w | echo "'b' written"
|
|
||||||
]])
|
]])
|
||||||
|
command('set updatetime=50')
|
||||||
|
feed('0$')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^hi |
|
^hi |
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
|
Reference in New Issue
Block a user