changeset 19799:bde8020fb283 v8.2.0456

patch 8.2.0456: Test_confirm_cmd is flaky Commit: https://github.com/vim/vim/commit/72749f062f15c7147f512bc581695c25ad78fb4e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 26 20:51:43 2020 +0100 patch 8.2.0456: Test_confirm_cmd is flaky Problem: Test_confirm_cmd is flaky. Solution: Add a term_wait() call. (closes https://github.com/vim/vim/issues/5854)
author Bram Moolenaar <Bram@vim.org>
date Thu, 26 Mar 2020 21:00:04 +0100
parents ab0a91ba7a13
children 6b2983e725f3
files src/testdir/test_excmd.vim src/version.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_excmd.vim
+++ b/src/testdir/test_excmd.vim
@@ -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
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    456,
+/**/
     455,
 /**/
     454,