Skip to content

Commit 7139454

Browse files
committed
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.
1 parent 2760686 commit 7139454

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/testdir/test_suspend.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func Test_suspend()
5454
" Quit gracefully to dump coverage information.
5555
call term_sendkeys(buf, ":qall!\<CR>")
5656
call term_wait(buf)
57+
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
5758
call StopShellInTerminal(buf)
5859

5960
exe buf . 'bwipe!'

0 commit comments

Comments
 (0)