mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
vim-patch:9.0.1449: test for prompt buffer is flaky (#23076)
Problem: Test for prompt buffer is flaky.
Solution: Use WaitForAssert() instead of TermWait(). (Ozaki Kiichi,
closes vim/vim#12247)
ff6c230051
This commit is contained in:
parent
8f69c5ed45
commit
f64f6706e5
@ -283,20 +283,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)
|
||||||
|
Loading…
Reference in New Issue
Block a user