]> granicus.if.org Git - vim/commitdiff
patch 8.2.4577: message test is flaky v8.2.4577
authorBram Moolenaar <Bram@vim.org>
Wed, 16 Mar 2022 11:14:57 +0000 (11:14 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 16 Mar 2022 11:14:57 +0000 (11:14 +0000)
Problem:    Message test is flaky. (Elimar Riesebieter)
Solution:   Trigger the autocommand event only after startup is finished.

src/testdir/test_messages.vim
src/version.c

index d3c80bf6c3e684d737cc539081069608018b4026..32689b09eaf2d09aba8590e31d587450cf9602a8 100644 (file)
@@ -360,12 +360,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>")
index c447509c871b9611245349774926a234989cf0f8..ba0058b679b2ea3bcba3c955792db897142b87cf 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4577,
 /**/
     4576,
 /**/