]> granicus.if.org Git - vim/commitdiff
patch 8.2.0456: Test_confirm_cmd is flaky v8.2.0456
authorBram Moolenaar <Bram@vim.org>
Thu, 26 Mar 2020 19:51:43 +0000 (20:51 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 26 Mar 2020 19:51:43 +0000 (20:51 +0100)
Problem:    Test_confirm_cmd is flaky.
Solution:   Add a term_wait() call. (closes #5854)

src/testdir/test_excmd.vim
src/version.c

index 27fdd8835b53bba829e136b6d72e66b7865488d2..755099c4e66c3851d26922af18550dd363a52a59 100644 (file)
@@ -242,6 +242,11 @@ func Test_confirm_cmd()
   call assert_equal(['foo4'], readfile('foo'))
   call assert_equal(['bar2'], readfile('bar'))
 
+  call delete('foo')
+  call delete('bar')
+endfunc
+
+func Test_confirm_cmd_cancel()
   " Test for closing a window with a modified buffer
   let buf = RunVimInTerminal('', {'rows': 20})
   call term_sendkeys(buf, ":set nomore\n")
@@ -251,14 +256,12 @@ func Test_confirm_cmd()
   call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
         \ term_getline(buf, 20))}, 1000)
   call term_sendkeys(buf, "C")
+  call term_wait(buf, 50)
   call term_sendkeys(buf, ":confirm close\n")
   call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
         \ term_getline(buf, 20))}, 1000)
   call term_sendkeys(buf, "N")
   call StopVimInTerminal(buf)
-
-  call delete('foo')
-  call delete('bar')
 endfunc
 
 " Test for the :print command
index 51e9e37062435ccf5fa1d0694b6430f0e2056307..2d29430b59c525ae9e7dadaa4d10fb5a45b46154 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    456,
 /**/
     455,
 /**/