Patch 8.2.0533
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.
Files: src/testdir/term_util.vim, src/testdir/test_arglist.vim,
src/testdir/test_autocmd.vim, src/testdir/test_balloon.vim,
src/testdir/test_bufline.vim, src/testdir/test_channel.vim,
src/testdir/test_cmdline.vim, src/testdir/test_conceal.vim,
src/testdir/test_cursorline.vim, src/testdir/test_debugger.vim,
src/testdir/test_diffmode.vim, src/testdir/test_display.vim,
src/testdir/test_functions.vim, src/testdir/test_highlight.vim,
src/testdir/test_ins_complete.vim, src/testdir/test_mapping.vim,
src/testdir/test_match.vim, src/testdir/test_matchadd_conceal.vim,
src/testdir/test_messages.vim, src/testdir/test_number.vim,
src/testdir/test_popup.vim, src/testdir/test_popupwin.vim,
src/testdir/test_profile.vim, src/testdir/test_search.vim,
src/testdir/test_search_stat.vim, src/testdir/test_startup.vim,
src/testdir/test_startup_utf8.vim,
src/testdir/test_statusline.vim, src/testdir/test_suspend.vim,
src/testdir/test_swap.vim, src/testdir/test_tagjump.vim,
src/testdir/test_terminal.vim, src/testdir/test_terminal_fail.vim,
src/testdir/test_timers.vim, src/testdir/test_vimscript.vim
*** ../vim-8.2.0532/src/testdir/term_util.vim 2020-04-04 14:00:34.193098268
+0200
--- src/testdir/term_util.vim 2020-04-08 21:38:56.198924496 +0200
***************
*** 24,29 ****
--- 24,44 ----
call WaitFor({-> job_status(job) == "dead"})
endfunc
+ " Wrapper around term_wait() to allow more time for re-runs of flaky tests
+ " The second argument is the minimum time to wait in msec, 10 if omitted.
+ func TermWait(buf, ...)
+ let wait_time = a:0 ? a:1 : 10
+ if g:run_nr == 2
+ let wait_time *= 4
+ elseif g:run_nr > 2
+ let wait_time *= 10
+ endif
+ call term_wait(a:buf, wait_time)
+
+ " In case it wasn't set yet.
+ let g:test_is_flaky = 1
+ endfunc
+
" Run Vim with "arguments" in a new terminal window.
" By default uses a size of 20 lines and 75 columns.
" Returns the buffer number of the terminal.
***************
*** 82,88 ****
let cols = term_getsize(buf)[1]
endif
! call term_wait(buf)
" Wait for "All" or "Top" of the ruler to be shown in the last line or in
" the status line of the last window. This can be quite slow (e.g. when
--- 97,103 ----
let cols = term_getsize(buf)[1]
endif
! call TermWait(buf)
" Wait for "All" or "Top" of the ruler to be shown in the last line or in
" the status line of the last window. This can be quite slow (e.g. when
*** ../vim-8.2.0532/src/testdir/test_arglist.vim 2020-03-10
07:48:06.571619551 +0100
--- src/testdir/test_arglist.vim 2020-04-08 21:15:44.459526316 +0200
***************
*** 518,524 ****
call term_sendkeys(buf, ":set nomore\n")
call term_sendkeys(buf, ":args a b c\n")
call term_sendkeys(buf, ":quit\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^E173:', term_getline(buf, 6))})
call StopVimInTerminal(buf)
--- 518,524 ----
call term_sendkeys(buf, ":set nomore\n")
call term_sendkeys(buf, ":args a b c\n")
call term_sendkeys(buf, ":quit\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^E173:', term_getline(buf, 6))})
call StopVimInTerminal(buf)
***************
*** 527,542 ****
call term_sendkeys(buf, ":set nomore\n")
call term_sendkeys(buf, ":args a b c\n")
call term_sendkeys(buf, ":confirm quit\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$',
\ term_getline(buf, 6))})
call term_sendkeys(buf, "N")
! call term_wait(buf)
call term_sendkeys(buf, ":confirm quit\n")
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$',
\ term_getline(buf, 6))})
call term_sendkeys(buf, "Y")
! call term_wait(buf)
call WaitForAssert({-> assert_equal("finished", term_getstatus(buf))})
only!
" When this test fails, swap files are left behind which breaks subsequent
--- 527,542 ----
call term_sendkeys(buf, ":set nomore\n")
call term_sendkeys(buf, ":args a b c\n")
call term_sendkeys(buf, ":confirm quit\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$',
\ term_getline(buf, 6))})
call term_sendkeys(buf, "N")
! call TermWait(buf)
call term_sendkeys(buf, ":confirm quit\n")
call WaitForAssert({-> assert_match('^\[Y\]es, (N)o: *$',
\ term_getline(buf, 6))})
call term_sendkeys(buf, "Y")
! call TermWait(buf)
call WaitForAssert({-> assert_equal("finished", term_getstatus(buf))})
only!
" When this test fails, swap files are left behind which breaks subsequent
*** ../vim-8.2.0532/src/testdir/test_autocmd.vim 2020-04-06
21:35:02.460237781 +0200
--- src/testdir/test_autocmd.vim 2020-04-08 21:43:03.154115083 +0200
***************
*** 1761,1769 ****
augroup END
let s:li = []
let s:dir_this = getcwd()
! let s:dir_foo = s:dir_this . '/foo'
call mkdir(s:dir_foo)
! let s:dir_bar = s:dir_this . '/bar'
call mkdir(s:dir_bar)
endfunc
--- 1761,1769 ----
augroup END
let s:li = []
let s:dir_this = getcwd()
! let s:dir_foo = s:dir_this . '/Xfoo'
call mkdir(s:dir_foo)
! let s:dir_bar = s:dir_this . '/Xbar'
call mkdir(s:dir_bar)
endfunc
***************
*** 2291,2299 ****
call WaitForAssert({-> assert_match('^xxx', term_getline(buf, 6))}, 1000)
call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>")
! call term_wait(buf, 100)
call term_sendkeys(buf, ":\<CR>")
! call term_wait(buf, 100)
call term_sendkeys(buf, ":echo g:again\<CR>")
call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000)
--- 2291,2299 ----
call WaitForAssert({-> assert_match('^xxx', term_getline(buf, 6))}, 1000)
call term_sendkeys(buf, ":let g:again = ''\<CR>:call CallTimer()\<CR>")
! call TermWait(buf, 50)
call term_sendkeys(buf, ":\<CR>")
! call TermWait(buf, 50)
call term_sendkeys(buf, ":echo g:again\<CR>")
call WaitForAssert({-> assert_match('xtx', term_getline(buf, 6))}, 1000)
***************
*** 2317,2323 ****
let buf = RunVimInTerminal('-S '.filename, #{rows: 6})
call term_sendkeys(buf, "q:")
! call term_wait(buf)
call term_sendkeys(buf, ":echo b:dummy_var\<cr>")
call WaitForAssert({-> assert_match('^This is a dummy', term_getline(buf,
6))}, 2000)
call term_sendkeys(buf, ":echo &buftype\<cr>")
--- 2317,2323 ----
let buf = RunVimInTerminal('-S '.filename, #{rows: 6})
call term_sendkeys(buf, "q:")
! call TermWait(buf)
call term_sendkeys(buf, ":echo b:dummy_var\<cr>")
call WaitForAssert({-> assert_match('^This is a dummy', term_getline(buf,
6))}, 2000)
call term_sendkeys(buf, ":echo &buftype\<cr>")
*** ../vim-8.2.0532/src/testdir/test_balloon.vim 2019-11-09
16:37:07.000000000 +0100
--- src/testdir/test_balloon.vim 2020-04-08 21:23:30.789653889 +0200
***************
*** 32,45 ****
" Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
! call term_wait(buf, 100)
call term_sendkeys(buf, 'll')
call term_sendkeys(buf, ":call Trigger()\<CR>")
call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
" Make sure the balloon still shows after 'updatetime' passed and CursorHold
" was triggered.
! call term_wait(buf, 300)
call VerifyScreenDump(buf, 'Test_balloon_eval_term_01a', {})
" clean up
--- 32,45 ----
" Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
! call TermWait(buf, 50)
call term_sendkeys(buf, 'll')
call term_sendkeys(buf, ":call Trigger()\<CR>")
call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
" Make sure the balloon still shows after 'updatetime' passed and CursorHold
" was triggered.
! call TermWait(buf, 150)
call VerifyScreenDump(buf, 'Test_balloon_eval_term_01a', {})
" clean up
***************
*** 57,63 ****
" Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols':
50})
! call term_wait(buf, 100)
call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {})
" clean up
--- 57,63 ----
" Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols':
50})
! call TermWait(buf, 50)
call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {})
" clean up
*** ../vim-8.2.0532/src/testdir/test_bufline.vim 2019-09-09
21:11:05.000000000 +0200
--- src/testdir/test_bufline.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 164,170 ****
END
call writefile(lines, 'XscriptMatchCommon')
let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 10})
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_appendbufline_1', {})
call StopVimInTerminal(buf)
--- 164,170 ----
END
call writefile(lines, 'XscriptMatchCommon')
let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 10})
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_appendbufline_1', {})
call StopVimInTerminal(buf)
*** ../vim-8.2.0532/src/testdir/test_channel.vim 2020-03-30
19:30:07.129542925 +0200
--- src/testdir/test_channel.vim 2020-04-08 21:23:36.737630215 +0200
***************
*** 1062,1068 ****
END
call writefile(lines, 'XtestBufferScroll')
let buf = RunVimInTerminal('-S XtestBufferScroll', #{rows: 10})
! call term_wait(buf, 100)
call VerifyScreenDump(buf, 'Test_job_buffer_scroll_1', {})
" clean up
--- 1062,1068 ----
END
call writefile(lines, 'XtestBufferScroll')
let buf = RunVimInTerminal('-S XtestBufferScroll', #{rows: 10})
! call TermWait(buf, 50)
call VerifyScreenDump(buf, 'Test_job_buffer_scroll_1', {})
" clean up
*** ../vim-8.2.0532/src/testdir/test_cmdline.vim 2020-03-30
19:30:07.129542925 +0200
--- src/testdir/test_cmdline.vim 2020-04-08 21:23:59.433539918 +0200
***************
*** 947,953 ****
call writefile(lines, 'XTest_verbose')
let buf = RunVimInTerminal('-S XTest_verbose', {'rows': 12})
! call term_wait(buf, 100)
call term_sendkeys(buf, ":DoSomething\<CR>")
call VerifyScreenDump(buf, 'Test_verbose_option_1', {})
--- 947,953 ----
call writefile(lines, 'XTest_verbose')
let buf = RunVimInTerminal('-S XTest_verbose', {'rows': 12})
! call TermWait(buf, 50)
call term_sendkeys(buf, ":DoSomething\<CR>")
call VerifyScreenDump(buf, 'Test_verbose_option_1', {})
***************
*** 1024,1030 ****
call writefile(lines, 'XTest_restore')
let buf = RunVimInTerminal('-S XTest_restore', {'rows': 12})
! call term_wait(buf, 100)
call term_sendkeys(buf, "q:")
call VerifyScreenDump(buf, 'Test_cmdwin_restore_1', {})
--- 1024,1030 ----
call writefile(lines, 'XTest_restore')
let buf = RunVimInTerminal('-S XTest_restore', {'rows': 12})
! call TermWait(buf, 50)
call term_sendkeys(buf, "q:")
call VerifyScreenDump(buf, 'Test_cmdwin_restore_1', {})
***************
*** 1146,1152 ****
call writefile(lines, 'XtestCmdlineClearTabenter')
let buf = RunVimInTerminal('-S XtestCmdlineClearTabenter', #{rows: 10})
! call term_wait(buf, 50)
" in one tab make the command line higher with CTRL-W -
call term_sendkeys(buf, ":tabnew\<cr>\<C-w>-\<C-w>-gtgt")
call VerifyScreenDump(buf, 'Test_cmdlineclear_tabenter', {})
--- 1146,1152 ----
call writefile(lines, 'XtestCmdlineClearTabenter')
let buf = RunVimInTerminal('-S XtestCmdlineClearTabenter', #{rows: 10})
! call TermWait(buf, 25)
" in one tab make the command line higher with CTRL-W -
call term_sendkeys(buf, ":tabnew\<cr>\<C-w>-\<C-w>-gtgt")
call VerifyScreenDump(buf, 'Test_cmdlineclear_tabenter', {})
*** ../vim-8.2.0532/src/testdir/test_conceal.vim 2019-12-11
20:07:24.000000000 +0100
--- src/testdir/test_conceal.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 147,153 ****
call VerifyScreenDump(buf, 'Test_conceal_resize_01', {})
call win_execute(buf->win_findbuf()[0], 'wincmd +')
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_conceal_resize_02', {})
" clean up
--- 147,153 ----
call VerifyScreenDump(buf, 'Test_conceal_resize_01', {})
call win_execute(buf->win_findbuf()[0], 'wincmd +')
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_conceal_resize_02', {})
" clean up
*** ../vim-8.2.0532/src/testdir/test_cursorline.vim 2019-10-05
21:53:12.000000000 +0200
--- src/testdir/test_cursorline.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 135,175 ****
call writefile(lines, filename)
" basic test
let buf = RunVimInTerminal('-S '. filename, #{rows: 20})
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_1', {})
call term_sendkeys(buf, "fagj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_2', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_3', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_4', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_5', {})
call term_sendkeys(buf, "gj")
! call term_wait(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 VerifyScreenDump(buf, 'Test_'. filename. '_8', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_9', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_10', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_11', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent")
" test with set foldcolumn signcoloumn and breakindent
--- 135,175 ----
call writefile(lines, filename)
" basic test
let buf = RunVimInTerminal('-S '. filename, #{rows: 20})
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_1', {})
call term_sendkeys(buf, "fagj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_2', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_3', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_4', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_5', {})
call term_sendkeys(buf, "gj")
! 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 TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_8', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_9', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_10', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_11', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent")
" test with set foldcolumn signcoloumn and breakindent
***************
*** 177,195 ****
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 VerifyScreenDump(buf, 'Test_'. filename. '_14', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_15', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_16', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_17', {})
call term_sendkeys(buf, "gj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_18', {})
endif
--- 177,195 ----
call term_sendkeys(buf, ":set breakindent foldcolumn=2
signcolumn=yes\<cr>")
call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
call term_sendkeys(buf, "fagj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_14', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_15', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_16', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_17', {})
call term_sendkeys(buf, "gj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_'. filename. '_18', {})
endif
*** ../vim-8.2.0532/src/testdir/test_debugger.vim 2020-03-15
14:19:19.394376259 +0100
--- src/testdir/test_debugger.vim 2020-04-08 21:24:09.857498455 +0200
***************
*** 8,14 ****
" If the expected output argument is supplied, then check for it.
func RunDbgCmd(buf, cmd, ...)
call term_sendkeys(a:buf, a:cmd . "\r")
! call term_wait(a:buf, 20)
if a:0 != 0
" Verify the expected output
--- 8,14 ----
" If the expected output argument is supplied, then check for it.
func RunDbgCmd(buf, cmd, ...)
call term_sendkeys(a:buf, a:cmd . "\r")
! call TermWait(a:buf)
if a:0 != 0
" Verify the expected output
*** ../vim-8.2.0532/src/testdir/test_diffmode.vim 2020-03-18
19:32:22.510363327 +0100
--- src/testdir/test_diffmode.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 801,807 ****
call term_sendkeys(a:buf, ":diffupdate!\<CR>")
" trailing : for leaving the cursor on the command line
call term_sendkeys(a:buf, ":set diffopt=internal,filler" . a:extra .
"\<CR>:")
! call term_wait(a:buf)
call VerifyScreenDump(a:buf, a:dumpfile, {})
endfunc
--- 801,807 ----
call term_sendkeys(a:buf, ":diffupdate!\<CR>")
" trailing : for leaving the cursor on the command line
call term_sendkeys(a:buf, ":set diffopt=internal,filler" . a:extra .
"\<CR>:")
! call TermWait(a:buf)
call VerifyScreenDump(a:buf, a:dumpfile, {})
endfunc
*** ../vim-8.2.0532/src/testdir/test_display.vim 2020-03-23
20:54:28.220520961 +0100
--- src/testdir/test_display.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 174,180 ****
call writefile(lines, filename)
let buf = RunVimInTerminal('-S '.filename, #{rows: 5, cols: 50})
call term_sendkeys(buf, "k")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_winline_rnu', {})
" clean up
--- 174,180 ----
call writefile(lines, filename)
let buf = RunVimInTerminal('-S '.filename, #{rows: 5, cols: 50})
call term_sendkeys(buf, "k")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_winline_rnu', {})
" clean up
*** ../vim-8.2.0532/src/testdir/test_functions.vim 2020-04-08
20:03:48.184622981 +0200
--- src/testdir/test_functions.vim 2020-04-08 21:24:34.593400114 +0200
***************
*** 1858,1872 ****
func Test_state()
CheckRunVimInTerminal
- " In the first run try a short wait time. If the test fails retry with a
- " longer wait time.
- if g:run_nr == 1
- let wait_time = 50
- elseif g:run_nr == 2
- let wait_time = 200
- else
- let wait_time = 500
- endif
let getstate = ":echo 'state: ' .. g:state .. '; mode: ' .. g:mode\<CR>"
let lines =<< trim END
--- 1858,1863 ----
***************
*** 1888,1914 ****
" Using a timer callback
call term_sendkeys(buf, ":call RunTimer()\<CR>")
! call term_wait(buf, wait_time)
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: c; mode: n', term_getline(buf,
6))}, 1000)
" Halfway a mapping
call term_sendkeys(buf, ":call RunTimer()\<CR>;")
! call term_wait(buf, wait_time)
call term_sendkeys(buf, ";")
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: mSc; mode: n',
term_getline(buf, 6))}, 1000)
" Insert mode completion (bit slower on Mac)
call term_sendkeys(buf, ":call RunTimer()\<CR>Got\<C-N>")
! call term_wait(buf, wait_time)
call term_sendkeys(buf, "\<Esc>")
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: aSc; mode: i',
term_getline(buf, 6))}, 1000)
" Autocommand executing
call term_sendkeys(buf, ":set filetype=foobar\<CR>")
! call term_wait(buf, wait_time)
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: xS; mode: n', term_getline(buf,
6))}, 1000)
--- 1879,1905 ----
" Using a timer callback
call term_sendkeys(buf, ":call RunTimer()\<CR>")
! call TermWait(buf, 25)
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: c; mode: n', term_getline(buf,
6))}, 1000)
" Halfway a mapping
call term_sendkeys(buf, ":call RunTimer()\<CR>;")
! call TermWait(buf, 25)
call term_sendkeys(buf, ";")
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: mSc; mode: n',
term_getline(buf, 6))}, 1000)
" Insert mode completion (bit slower on Mac)
call term_sendkeys(buf, ":call RunTimer()\<CR>Got\<C-N>")
! call TermWait(buf, 25)
call term_sendkeys(buf, "\<Esc>")
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: aSc; mode: i',
term_getline(buf, 6))}, 1000)
" Autocommand executing
call term_sendkeys(buf, ":set filetype=foobar\<CR>")
! call TermWait(buf, 25)
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: xS; mode: n', term_getline(buf,
6))}, 1000)
***************
*** 1916,1922 ****
" messages scrolled
call term_sendkeys(buf, ":call RunTimer()\<CR>:echo
\"one\\ntwo\\nthree\"\<CR>")
! call term_wait(buf, wait_time)
call term_sendkeys(buf, "\<CR>")
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: Scs; mode: r',
term_getline(buf, 6))}, 1000)
--- 1907,1913 ----
" messages scrolled
call term_sendkeys(buf, ":call RunTimer()\<CR>:echo
\"one\\ntwo\\nthree\"\<CR>")
! call TermWait(buf, 25)
call term_sendkeys(buf, "\<CR>")
call term_sendkeys(buf, getstate)
call WaitForAssert({-> assert_match('state: Scs; mode: r',
term_getline(buf, 6))}, 1000)
*** ../vim-8.2.0532/src/testdir/test_highlight.vim 2020-04-06
21:35:02.464237765 +0200
--- src/testdir/test_highlight.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 542,550 ****
\ 'call setline(1, ["","1","2","3",""])',
\ ], 'Xtest_cursorline_yank')
let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8})
! call term_wait(buf)
call term_sendkeys(buf, "Gy3k")
! call term_wait(buf)
call term_sendkeys(buf, "jj")
call VerifyScreenDump(buf, 'Test_cursorline_yank_01', {})
--- 542,550 ----
\ 'call setline(1, ["","1","2","3",""])',
\ ], 'Xtest_cursorline_yank')
let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8})
! call TermWait(buf)
call term_sendkeys(buf, "Gy3k")
! call TermWait(buf)
call term_sendkeys(buf, "jj")
call VerifyScreenDump(buf, 'Test_cursorline_yank_01', {})
***************
*** 582,588 ****
\ '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 term_sendkeys(buf, "V\<C-f>kkkjk")
call VerifyScreenDump(buf, 'Test_cursorline_with_visualmode_01', {})
--- 582,588 ----
\ 'call setline(1, repeat(["abc"], 50))',
\ ], 'Xtest_cursorline_with_visualmode')
let buf = RunVimInTerminal('-S Xtest_cursorline_with_visualmode', {'rows':
12})
! call TermWait(buf)
call term_sendkeys(buf, "V\<C-f>kkkjk")
call VerifyScreenDump(buf, 'Test_cursorline_with_visualmode_01', {})
***************
*** 610,618 ****
END
call writefile(lines, 'Xtest_wincolor')
let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
! call term_wait(buf)
call term_sendkeys(buf, "2G5lvj")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_wincolor_01', {})
--- 610,618 ----
END
call writefile(lines, 'Xtest_wincolor')
let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
! call TermWait(buf)
call term_sendkeys(buf, "2G5lvj")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_wincolor_01', {})
***************
*** 662,668 ****
call writefile(lines, 'Xtest_colorcolumn')
let buf = RunVimInTerminal('-S Xtest_colorcolumn', {'rows': 10})
call term_sendkeys(buf, ":\<CR>")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_colorcolumn_1', {})
" clean up
--- 662,668 ----
call writefile(lines, 'Xtest_colorcolumn')
let buf = RunVimInTerminal('-S Xtest_colorcolumn', {'rows': 10})
call term_sendkeys(buf, ":\<CR>")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_colorcolumn_1', {})
" clean up
*** ../vim-8.2.0532/src/testdir/test_ins_complete.vim 2020-04-06
21:35:02.464237765 +0200
--- src/testdir/test_ins_complete.vim 2020-04-08 21:24:46.849351416 +0200
***************
*** 402,408 ****
call writefile(lines, 'Xpumscript')
let buf = RunVimInTerminal('-S Xpumscript', #{rows: 10})
! call term_wait(buf, 100)
call term_sendkeys(buf, "a\<C-N>")
call VerifyScreenDump(buf, 'Test_pum_with_folds_two_tabs', {})
--- 402,408 ----
call writefile(lines, 'Xpumscript')
let buf = RunVimInTerminal('-S Xpumscript', #{rows: 10})
! call TermWait(buf, 50)
call term_sendkeys(buf, "a\<C-N>")
call VerifyScreenDump(buf, 'Test_pum_with_folds_two_tabs', {})
***************
*** 427,435 ****
call writefile(lines, 'Xpreviewscript')
let buf = RunVimInTerminal('-S Xpreviewscript', #{rows: 12})
! call term_wait(buf, 100)
call term_sendkeys(buf, "Gi\<C-X>\<C-O>")
! call term_wait(buf, 200)
call term_sendkeys(buf, "\<C-N>")
call VerifyScreenDump(buf, 'Test_pum_with_preview_win', {})
--- 427,435 ----
call writefile(lines, 'Xpreviewscript')
let buf = RunVimInTerminal('-S Xpreviewscript', #{rows: 12})
! call TermWait(buf, 50)
call term_sendkeys(buf, "Gi\<C-X>\<C-O>")
! call TermWait(buf, 100)
call term_sendkeys(buf, "\<C-N>")
call VerifyScreenDump(buf, 'Test_pum_with_preview_win', {})
*** ../vim-8.2.0532/src/testdir/test_mapping.vim 2020-02-16
13:33:52.047371845 +0100
--- src/testdir/test_mapping.vim 2020-04-08 21:24:55.345317660 +0200
***************
*** 430,438 ****
" GC must not run during map-expr processing, which can make Vim crash.
call term_sendkeys(buf, '!')
! call term_wait(buf, 100)
call term_sendkeys(buf, "\<CR>")
! call term_wait(buf, 100)
call assert_equal('run', job_status(job))
call term_sendkeys(buf, ":qall!\<CR>")
--- 430,438 ----
" GC must not run during map-expr processing, which can make Vim crash.
call term_sendkeys(buf, '!')
! call TermWait(buf, 50)
call term_sendkeys(buf, "\<CR>")
! call TermWait(buf, 50)
call assert_equal('run', job_status(job))
call term_sendkeys(buf, ":qall!\<CR>")
***************
*** 510,516 ****
END
call writefile(lines, 'XtestExprMap')
let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
! call term_wait(buf)
call term_sendkeys(buf, "\<C-B>")
call VerifyScreenDump(buf, 'Test_map_expr_1', {})
--- 510,516 ----
END
call writefile(lines, 'XtestExprMap')
let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
! call TermWait(buf)
call term_sendkeys(buf, "\<C-B>")
call VerifyScreenDump(buf, 'Test_map_expr_1', {})
*** ../vim-8.2.0532/src/testdir/test_match.vim 2019-12-24 15:16:57.358064208
+0100
--- src/testdir/test_match.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 289,295 ****
END
call writefile(lines, 'XscriptMatchCommon')
let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 12})
! call term_wait(buf)
return buf
endfunc
--- 289,295 ----
END
call writefile(lines, 'XscriptMatchCommon')
let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 12})
! call TermWait(buf)
return buf
endfunc
*** ../vim-8.2.0532/src/testdir/test_matchadd_conceal.vim 2019-12-07
17:21:22.000000000 +0100
--- src/testdir/test_matchadd_conceal.vim 2020-04-08 21:25:05.845275952
+0200
***************
*** 298,311 ****
END
call writefile(lines, 'Xcolesearch')
let buf = RunVimInTerminal('Xcolesearch', {})
! call term_wait(buf, 100)
" Jump to something that is beyond the bottom of the window,
" so there's a scroll down.
call term_sendkeys(buf, ":so %\<CR>")
! call term_wait(buf, 100)
call term_sendkeys(buf, "/expr\<CR>")
! call term_wait(buf, 100)
" Are the concealed parts of the current line really hidden?
let cursor_row = term_scrape(buf, '.')->map({_, e -> e.chars})->join('')
--- 298,311 ----
END
call writefile(lines, 'Xcolesearch')
let buf = RunVimInTerminal('Xcolesearch', {})
! call TermWait(buf, 50)
" Jump to something that is beyond the bottom of the window,
" so there's a scroll down.
call term_sendkeys(buf, ":so %\<CR>")
! call TermWait(buf, 50)
call term_sendkeys(buf, "/expr\<CR>")
! call TermWait(buf, 50)
" Are the concealed parts of the current line really hidden?
let cursor_row = term_scrape(buf, '.')->map({_, e -> e.chars})->join('')
***************
*** 335,341 ****
" Horizontal scroll would center the cursor in the screen line, but conceal
" makes it go to screen column 1.
call term_sendkeys(buf, "$")
! call term_wait(buf)
" Are the concealed parts of the current line really hidden?
call WaitForAssert({-> assert_equal('c', term_getline(buf, '.'))})
--- 335,341 ----
" Horizontal scroll would center the cursor in the screen line, but conceal
" makes it go to screen column 1.
call term_sendkeys(buf, "$")
! call TermWait(buf)
" Are the concealed parts of the current line really hidden?
call WaitForAssert({-> assert_equal('c', term_getline(buf, '.'))})
*** ../vim-8.2.0532/src/testdir/test_messages.vim 2020-03-23
20:54:28.220520961 +0100
--- src/testdir/test_messages.vim 2020-04-08 21:25:11.209254652 +0200
***************
*** 114,120 ****
let rows = 10
let buf = term_start([GetVimProg(), '--clean', '-S', testfile],
{'term_rows': rows})
! call term_wait(buf, 200)
call assert_equal('run', job_status(term_getjob(buf)))
call term_sendkeys(buf, "i")
--- 114,120 ----
let rows = 10
let buf = term_start([GetVimProg(), '--clean', '-S', testfile],
{'term_rows': rows})
! call TermWait(buf, 100)
call assert_equal('run', job_status(term_getjob(buf)))
call term_sendkeys(buf, "i")
***************
*** 143,149 ****
let rows = 10
let buf = term_start([GetVimProg(), '--clean', '-S', testfile],
{'term_rows': rows})
! call term_wait(buf, 200)
call assert_equal('run', job_status(term_getjob(buf)))
call term_sendkeys(buf, "i")
--- 143,149 ----
let rows = 10
let buf = term_start([GetVimProg(), '--clean', '-S', testfile],
{'term_rows': rows})
! call WaitForAssert({-> assert_match('0,0-1\s*All$', term_getline(buf, rows
- 1))})
call assert_equal('run', job_status(term_getjob(buf)))
call term_sendkeys(buf, "i")
*** ../vim-8.2.0532/src/testdir/test_number.vim 2020-02-23 13:38:05.730666220
+0100
--- src/testdir/test_number.vim 2020-04-08 21:25:15.701236819 +0200
***************
*** 280,286 ****
" Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_relnr', {'rows': 10, 'cols': 50})
! call term_wait(buf, 100)
" Default colors
call VerifyScreenDump(buf, 'Test_relnr_colors_1', {})
--- 280,286 ----
" Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_relnr', {'rows': 10, 'cols': 50})
! call TermWait(buf, 50)
" Default colors
call VerifyScreenDump(buf, 'Test_relnr_colors_1', {})
*** ../vim-8.2.0532/src/testdir/test_popup.vim 2020-03-27 20:24:09.076357289
+0100
--- src/testdir/test_popup.vim 2020-04-08 21:25:30.261179020 +0200
***************
*** 683,693 ****
call term_sendkeys(buf, "Gi\<c-x>")
call term_sendkeys(buf, "\<c-v>")
! call term_wait(buf, 100)
" popup first entry "!" must be at the top
call WaitForAssert({-> assert_match('^!\s*$', term_getline(buf, 1))})
exe 'resize +' . (h - 1)
! call term_wait(buf, 100)
redraw!
" popup shifted down, first line is now empty
call WaitForAssert({-> assert_equal('', term_getline(buf, 1))})
--- 683,693 ----
call term_sendkeys(buf, "Gi\<c-x>")
call term_sendkeys(buf, "\<c-v>")
! call TermWait(buf, 50)
" popup first entry "!" must be at the top
call WaitForAssert({-> assert_match('^!\s*$', term_getline(buf, 1))})
exe 'resize +' . (h - 1)
! call TermWait(buf, 50)
redraw!
" popup shifted down, first line is now empty
call WaitForAssert({-> assert_equal('', term_getline(buf, 1))})
***************
*** 750,760 ****
let buf = RunVimInTerminal('-S Xscript', {})
" wait for the script to finish
! call term_wait(buf)
" Test that popup and previewwindow do not overlap.
call term_sendkeys(buf, "o")
! call term_wait(buf, 100)
call term_sendkeys(buf, "\<C-X>\<C-N>")
call VerifyScreenDump(buf, 'Test_popup_and_previewwindow_01', {})
--- 750,760 ----
let buf = RunVimInTerminal('-S Xscript', {})
" wait for the script to finish
! call TermWait(buf)
" Test that popup and previewwindow do not overlap.
call term_sendkeys(buf, "o")
! call TermWait(buf, 50)
call term_sendkeys(buf, "\<C-X>\<C-N>")
call VerifyScreenDump(buf, 'Test_popup_and_previewwindow_01', {})
*** ../vim-8.2.0532/src/testdir/test_popupwin.vim 2020-03-20
21:15:47.918287657 +0100
--- src/testdir/test_popupwin.vim 2020-04-08 21:25:53.933085091 +0200
***************
*** 65,73 ****
" clear all popups after moving the cursor a bit, so that ruler is updated
call term_sendkeys(buf, "axxx\<Esc>")
! call term_wait(buf)
call term_sendkeys(buf, "0")
! call term_wait(buf)
call term_sendkeys(buf, ":call popup_clear()\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_08', {})
--- 65,73 ----
" clear all popups after moving the cursor a bit, so that ruler is updated
call term_sendkeys(buf, "axxx\<Esc>")
! call TermWait(buf)
call term_sendkeys(buf, "0")
! call TermWait(buf)
call term_sendkeys(buf, ":call popup_clear()\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_08', {})
***************
*** 1389,1395 ****
END
call writefile(lines, 'XtestPopupBeval')
let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10})
! call term_wait(buf, 100)
call term_sendkeys(buf, 'j')
call term_sendkeys(buf, ":call Hover()\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_beval_1', {})
--- 1389,1395 ----
END
call writefile(lines, 'XtestPopupBeval')
let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10})
! call TermWait(buf, 50)
call term_sendkeys(buf, 'j')
call term_sendkeys(buf, ":call Hover()\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_beval_1', {})
***************
*** 2958,2964 ****
call writefile(lines, 'XtestInfoPopup')
let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14})
! call term_wait(buf, 50)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_1', {})
--- 2958,2964 ----
call writefile(lines, 'XtestInfoPopup')
let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14})
! call TermWait(buf, 25)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_1', {})
***************
*** 3006,3012 ****
call writefile(lines, 'XtestInfoPopupNb')
let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14})
! call term_wait(buf, 50)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_nb_1', {})
--- 3006,3012 ----
call writefile(lines, 'XtestInfoPopupNb')
let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14})
! call TermWait(buf, 25)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_nb_1', {})
***************
*** 3024,3030 ****
call writefile(lines, 'XtestInfoPopupNb')
let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14})
! call term_wait(buf, 50)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call term_sendkeys(buf, "\<C-N>")
--- 3024,3030 ----
call writefile(lines, 'XtestInfoPopupNb')
let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14})
! call TermWait(buf, 25)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call term_sendkeys(buf, "\<C-N>")
***************
*** 3055,3061 ****
call writefile(lines, 'XtestInfoPopupHidden')
let buf = RunVimInTerminal('-S XtestInfoPopupHidden', #{rows: 14})
! call term_wait(buf, 50)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_hidden_1', {})
--- 3055,3061 ----
call writefile(lines, 'XtestInfoPopupHidden')
let buf = RunVimInTerminal('-S XtestInfoPopupHidden', #{rows: 14})
! call TermWait(buf, 25)
call term_sendkeys(buf, "A\<C-X>\<C-U>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_hidden_1', {})
***************
*** 3113,3119 ****
call writefile(lines, 'XtestInfoPopupWide')
let buf = RunVimInTerminal('-S XtestInfoPopupWide', #{rows: 8})
! call term_wait(buf, 50)
call term_sendkeys(buf, "Ascr\<C-X>\<C-O>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_wide_1', {})
--- 3113,3119 ----
call writefile(lines, 'XtestInfoPopupWide')
let buf = RunVimInTerminal('-S XtestInfoPopupWide', #{rows: 8})
! call TermWait(buf, 25)
call term_sendkeys(buf, "Ascr\<C-X>\<C-O>")
call VerifyScreenDump(buf, 'Test_popupwin_infopopup_wide_1', {})
*** ../vim-8.2.0532/src/testdir/test_profile.vim 2020-03-17
20:57:00.654899725 +0100
--- src/testdir/test_profile.vim 2020-04-08 21:25:59.865061560 +0200
***************
*** 541,547 ****
\ .. "endfunc\<CR>")
call term_sendkeys(buf, ":profile func DoSomething\<CR>")
call term_sendkeys(buf, ":call DoSomething()\<CR>")
! call term_wait(buf, 200)
call StopVimInTerminal(buf)
let lines = readfile('XprofileTypedFunc')
call assert_equal("FUNCTION DoSomething()", lines[0])
--- 541,547 ----
\ .. "endfunc\<CR>")
call term_sendkeys(buf, ":profile func DoSomething\<CR>")
call term_sendkeys(buf, ":call DoSomething()\<CR>")
! call TermWait(buf, 100)
call StopVimInTerminal(buf)
let lines = readfile('XprofileTypedFunc')
call assert_equal("FUNCTION DoSomething()", lines[0])
*** ../vim-8.2.0532/src/testdir/test_search.vim 2020-04-08 19:48:53.551732882
+0200
--- src/testdir/test_search.vim 2020-04-08 21:26:56.732870836 +0200
***************
*** 672,678 ****
call term_sendkeys(buf, "/vim\<cr>")
call term_sendkeys(buf, "/b\<esc>")
call term_sendkeys(buf, "gg0")
! call term_wait(buf, 500)
let screen_line = term_scrape(buf, 1)
let [a0,a1,a2,a3] = [screen_line[3].attr, screen_line[4].attr,
\ screen_line[18].attr, screen_line[19].attr]
--- 672,678 ----
call term_sendkeys(buf, "/vim\<cr>")
call term_sendkeys(buf, "/b\<esc>")
call term_sendkeys(buf, "gg0")
! call TermWait(buf, 250)
let screen_line = term_scrape(buf, 1)
let [a0,a1,a2,a3] = [screen_line[3].attr, screen_line[4].attr,
\ screen_line[18].attr, screen_line[19].attr]
***************
*** 792,803 ****
call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1),
term_getline(buf, 2)])})
" wait for vim to complete initialization
! call term_wait(buf)
" Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight
call term_sendkeys(buf, ":set incsearch hlsearch\<cr>")
call term_sendkeys(buf, '/b')
! call term_wait(buf, 200)
let screen_line1 = term_scrape(buf, 1)
call assert_true(len(screen_line1) > 2)
" a0: attr_normal
--- 792,803 ----
call WaitForAssert({-> assert_equal(lines, [term_getline(buf, 1),
term_getline(buf, 2)])})
" wait for vim to complete initialization
! call TermWait(buf)
" Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight
call term_sendkeys(buf, ":set incsearch hlsearch\<cr>")
call term_sendkeys(buf, '/b')
! call TermWait(buf, 100)
let screen_line1 = term_scrape(buf, 1)
call assert_true(len(screen_line1) > 2)
" a0: attr_normal
***************
*** 813,819 ****
" Test incremental highlight search
call term_sendkeys(buf, "/vim")
! call term_wait(buf, 200)
" Buffer:
" abb vim vim vi
" vimvivim
--- 813,819 ----
" Test incremental highlight search
call term_sendkeys(buf, "/vim")
! call TermWait(buf, 100)
" Buffer:
" abb vim vim vi
" vimvivim
***************
*** 825,831 ****
" Test <C-g>
call term_sendkeys(buf, "\<C-g>\<C-g>")
! call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0]
let attr_line2 = [a1,a1,a1,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
--- 825,831 ----
" Test <C-g>
call term_sendkeys(buf, "\<C-g>\<C-g>")
! call TermWait(buf, 100)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0]
let attr_line2 = [a1,a1,a1,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
***************
*** 833,839 ****
" Test <C-t>
call term_sendkeys(buf, "\<C-t>")
! call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a1,a1,a1,a0,a0,a0]
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
--- 833,839 ----
" Test <C-t>
call term_sendkeys(buf, "\<C-t>")
! call TermWait(buf, 100)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a1,a1,a1,a0,a0,a0]
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
***************
*** 841,847 ****
" Type Enter and a1(incsearch highlight) should become a2(hlsearch
highlight)
call term_sendkeys(buf, "\<cr>")
! call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0]
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
--- 841,847 ----
" Type Enter and a1(incsearch highlight) should become a2(hlsearch
highlight)
call term_sendkeys(buf, "\<cr>")
! call TermWait(buf, 100)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0]
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
***************
*** 851,857 ****
call term_sendkeys(buf, ":1\<cr>")
call term_sendkeys(buf, ":set nohlsearch\<cr>")
call term_sendkeys(buf, "/vim")
! call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a1,a1,a1,a0,a0,a0,a0,a0,a0,a0]
let attr_line2 = [a0,a0,a0,a0,a0,a0,a0,a0]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
--- 851,857 ----
call term_sendkeys(buf, ":1\<cr>")
call term_sendkeys(buf, ":set nohlsearch\<cr>")
call term_sendkeys(buf, "/vim")
! call TermWait(buf, 100)
let attr_line1 = [a0,a0,a0,a0,a1,a1,a1,a0,a0,a0,a0,a0,a0,a0]
let attr_line2 = [a0,a0,a0,a0,a0,a0,a0,a0]
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1],
'v:val.attr'))
*** ../vim-8.2.0532/src/testdir/test_search_stat.vim 2019-09-06
20:36:49.000000000 +0200
--- src/testdir/test_search_stat.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 202,213 ****
END
call writefile(lines, 'Xsearchstat')
let buf = RunVimInTerminal('-S Xsearchstat', #{rows: 10})
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_searchstat_1', {})
call term_sendkeys(buf, ":nnoremap <silent> n n\<cr>")
call term_sendkeys(buf, "gg0n")
! call term_wait(buf)
call VerifyScreenDump(buf, 'Test_searchstat_2', {})
call StopVimInTerminal(buf)
--- 202,213 ----
END
call writefile(lines, 'Xsearchstat')
let buf = RunVimInTerminal('-S Xsearchstat', #{rows: 10})
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_searchstat_1', {})
call term_sendkeys(buf, ":nnoremap <silent> n n\<cr>")
call term_sendkeys(buf, "gg0n")
! call TermWait(buf)
call VerifyScreenDump(buf, 'Test_searchstat_2', {})
call StopVimInTerminal(buf)
*** ../vim-8.2.0532/src/testdir/test_startup.vim 2020-04-04
14:00:34.197098267 +0200
--- src/testdir/test_startup.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 795,803 ****
let cmd = GetVimCommandCleanTerm() . ' -u Xvimrc_missing -S Xafter'
let buf = term_start(cmd, {'term_rows' : 10})
call WaitForAssert({-> assert_equal("running", term_getstatus(buf))})
! call term_wait(buf)
call term_sendkeys(buf, "\n:")
! call term_wait(buf)
call WaitForAssert({-> assert_match(':', term_getline(buf, 10))})
call StopVimInTerminal(buf)
call assert_equal([], readfile('Xtestout'))
--- 795,803 ----
let cmd = GetVimCommandCleanTerm() . ' -u Xvimrc_missing -S Xafter'
let buf = term_start(cmd, {'term_rows' : 10})
call WaitForAssert({-> assert_equal("running", term_getstatus(buf))})
! call TermWait(buf)
call term_sendkeys(buf, "\n:")
! call TermWait(buf)
call WaitForAssert({-> assert_match(':', term_getline(buf, 10))})
call StopVimInTerminal(buf)
call assert_equal([], readfile('Xtestout'))
*** ../vim-8.2.0532/src/testdir/test_startup_utf8.vim 2019-06-06
16:01:27.000000000 +0200
--- src/testdir/test_startup_utf8.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 74,80 ****
\ 'redraw',
\ ], 'Xscript')
let buf = RunVimInTerminal('-S Xscript', {})
! call term_wait(buf)
call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>")
call WaitForAssert({-> assert_match('single', term_getline(buf, 1))})
--- 74,80 ----
\ 'redraw',
\ ], 'Xscript')
let buf = RunVimInTerminal('-S Xscript', {})
! call TermWait(buf)
call term_sendkeys(buf, "S\<C-R>=&ambiwidth\<CR>\<Esc>")
call WaitForAssert({-> assert_match('single', term_getline(buf, 1))})
*** ../vim-8.2.0532/src/testdir/test_statusline.vim 2020-02-08
18:35:12.528045466 +0100
--- src/testdir/test_statusline.vim 2020-04-08 21:27:04.372855985 +0200
***************
*** 406,412 ****
call writefile(lines, 'XTest_statusline')
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50})
! call term_wait(buf, 100)
call VerifyScreenDump(buf, 'Test_statusline_1', {})
" clean up
--- 406,412 ----
call writefile(lines, 'XTest_statusline')
let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50})
! call TermWait(buf, 50)
call VerifyScreenDump(buf, 'Test_statusline_1', {})
" clean up
*** ../vim-8.2.0532/src/testdir/test_suspend.vim 2019-08-15
11:10:59.000000000 +0200
--- src/testdir/test_suspend.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 53,59 ****
" Quit gracefully to dump coverage information.
call term_sendkeys(buf, ":qall!\<CR>")
! call term_wait(buf)
" Wait until Vim actually exited and shell shows a prompt
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
call StopShellInTerminal(buf)
--- 53,59 ----
" Quit gracefully to dump coverage information.
call term_sendkeys(buf, ":qall!\<CR>")
! call TermWait(buf)
" Wait until Vim actually exited and shell shows a prompt
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
call StopShellInTerminal(buf)
*** ../vim-8.2.0532/src/testdir/test_swap.vim 2020-03-24 21:44:47.830888934
+0100
--- src/testdir/test_swap.vim 2020-04-08 21:15:44.463526302 +0200
***************
*** 363,376 ****
call term_sendkeys(buf, ":set nomore\n")
call term_sendkeys(buf, ":set noruler\n")
call term_sendkeys(buf, ":split Xfile1\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway,
(R)ecover, (Q)uit, (A)bort: $', term_getline(buf, 20))})
call term_sendkeys(buf, "q")
! call term_wait(buf)
call term_sendkeys(buf, ":\<CR>")
call WaitForAssert({-> assert_match('^:$', term_getline(buf, 20))})
call term_sendkeys(buf, ":echomsg winnr('$')\<CR>")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))})
call StopVimInTerminal(buf)
%bwipe!
--- 363,376 ----
call term_sendkeys(buf, ":set nomore\n")
call term_sendkeys(buf, ":set noruler\n")
call term_sendkeys(buf, ":split Xfile1\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway,
(R)ecover, (Q)uit, (A)bort: $', term_getline(buf, 20))})
call term_sendkeys(buf, "q")
! call TermWait(buf)
call term_sendkeys(buf, ":\<CR>")
call WaitForAssert({-> assert_match('^:$', term_getline(buf, 20))})
call term_sendkeys(buf, ":echomsg winnr('$')\<CR>")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))})
call StopVimInTerminal(buf)
%bwipe!
*** ../vim-8.2.0532/src/testdir/test_tagjump.vim 2020-03-10
07:48:06.575619533 +0100
--- src/testdir/test_tagjump.vim 2020-04-08 21:27:09.316846272 +0200
***************
*** 544,550 ****
call writefile(lines, 'XTest_tselect')
let buf = RunVimInTerminal('-S XTest_tselect', {'rows': 10, 'cols': 50})
! call term_wait(buf, 100)
call term_sendkeys(buf, ":tselect main\<CR>2\<CR>")
call VerifyScreenDump(buf, 'Test_tselect_1', {})
--- 544,550 ----
call writefile(lines, 'XTest_tselect')
let buf = RunVimInTerminal('-S XTest_tselect', {'rows': 10, 'cols': 50})
! call TermWait(buf, 50)
call term_sendkeys(buf, ":tselect main\<CR>2\<CR>")
call VerifyScreenDump(buf, 'Test_tselect_1', {})
*** ../vim-8.2.0532/src/testdir/test_terminal.vim 2020-04-03
12:56:10.783195402 +0200
--- src/testdir/test_terminal.vim 2020-04-08 21:29:21.696559643 +0200
***************
*** 44,50 ****
call assert_notmatch('%[^\n]*running]', execute('ls ?'))
call StopShellInTerminal(buf)
! call term_wait(buf)
call assert_equal('n', mode())
call assert_match('%aF[^\n]*finished]', execute('ls'))
call assert_match('%aF[^\n]*finished]', execute('ls F'))
--- 44,50 ----
call assert_notmatch('%[^\n]*running]', execute('ls ?'))
call StopShellInTerminal(buf)
! call TermWait(buf)
call assert_equal('n', mode())
call assert_match('%aF[^\n]*finished]', execute('ls'))
call assert_match('%aF[^\n]*finished]', execute('ls F'))
***************
*** 79,85 ****
func Test_terminal_make_change()
let buf = Run_shell_in_terminal({})
call StopShellInTerminal(buf)
! call term_wait(buf)
setlocal modifiable
exe "normal Axxx\<Esc>"
--- 79,85 ----
func Test_terminal_make_change()
let buf = Run_shell_in_terminal({})
call StopShellInTerminal(buf)
! call TermWait(buf)
setlocal modifiable
exe "normal Axxx\<Esc>"
***************
*** 117,126 ****
func Test_terminal_split_quit()
let buf = Run_shell_in_terminal({})
! call term_wait(buf)
split
quit!
! call term_wait(buf)
sleep 50m
call assert_equal('run', job_status(g:job))
--- 117,126 ----
func Test_terminal_split_quit()
let buf = Run_shell_in_terminal({})
! call TermWait(buf)
split
quit!
! call TermWait(buf)
sleep 50m
call assert_equal('run', job_status(g:job))
***************
*** 225,231 ****
" Nothing happens with invalid buffer number
call term_wait(1234)
! call term_wait(buf)
" On MS-Windows we first get a startup message of two lines, wait for the
" "cls" to happen, after that we have one line with three characters.
call WaitForAssert({-> assert_equal(3, len(term_scrape(buf, 1)))})
--- 225,231 ----
" Nothing happens with invalid buffer number
call term_wait(1234)
! call TermWait(buf)
" On MS-Windows we first get a startup message of two lines, wait for the
" "cls" to happen, after that we have one line with three characters.
call WaitForAssert({-> assert_equal(3, len(term_scrape(buf, 1)))})
***************
*** 234,240 ****
" Must still work after the job ended.
let job = term_getjob(buf)
call WaitForAssert({-> assert_equal("dead", job_status(job))})
! call term_wait(buf)
call Check_123(buf)
exe buf . 'bwipe'
--- 234,240 ----
" Must still work after the job ended.
let job = term_getjob(buf)
call WaitForAssert({-> assert_equal("dead", job_status(job))})
! call TermWait(buf)
call Check_123(buf)
exe buf . 'bwipe'
***************
*** 270,276 ****
let job = term_getjob(buf)
call WaitForAssert({-> assert_equal("dead", job_status(job))})
! call term_wait(buf)
exe buf . 'bwipe'
call delete('Xtext')
--- 270,276 ----
let job = term_getjob(buf)
call WaitForAssert({-> assert_equal("dead", job_status(job))})
! call TermWait(buf)
exe buf . 'bwipe'
call delete('Xtext')
***************
*** 287,293 ****
let job = term_getjob(buf)
call WaitForAssert({-> assert_equal("dead", job_status(job))})
! call term_wait(buf)
" wait until the scrolling stops
while 1
--- 287,293 ----
let job = term_getjob(buf)
call WaitForAssert({-> assert_equal("dead", job_status(job))})
! call TermWait(buf)
" wait until the scrolling stops
while 1
***************
*** 325,331 ****
call assert_inrange(91, 100, lines)
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
set termwinscroll&
call delete('Xtext')
--- 325,331 ----
call assert_inrange(91, 100, lines)
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
set termwinscroll&
call delete('Xtext')
***************
*** 359,368 ****
" stop "tail -f"
call term_sendkeys(buf, "\<C-C>")
! call term_wait(buf, 50)
" stop shell
call term_sendkeys(buf, "exit\<CR>")
! call term_wait(buf, 100)
" close terminal window
let tsk_ret = term_sendkeys(buf, ":q\<CR>")
--- 359,368 ----
" stop "tail -f"
call term_sendkeys(buf, "\<C-C>")
! call TermWait(buf, 25)
" stop shell
call term_sendkeys(buf, "exit\<CR>")
! call TermWait(buf, 50)
" close terminal window
let tsk_ret = term_sendkeys(buf, ":q\<CR>")
***************
*** 622,628 ****
else
call term_sendkeys(buf, "echo $" . a:name . "\r")
endif
! call term_wait(buf)
call StopShellInTerminal(buf)
call WaitForAssert({-> assert_equal(a:value, getline(2))})
--- 622,628 ----
else
call term_sendkeys(buf, "echo $" . a:name . "\r")
endif
! call TermWait(buf)
call StopShellInTerminal(buf)
call WaitForAssert({-> assert_equal(a:value, getline(2))})
***************
*** 639,645 ****
else
call term_sendkeys(buf, "echo $TESTENV\r")
endif
! eval buf->term_wait()
call StopShellInTerminal(buf)
call WaitForAssert({-> assert_equal('correct', getline(2))})
--- 639,645 ----
else
call term_sendkeys(buf, "echo $TESTENV\r")
endif
! eval buf->TermWait()
call StopShellInTerminal(buf)
call WaitForAssert({-> assert_equal('correct', getline(2))})
***************
*** 688,694 ****
let g:job = term_getjob(buf)
call StopShellInTerminal(buf)
! call term_wait(buf)
unlet g:job
bwipe
endfunc
--- 688,694 ----
let g:job = term_getjob(buf)
call StopShellInTerminal(buf)
! call TermWait(buf)
unlet g:job
bwipe
endfunc
***************
*** 813,819 ****
func Test_terminal_redir_file()
let cmd = Get_cat_123_cmd()
let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'})
! call term_wait(buf)
" ConPTY may precede escape sequence. There are things that are not so.
if !has('conpty')
call WaitForAssert({-> assert_notequal(0, len(readfile("Xfile")))})
--- 813,819 ----
func Test_terminal_redir_file()
let cmd = Get_cat_123_cmd()
let buf = term_start(cmd, {'out_io': 'file', 'out_name': 'Xfile'})
! call TermWait(buf)
" ConPTY may precede escape sequence. There are things that are not so.
if !has('conpty')
call WaitForAssert({-> assert_notequal(0, len(readfile("Xfile")))})
***************
*** 827,833 ****
if has('unix')
call writefile(['one line'], 'Xfile')
let buf = term_start('cat', {'in_io': 'file', 'in_name': 'Xfile'})
! call term_wait(buf)
call WaitForAssert({-> assert_equal('one line', term_getline(buf, 1))})
let g:job = term_getjob(buf)
call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
--- 827,833 ----
if has('unix')
call writefile(['one line'], 'Xfile')
let buf = term_start('cat', {'in_io': 'file', 'in_name': 'Xfile'})
! call TermWait(buf)
call WaitForAssert({-> assert_equal('one line', term_getline(buf, 1))})
let g:job = term_getjob(buf)
call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
***************
*** 860,866 ****
call term_sendkeys(buf, "\r")
call StopShellInTerminal(buf)
! call term_wait(buf)
tunmap 123
tunmap 456
--- 860,866 ----
call term_sendkeys(buf, "\r")
call StopShellInTerminal(buf)
! call TermWait(buf)
tunmap 123
tunmap 456
***************
*** 878,884 ****
let buf = Run_shell_in_terminal({})
wall
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
unlet g:job
endfunc
--- 878,884 ----
let buf = Run_shell_in_terminal({})
wall
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
unlet g:job
endfunc
***************
*** 887,893 ****
let buf = Run_shell_in_terminal({})
call assert_fails('wqall', 'E948')
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
unlet g:job
endfunc
--- 887,893 ----
let buf = Run_shell_in_terminal({})
call assert_fails('wqall', 'E948')
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
unlet g:job
endfunc
***************
*** 908,914 ****
enew
let buf = term_start(cmd, {'curwin': bufnr('')})
let g:job = term_getjob(buf)
! call term_wait(buf, 50)
if has('win32')
call assert_equal('cmd', job_info(g:job).cmd[0])
--- 908,914 ----
enew
let buf = term_start(cmd, {'curwin': bufnr('')})
let g:job = term_getjob(buf)
! call TermWait(buf, 25)
if has('win32')
call assert_equal('cmd', job_info(g:job).cmd[0])
***************
*** 919,925 ****
" ascii + composing
let txt = "a\u0308bc"
call term_sendkeys(buf, "echo " . txt . "\r")
! call term_wait(buf, 50)
call assert_match("echo " . txt, term_getline(buf, lnum[0]))
call assert_equal(txt, term_getline(buf, lnum[0] + 1))
let l = term_scrape(buf, lnum[0] + 1)
--- 919,925 ----
" ascii + composing
let txt = "a\u0308bc"
call term_sendkeys(buf, "echo " . txt . "\r")
! call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[0]))
call assert_equal(txt, term_getline(buf, lnum[0] + 1))
let l = term_scrape(buf, lnum[0] + 1)
***************
*** 930,936 ****
" multibyte + composing
let txt = "\u304b\u3099\u304e\u304f\u3099\u3052\u3053\u3099"
call term_sendkeys(buf, "echo " . txt . "\r")
! call term_wait(buf, 50)
call assert_match("echo " . txt, term_getline(buf, lnum[1]))
call assert_equal(txt, term_getline(buf, lnum[1] + 1))
let l = term_scrape(buf, lnum[1] + 1)
--- 930,936 ----
" multibyte + composing
let txt = "\u304b\u3099\u304e\u304f\u3099\u3052\u3053\u3099"
call term_sendkeys(buf, "echo " . txt . "\r")
! call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[1]))
call assert_equal(txt, term_getline(buf, lnum[1] + 1))
let l = term_scrape(buf, lnum[1] + 1)
***************
*** 943,949 ****
" \u00a0 + composing
let txt = "abc\u00a0\u0308"
call term_sendkeys(buf, "echo " . txt . "\r")
! call term_wait(buf, 50)
call assert_match("echo " . txt, term_getline(buf, lnum[2]))
call assert_equal(txt, term_getline(buf, lnum[2] + 1))
let l = term_scrape(buf, lnum[2] + 1)
--- 943,949 ----
" \u00a0 + composing
let txt = "abc\u00a0\u0308"
call term_sendkeys(buf, "echo " . txt . "\r")
! call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[2]))
call assert_equal(txt, term_getline(buf, lnum[2] + 1))
let l = term_scrape(buf, lnum[2] + 1)
***************
*** 1587,1593 ****
let buf = Run_shell_in_terminal({})
call assert_equal(colors, term_getansicolors(buf))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
endfunc
--- 1587,1593 ----
let buf = Run_shell_in_terminal({})
call assert_equal(colors, term_getansicolors(buf))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
endfunc
***************
*** 1612,1618 ****
let buf = Run_shell_in_terminal({})
call assert_equal(g:terminal_ansi_colors, term_getansicolors(buf))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
unlet g:terminal_ansi_colors
--- 1612,1618 ----
let buf = Run_shell_in_terminal({})
call assert_equal(g:terminal_ansi_colors, term_getansicolors(buf))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
unlet g:terminal_ansi_colors
***************
*** 1646,1652 ****
call assert_fails('call term_setansicolors(buf, colors)', 'E474:')
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
endfunc
--- 1646,1652 ----
call assert_fails('call term_setansicolors(buf, colors)', 'E474:')
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
endfunc
***************
*** 1742,1748 ****
let win = bufwinid(buf)
call assert_equal([winheight(win), winwidth(win)], term_getsize(buf))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
set termwinsize=7x0
--- 1742,1748 ----
let win = bufwinid(buf)
call assert_equal([winheight(win), winwidth(win)], term_getsize(buf))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
set termwinsize=7x0
***************
*** 1750,1756 ****
let win = bufwinid(buf)
call assert_equal([7, winwidth(win)], term_getsize(buf))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
set termwinsize=0x33
--- 1750,1756 ----
let win = bufwinid(buf)
call assert_equal([7, winwidth(win)], term_getsize(buf))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
set termwinsize=0x33
***************
*** 1758,1764 ****
let win = bufwinid(buf)
call assert_equal([winheight(win), 33], term_getsize(buf))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
set termwinsize=
--- 1758,1764 ----
let win = bufwinid(buf)
call assert_equal([winheight(win), 33], term_getsize(buf))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
set termwinsize=
***************
*** 1788,1794 ****
call assert_equal(30, winwidth(win))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
set termwinsize=0*0
--- 1788,1794 ----
call assert_equal(30, winwidth(win))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
set termwinsize=0*0
***************
*** 1796,1802 ****
let win = bufwinid(buf)
call assert_equal([winheight(win), winwidth(win)], term_getsize(buf))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
set termwinsize=
--- 1796,1802 ----
let win = bufwinid(buf)
call assert_equal([winheight(win), winwidth(win)], term_getsize(buf))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
set termwinsize=
***************
*** 1938,1944 ****
call assert_equal(1, winnr('$'))
let buf = Run_shell_in_terminal({'term_finish': 'close'})
call StopShellInTerminal(buf)
! call term_wait(buf)
" closing window wipes out the terminal buffer a with finished job
call WaitForAssert({-> assert_equal(1, winnr('$'))})
--- 1938,1944 ----
call assert_equal(1, winnr('$'))
let buf = Run_shell_in_terminal({'term_finish': 'close'})
call StopShellInTerminal(buf)
! call TermWait(buf)
" closing window wipes out the terminal buffer a with finished job
call WaitForAssert({-> assert_equal(1, winnr('$'))})
***************
*** 2025,2031 ****
END
call writefile(lines, 'XtermNormal')
let buf = RunVimInTerminal('-S XtermNormal', {'rows': 8})
! call term_wait(buf)
call term_sendkeys(buf, "\<C-W>N")
call term_sendkeys(buf, ":set number cursorline culopt=both\r")
--- 2025,2031 ----
END
call writefile(lines, 'XtermNormal')
let buf = RunVimInTerminal('-S XtermNormal', {'rows': 8})
! call TermWait(buf)
call term_sendkeys(buf, "\<C-W>N")
call term_sendkeys(buf, ":set number cursorline culopt=both\r")
***************
*** 2215,2221 ****
call assert_equal('', term_gettty(buf + 1))
call StopShellInTerminal(buf)
! call term_wait(buf)
exe buf . 'bwipe'
endfunc
--- 2215,2221 ----
call assert_equal('', term_gettty(buf + 1))
call StopShellInTerminal(buf)
! call TermWait(buf)
exe buf . 'bwipe'
endfunc
***************
*** 2255,2261 ****
\ 'echo getwinpos()',
\ ], 'XTest_getwinpos')
let buf = RunVimInTerminal('-S XTest_getwinpos', {'cols': 60})
! call term_wait(buf)
" Find the output of getwinpos() in the bottom line.
let rows = term_getsize(buf)[0]
--- 2255,2261 ----
\ 'echo getwinpos()',
\ ], 'XTest_getwinpos')
let buf = RunVimInTerminal('-S XTest_getwinpos', {'cols': 60})
! call TermWait(buf)
" Find the output of getwinpos() in the bottom line.
let rows = term_getsize(buf)[0]
***************
*** 2278,2284 ****
call assert_inrange(xroot + 2, xroot + xoff, xpos)
call assert_inrange(yroot + 2, yroot + yoff, ypos)
! call term_wait(buf)
call term_sendkeys(buf, ":q\<CR>")
call StopVimInTerminal(buf)
call delete('XTest_getwinpos')
--- 2278,2284 ----
call assert_inrange(xroot + 2, xroot + xoff, xpos)
call assert_inrange(yroot + 2, yroot + yoff, ypos)
! call TermWait(buf)
call term_sendkeys(buf, ":q\<CR>")
call StopVimInTerminal(buf)
call delete('XTest_getwinpos')
***************
*** 2434,2444 ****
\ ]
call writefile(lines, 'XtermPopup')
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
! call term_wait(buf, 200)
call term_sendkeys(buf, ":call OpenTerm(0)\<CR>")
! call term_wait(buf, 200)
call term_sendkeys(buf, ":\<CR>")
! call term_wait(buf, 200)
call term_sendkeys(buf, "\<C-W>:echo getwinvar(g:winid, \"&buftype\")
win_gettype(g:winid)\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_1', {})
--- 2434,2444 ----
\ ]
call writefile(lines, 'XtermPopup')
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
! call TermWait(buf, 100)
call term_sendkeys(buf, ":call OpenTerm(0)\<CR>")
! call TermWait(buf, 100)
call term_sendkeys(buf, ":\<CR>")
! call TermWait(buf, 100)
call term_sendkeys(buf, "\<C-W>:echo getwinvar(g:winid, \"&buftype\")
win_gettype(g:winid)\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_1', {})
***************
*** 2446,2452 ****
call VerifyScreenDump(buf, 'Test_terminal_popup_2', {})
call term_sendkeys(buf, ":call OpenTerm(1)\<CR>")
! call term_wait(buf, 300)
call term_sendkeys(buf, ":set hlsearch\<CR>")
call term_sendkeys(buf, "/edit\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_3', {})
--- 2446,2452 ----
call VerifyScreenDump(buf, 'Test_terminal_popup_2', {})
call term_sendkeys(buf, ":call OpenTerm(1)\<CR>")
! call TermWait(buf, 150)
call term_sendkeys(buf, ":set hlsearch\<CR>")
call term_sendkeys(buf, "/edit\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_3', {})
***************
*** 2454,2460 ****
call term_sendkeys(buf, "\<C-W>:call HidePopup()\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_4', {})
call term_sendkeys(buf, "\<CR>")
! call term_wait(buf, 100)
call term_sendkeys(buf, "\<C-W>:call ClosePopup()\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_5', {})
--- 2454,2460 ----
call term_sendkeys(buf, "\<C-W>:call HidePopup()\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_4', {})
call term_sendkeys(buf, "\<CR>")
! call TermWait(buf, 50)
call term_sendkeys(buf, "\<C-W>:call ClosePopup()\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_5', {})
***************
*** 2470,2478 ****
call term_sendkeys(buf, "A")
call VerifyScreenDump(buf, 'Test_terminal_popup_8', {})
! call term_wait(buf, 100)
call term_sendkeys(buf, ":q\<CR>")
! call term_wait(buf, 200) " wait for terminal to vanish
call StopVimInTerminal(buf)
call delete('Xtext')
--- 2470,2478 ----
call term_sendkeys(buf, "A")
call VerifyScreenDump(buf, 'Test_terminal_popup_8', {})
! call TermWait(buf, 50)
call term_sendkeys(buf, ":q\<CR>")
! call TermWait(buf, 100) " wait for terminal to vanish
call StopVimInTerminal(buf)
call delete('Xtext')
***************
*** 2499,2514 ****
\ ]
call writefile(lines, 'XtermPopup')
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
! call term_wait(buf, 200)
call term_sendkeys(buf, ":set noruler\<CR>")
call term_sendkeys(buf, ":call OpenTerm()\<CR>")
! call term_wait(buf, 100)
call term_sendkeys(buf, ":\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_m1', {})
! call term_wait(buf, 100)
call term_sendkeys(buf, ":q\<CR>")
! call term_wait(buf, 100) " wait for terminal to vanish
call StopVimInTerminal(buf)
call delete('Xtext')
call delete('XtermPopup')
--- 2499,2514 ----
\ ]
call writefile(lines, 'XtermPopup')
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
! call TermWait(buf, 100)
call term_sendkeys(buf, ":set noruler\<CR>")
call term_sendkeys(buf, ":call OpenTerm()\<CR>")
! call TermWait(buf, 50)
call term_sendkeys(buf, ":\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_m1', {})
! call TermWait(buf, 50)
call term_sendkeys(buf, ":q\<CR>")
! call TermWait(buf, 50) " wait for terminal to vanish
call StopVimInTerminal(buf)
call delete('Xtext')
call delete('XtermPopup')
***************
*** 2531,2547 ****
\ ]
call writefile(lines, 'XtermPopup')
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
! call term_wait(buf, 200)
call term_sendkeys(buf, ":set noruler\<CR>")
call term_sendkeys(buf, ":call OpenTerm()\<CR>")
! call term_wait(buf, 100)
call term_sendkeys(buf, "hello\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_' .. a:group_name, {})
call term_sendkeys(buf, "\<C-D>")
! call term_wait(buf, 100)
call term_sendkeys(buf, ":q\<CR>")
! call term_wait(buf, 100) " wait for terminal to vanish
call StopVimInTerminal(buf)
call delete('XtermPopup')
endfunc
--- 2531,2547 ----
\ ]
call writefile(lines, 'XtermPopup')
let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
! call TermWait(buf, 100)
call term_sendkeys(buf, ":set noruler\<CR>")
call term_sendkeys(buf, ":call OpenTerm()\<CR>")
! call TermWait(buf, 50)
call term_sendkeys(buf, "hello\<CR>")
call VerifyScreenDump(buf, 'Test_terminal_popup_' .. a:group_name, {})
call term_sendkeys(buf, "\<C-D>")
! call TermWait(buf, 50)
call term_sendkeys(buf, ":q\<CR>")
! call TermWait(buf, 50) " wait for terminal to vanish
call StopVimInTerminal(buf)
call delete('XtermPopup')
endfunc
***************
*** 2594,2612 ****
let g:buf1 = term_start('sh', #{hidden: 1, term_finish: 'close'})
call popup_create(g:buf1, {})
let g:buf2 = term_start(['sh', '-c'], #{curwin: 1, exit_cb:
function('TermExit')})
! call term_wait(g:buf2, 100)
call popup_close(win_getid())
endfunc
func TermExit(...)
let altbuf = bufnr('#')
call term_sendkeys(altbuf, "exit\<CR>")
! call term_wait(altbuf)
call popup_close(win_getid())
endfunc
call OpenTerms()
call term_sendkeys(g:buf0, "exit\<CR>")
! call term_wait(g:buf0, 100)
exe g:buf0 .. 'bwipe!'
set hidden&
endfunc
--- 2594,2612 ----
let g:buf1 = term_start('sh', #{hidden: 1, term_finish: 'close'})
call popup_create(g:buf1, {})
let g:buf2 = term_start(['sh', '-c'], #{curwin: 1, exit_cb:
function('TermExit')})
! call TermWait(g:buf2, 50)
call popup_close(win_getid())
endfunc
func TermExit(...)
let altbuf = bufnr('#')
call term_sendkeys(altbuf, "exit\<CR>")
! call TermWait(altbuf)
call popup_close(win_getid())
endfunc
call OpenTerms()
call term_sendkeys(g:buf0, "exit\<CR>")
! call TermWait(g:buf0, 50)
exe g:buf0 .. 'bwipe!'
set hidden&
endfunc
*** ../vim-8.2.0532/src/testdir/test_terminal_fail.vim 2019-06-15
17:44:16.000000000 +0200
--- src/testdir/test_terminal_fail.vim 2020-04-08 21:15:44.467526283 +0200
***************
*** 10,16 ****
func Test_terminal_redir_fails()
if has('unix')
let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'})
! call term_wait(buf)
call WaitFor('len(readfile("Xfile")) > 0')
call assert_match('executing job failed', readfile('Xfile')[0])
call WaitFor('!&modified')
--- 10,16 ----
func Test_terminal_redir_fails()
if has('unix')
let buf = term_start('xyzabc', {'err_io': 'file', 'err_name': 'Xfile'})
! call TermWait(buf)
call WaitFor('len(readfile("Xfile")) > 0')
call assert_match('executing job failed', readfile('Xfile')[0])
call WaitFor('!&modified')
*** ../vim-8.2.0532/src/testdir/test_timers.vim 2020-03-07 16:59:18.633666175
+0100
--- src/testdir/test_timers.vim 2020-04-08 21:29:33.712531315 +0200
***************
*** 398,406 ****
call WaitForAssert({-> assert_notequal('', term_getline(buf, 8))})
" GC must not run during timer callback, which can make Vim crash.
! call term_wait(buf, 100)
call term_sendkeys(buf, "\<CR>")
! call term_wait(buf, 100)
call assert_equal('run', job_status(job))
call term_sendkeys(buf, ":qall!\<CR>")
--- 398,406 ----
call WaitForAssert({-> assert_notequal('', term_getline(buf, 8))})
" GC must not run during timer callback, which can make Vim crash.
! call TermWait(buf, 50)
call term_sendkeys(buf, "\<CR>")
! call TermWait(buf, 50)
call assert_equal('run', job_status(job))
call term_sendkeys(buf, ":qall!\<CR>")
*** ../vim-8.2.0532/src/testdir/test_vimscript.vim 2020-04-08
19:48:53.551732882 +0200
--- src/testdir/test_vimscript.vim 2020-04-08 21:15:44.467526283 +0200
***************
*** 1913,1942 ****
" Deep nesting of if ... endif
call term_sendkeys(buf, ":call Test1()\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^E579:', term_getline(buf, 5))})
" Deep nesting of for ... endfor
call term_sendkeys(buf, ":call Test2()\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))})
" Deep nesting of while ... endwhile
call term_sendkeys(buf, ":call Test3()\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))})
" Deep nesting of try ... endtry
call term_sendkeys(buf, ":call Test4()\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^E601:', term_getline(buf, 5))})
" Deep nesting of function ... endfunction
call term_sendkeys(buf, ":call Test5()\n")
! call term_wait(buf)
call WaitForAssert({-> assert_match('^E1058:', term_getline(buf, 4))})
call term_sendkeys(buf, "\<C-C>\n")
! call term_wait(buf)
"let l = ''
"for i in range(1, 6)
--- 1913,1942 ----
" Deep nesting of if ... endif
call term_sendkeys(buf, ":call Test1()\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^E579:', term_getline(buf, 5))})
" Deep nesting of for ... endfor
call term_sendkeys(buf, ":call Test2()\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))})
" Deep nesting of while ... endwhile
call term_sendkeys(buf, ":call Test3()\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))})
" Deep nesting of try ... endtry
call term_sendkeys(buf, ":call Test4()\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^E601:', term_getline(buf, 5))})
" Deep nesting of function ... endfunction
call term_sendkeys(buf, ":call Test5()\n")
! call TermWait(buf)
call WaitForAssert({-> assert_match('^E1058:', term_getline(buf, 4))})
call term_sendkeys(buf, "\<C-C>\n")
! call TermWait(buf)
"let l = ''
"for i in range(1, 6)
*** ../vim-8.2.0532/src/version.c 2020-04-08 20:03:48.184622981 +0200
--- src/version.c 2020-04-08 21:16:28.407348000 +0200
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 533,
/**/
--
<Beeth> Girls are like internet domain names,
the ones I like are already taken.
<honx> Well, you can stil get one from a strange country :-P
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202004081950.038JosWe014367%40masaka.moolenaar.net.