1
0
forked from aniani/vim

patch 8.2.0470: Test_confirm_cmd_cancel() can fail on a slow system

Problem:    Test_confirm_cmd_cancel() can fail on a slow system.
Solution:   Use WaitForAssert(). (Ozaki Kiichi, closes #5861)
This commit is contained in:
Bram Moolenaar
2020-03-28 21:48:55 +01:00
parent ee619e5bc0
commit 7b1b36b1cb
2 changed files with 3 additions and 1 deletions

View File

@@ -259,7 +259,7 @@ func Test_confirm_cmd_cancel()
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
\ term_getline(buf, 20))}, 1000) \ term_getline(buf, 20))}, 1000)
call term_sendkeys(buf, "C") call term_sendkeys(buf, "C")
call term_wait(buf, 50) call WaitForAssert({-> assert_equal('', term_getline(buf, 20))}, 1000)
call term_sendkeys(buf, ":confirm close\n") call term_sendkeys(buf, ":confirm close\n")
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$', call WaitForAssert({-> assert_match('^\[Y\]es, (N)o, (C)ancel: *$',
\ term_getline(buf, 20))}, 1000) \ term_getline(buf, 20))}, 1000)

View File

@@ -738,6 +738,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
470,
/**/ /**/
469, 469,
/**/ /**/