patch 9.0.1004: suspend test sometimes fails on MacOS
Problem: Suspend test sometimes fails on MacOS.
Solution: Wait a short while for terminal responses.
diff --git a/src/testdir/test_suspend.vim b/src/testdir/test_suspend.vim
index 327fe06..1c6ebbc 100644
--- a/src/testdir/test_suspend.vim
+++ b/src/testdir/test_suspend.vim
@@ -2,6 +2,7 @@
source check.vim
source term_util.vim
+source shared.vim
func CheckSuspended(buf, fileExists)
call WaitForAssert({-> assert_match('[$#] $', term_getline(a:buf, '.'))})
@@ -21,6 +22,8 @@
CheckFeature terminal
CheckExecutable /bin/sh
+ call WaitForResponses()
+
let buf = term_start('/bin/sh')
" Wait for shell prompt.
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
@@ -65,6 +68,8 @@
CheckFeature terminal
CheckExecutable /bin/sh
+ call WaitForResponses()
+
let buf = term_start('/bin/sh', #{term_rows: 6})
" Wait for shell prompt.
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})