From f64f6706e58061f0a3de530edd1f10e331cd1525 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 14 Apr 2023 07:12:42 +0800 Subject: [PATCH] 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 --- test/old/testdir/test_prompt_buffer.vim | 12 ++++-------- 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 index 2cc3f19b59..3dfbbcece6 100644 --- 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\") - 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()\") - 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, "\=DoAppend()\") - call TermWait(buf) - call assert_match('-- INSERT --', term_getline(buf, 10)) + call WaitForAssert({-> assert_match('-- INSERT --', term_getline(buf, 10))}) call term_sendkeys(buf, "\") call StopVimInTerminal(buf)