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:
zeertzjq
2022-03-30 21:59:55 +08:00
parent 5a3a1304e1
commit 86f81c471a
2 changed files with 6 additions and 4 deletions

View File

@@ -151,12 +151,13 @@ func Test_fileinfo_after_echo()
hide buffer a.txt
set updatetime=1
autocmd CursorHold * b b.txt | w | echo "'b' written"
autocmd CursorHold * buf b.txt | w | echo "'b' written"
END
call writefile(content, 'Xtest_fileinfo_after_echo')
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 term_sendkeys(buf, ":q\<CR>")

View File

@@ -54,9 +54,10 @@ describe('messages', function()
hide buffer a.txt
set updatetime=1
autocmd CursorHold * b b.txt | w | echo "'b' written"
autocmd CursorHold * buf b.txt | w | echo "'b' written"
]])
command('set updatetime=50')
feed('0$')
screen:expect([[
^hi |
{1:~ }|