commit f64f6706e58061f0a3de530edd1f10e331cd1525
parent 8f69c5ed450337b9f77c50f9ee0d3eb32f649ca6
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 14 Apr 2023 07:12:42 +0800
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)
https://github.com/vim/vim/commit/ff6c230051ed2a2dbbbd517f51fe00c8ea27961b
Diffstat:
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/test/old/testdir/test_prompt_buffer.vim b/test/old/testdir/test_prompt_buffer.vim
@@ -283,20 +283,16 @@ func Test_prompt_appending_while_hidden()
call TermWait(buf)
call term_sendkeys(buf, "exit\<CR>")
- call TermWait(buf)
- call assert_notmatch('-- INSERT --', term_getline(buf, 10))
+ call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
call term_sendkeys(buf, ":call DoAppend()\<CR>")
- call TermWait(buf)
- call assert_notmatch('-- INSERT --', term_getline(buf, 10))
+ call WaitForAssert({-> assert_notmatch('-- INSERT --', term_getline(buf, 10))})
call term_sendkeys(buf, "i")
- call TermWait(buf)
- call assert_match('-- INSERT --', term_getline(buf, 10))
+ call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
call term_sendkeys(buf, "\<C-R>=DoAppend()\<CR>")
- call TermWait(buf)
- call assert_match('-- INSERT --', term_getline(buf, 10))
+ call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))})
call term_sendkeys(buf, "\<Esc>")
call StopVimInTerminal(buf)