patch 9.0.1449: test for prompt buffer is flaky

Problem:    Test for prompt buffer is flaky.
Solution:   Use WaitForAssert() instead of TermWait(). (Ozaki Kiichi,
            closes #12247)
This commit is contained in:
Bram Moolenaar
2023-04-13 17:32:23 +01:00
parent d76670fc0d
commit ff6c230051
2 changed files with 6 additions and 8 deletions

View File

@ -282,20 +282,16 @@ func Test_prompt_appending_while_hidden()
call TermWait(buf) call TermWait(buf)
call term_sendkeys(buf, "exit\<CR>") call term_sendkeys(buf, "exit\<CR>")
call TermWait(buf) call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
call assert_notmatch('-- INSERT --', term_getline(buf, 10))
call term_sendkeys(buf, ":call DoAppend()\<CR>") call term_sendkeys(buf, ":call DoAppend()\<CR>")
call TermWait(buf) call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
call assert_notmatch('-- INSERT --', term_getline(buf, 10))
call term_sendkeys(buf, "i") call term_sendkeys(buf, "i")
call TermWait(buf) call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
call assert_match('-- INSERT --', term_getline(buf, 10))
call term_sendkeys(buf, "\<C-R>=DoAppend()\<CR>") call term_sendkeys(buf, "\<C-R>=DoAppend()\<CR>")
call TermWait(buf) call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
call assert_match('-- INSERT --', term_getline(buf, 10))
call term_sendkeys(buf, "\<Esc>") call term_sendkeys(buf, "\<Esc>")
call StopVimInTerminal(buf) call StopVimInTerminal(buf)

View File

@ -695,6 +695,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 */
/**/
1449,
/**/ /**/
1448, 1448,
/**/ /**/