Skip to content

Commit 72749f0

Browse files
committed
patch 8.2.0456: Test_confirm_cmd is flaky
Problem: Test_confirm_cmd is flaky. Solution: Add a term_wait() call. (closes #5854)
1 parent 83d4790 commit 72749f0

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/testdir/test_excmd.vim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ func Test_confirm_cmd()
242242
call assert_equal(['foo4'], readfile('foo'))
243243
call assert_equal(['bar2'], readfile('bar'))
244244

245+
call delete('foo')
246+
call delete('bar')
247+
endfunc
248+
249+
func Test_confirm_cmd_cancel()
245250
" Test for closing a window with a modified buffer
246251
let buf = RunVimInTerminal('', {'rows': 20})
247252
call term_sendkeys(buf, ":set nomore\n")
@@ -251,14 +256,12 @@ func Test_confirm_cmd()
251256
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
252257
\ term_getline(buf, 20))}, 1000)
253258
call term_sendkeys(buf, "C")
259+
call term_wait(buf, 50)
254260
call term_sendkeys(buf, ":confirm close\n")
255261
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
256262
\ term_getline(buf, 20))}, 1000)
257263
call term_sendkeys(buf, "N")
258264
call StopVimInTerminal(buf)
259-
260-
call delete('foo')
261-
call delete('bar')
262265
endfunc
263266

264267
" Test for the :print command

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
456,
741743
/**/
742744
455,
743745
/**/

0 commit comments

Comments
 (0)