]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1449: test for prompt buffer is flaky v9.0.1449
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Apr 2023 16:32:23 +0000 (17:32 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Apr 2023 16:32:23 +0000 (17:32 +0100)
Problem:    Test for prompt buffer is flaky.
Solution:   Use WaitForAssert() instead of TermWait(). (Ozaki Kiichi,
            closes #12247)

src/testdir/test_prompt_buffer.vim
src/version.c

index b81309c71e731a4ebd45e29e2ab03855b8b55590..d17373160783885f6091357668d291481087211e 100644 (file)
@@ -282,20 +282,16 @@ func Test_prompt_appending_while_hidden()
   call TermWait(buf)
 
   call term_sendkeys(buf, "exit\<CR>")
-  call TermWait(buf)
-  call assert_notmatch('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, ":call DoAppend()\<CR>")
-  call TermWait(buf)
-  call assert_notmatch('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, "i")
-  call TermWait(buf)
-  call assert_match('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, "\<C-R>=DoAppend()\<CR>")
-  call TermWait(buf)
-  call assert_match('-- INSERT --', term_getline(buf, 10))
+  call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
 
   call term_sendkeys(buf, "\<Esc>")
   call StopVimInTerminal(buf)
index ba8b40e15e1c19bf26bf627240047d0d52d9330e..23b39e7b1f2a17a2406714ec63c9f3caff39963a 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1449,
 /**/
     1448,
 /**/