patch 8.2.0533: tests using term_wait() can still be flaky
Problem: Tests using term_wait() can still be flaky.
Solution: Increase the wait time when rerunning a test. (James McCoy,
closes #5899) Halve the initial times to make tests run faster
when there is no rerun.
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index dfc9e24..73b7228 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -542,9 +542,9 @@
\ 'call setline(1, ["","1","2","3",""])',
\ ], 'Xtest_cursorline_yank')
let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8})
- call term_wait(buf)
+ call TermWait(buf)
call term_sendkeys(buf, "Gy3k")
- call term_wait(buf)
+ call TermWait(buf)
call term_sendkeys(buf, "jj")
call VerifyScreenDump(buf, 'Test_cursorline_yank_01', {})
@@ -582,7 +582,7 @@
\ 'call setline(1, repeat(["abc"], 50))',
\ ], 'Xtest_cursorline_with_visualmode')
let buf = RunVimInTerminal('-S Xtest_cursorline_with_visualmode', {'rows': 12})
- call term_wait(buf)
+ call TermWait(buf)
call term_sendkeys(buf, "V\<C-f>kkkjk")
call VerifyScreenDump(buf, 'Test_cursorline_with_visualmode_01', {})
@@ -610,9 +610,9 @@
END
call writefile(lines, 'Xtest_wincolor')
let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
- call term_wait(buf)
+ call TermWait(buf)
call term_sendkeys(buf, "2G5lvj")
- call term_wait(buf)
+ call TermWait(buf)
call VerifyScreenDump(buf, 'Test_wincolor_01', {})
@@ -662,7 +662,7 @@
call writefile(lines, 'Xtest_colorcolumn')
let buf = RunVimInTerminal('-S Xtest_colorcolumn', {'rows': 10})
call term_sendkeys(buf, ":\<CR>")
- call term_wait(buf)
+ call TermWait(buf)
call VerifyScreenDump(buf, 'Test_colorcolumn_1', {})
" clean up