forked from aniani/vim
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.
This commit is contained in:
@@ -135,41 +135,41 @@ func Test_cursorline_screenline()
|
||||
call writefile(lines, filename)
|
||||
" basic test
|
||||
let buf = RunVimInTerminal('-S '. filename, #{rows: 20})
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_1', {})
|
||||
call term_sendkeys(buf, "fagj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_2', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_3', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_4', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_5', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_6', {})
|
||||
" test with set list and cursorlineopt containing number
|
||||
call term_sendkeys(buf, "gg0")
|
||||
call term_sendkeys(buf, ":set list cursorlineopt+=number listchars=space:-\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_7', {})
|
||||
call term_sendkeys(buf, "fagj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_8', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_9', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_10', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_11', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
|
||||
if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent")
|
||||
" test with set foldcolumn signcoloumn and breakindent
|
||||
@@ -177,19 +177,19 @@ func Test_cursorline_screenline()
|
||||
call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>")
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
|
||||
call term_sendkeys(buf, "fagj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_14', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_15', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_16', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_17', {})
|
||||
call term_sendkeys(buf, "gj")
|
||||
call term_wait(buf)
|
||||
call TermWait(buf)
|
||||
call VerifyScreenDump(buf, 'Test_'. filename. '_18', {})
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user