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:
@ -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)
|
||||||
|
|||||||
@ -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,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user