From 71394541f3c61cf3a60e252330e39b2e170c7886 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Sun, 7 Jul 2019 00:33:06 -0700 Subject: [PATCH] Fix flaky test_suspend script test Make sure to wait for shell prompt to come up when quitting Vim before sending the "exit" command to shell. This seems to help in certain situations where it appears to have a race condition where `term_wait(buf)` isn't enough to wait for Vim to have fully quitted and returning contorl back to the shell. --- src/testdir/test_suspend.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/src/testdir/test_suspend.vim b/src/testdir/test_suspend.vim index 8b326f51f6..cb91ef1a9e 100644 --- a/src/testdir/test_suspend.vim +++ b/src/testdir/test_suspend.vim @@ -54,6 +54,7 @@ func Test_suspend() " Quit gracefully to dump coverage information. call term_sendkeys(buf, ":qall!\") call term_wait(buf) + call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))}) call StopShellInTerminal(buf) exe buf . 'bwipe!'