let buf = RunVimInTerminal('-S XvisualStartsBeforeSkipcol', #{rows: 6})
call term_sendkeys(buf, "v$")
+ call WaitForAssert({-> assert_match('VISUAL.*\d', term_getline(buf, 6))}, 1000)
call VerifyScreenDump(buf, 'Test_visual_starts_before_skipcol_1', {})
call term_sendkeys(buf, "\<Esc>:setlocal showbreak=+++\<CR>gv")
call VerifyScreenDump(buf, 'Test_visual_starts_before_skipcol_2', {})
CheckRunVimInTerminal
let buf = RunVimInTerminal('', {'rows': 6})
call term_sendkeys(buf, "i\<C-K>")
- call TermWait(buf)
- call assert_equal('?', term_getline(buf, 1))
+ call WaitForAssert({-> assert_equal('?', term_getline(buf, 1))}, 1000)
call term_sendkeys(buf, "1")
- call TermWait(buf)
- call assert_equal('1', term_getline(buf, 1))
+ call WaitForAssert({-> assert_equal('1', term_getline(buf, 1))}, 1000)
call term_sendkeys(buf, "2")
- call TermWait(buf)
- call assert_equal('½', term_getline(buf, 1))
+ call WaitForAssert({-> assert_equal('½', term_getline(buf, 1))}, 1000)
call StopVimInTerminal(buf)
endfunc
let buf = RunVimInTerminal('-S XupdateVisual.vim', #{rows: 8, cols: 60})
call term_sendkeys(buf, "VG7kk")
+ call WaitForAssert({-> assert_match('VISUAL.*\d\+\s\+\d', term_getline(buf, 8))}, 1000)
call VerifyScreenDump(buf, 'Test_display_scroll_update_visual', {})
call StopVimInTerminal(buf)
" trying to insert a blob produces an error
call term_sendkeys(buf, "i\<C-R>=0z\<CR>")
+ call WaitForAssert({-> assert_match('^E976:', term_getline(buf, 5))}, 1000)
" ending Insert mode should put the cursor back on the ':'
call term_sendkeys(buf, ":\<Esc>")
let buf = RunVimInTerminal('-S Xtest_visual_sbr', {'rows': 6,'columns': 60})
call term_sendkeys(buf, "v$")
+ call WaitForAssert({-> assert_match('VISUAL.*\d\+\s\+\d', term_getline(buf, 6))}, 1000)
call VerifyScreenDump(buf, 'Test_visual_sbr_1', {})
" clean up
let buf = RunVimInTerminal('-S '.filename, #{rows: 7})
call term_sendkeys(buf, "V\<C-D>\<C-D>")
+ call WaitForAssert({-> assert_match('VISUAL.*\d\+\s\+\d', term_getline(buf, 7))}, 1000)
call VerifyScreenDump(buf, 'Test_display_visual_block_scroll', {})
call StopVimInTerminal(buf)
\ ], 'Xhlvisual_script', 'D')
let buf = RunVimInTerminal('-S Xhlvisual_script', {'rows': 6, 'cols': 40})
call term_sendkeys(buf, "vjj")
+ call WaitForAssert({-> assert_match('VISUAL.*-\d', term_getline(buf, 6))}, 1000)
call VerifyScreenDump(buf, 'Test_hlsearch_visual_1', {})
call term_sendkeys(buf, "\<Esc>")
[CODE]
call writefile(commands, 'Xincsearch_nl', 'D')
let buf = RunVimInTerminal('-S Xincsearch_nl', {'rows': 5, 'cols': 10})
+ call TermWait(buf, 100)
call term_sendkeys(buf, '/test')
call VerifyScreenDump(buf, 'Test_incsearch_newline1', {})
" Need to send one key at a time to force a redraw
call writefile(lines, 'Xsearchstat_inc', 'D')
let buf = RunVimInTerminal('-S Xsearchstat_inc', #{rows: 10})
+ call TermWait(buf, 100)
call term_sendkeys(buf, "/abc")
call TermWait(buf)
+ " The first 3 chars on line 2 should have highlighting, but the following not
+ " So assert the attr value of those 4 chars
+ call WaitForAssert({-> assert_true(
+ \ term_scrape(buf, 2)[0].attr == term_scrape(buf, 2)[1].attr &&
+ \ term_scrape(buf, 2)[1].attr == term_scrape(buf, 2)[2].attr &&
+ \ term_scrape(buf, 2)[2].attr != term_scrape(buf, 2)[3].attr)}, 1000)
call VerifyScreenDump(buf, 'Test_searchstat_inc_1', {})
call term_sendkeys(buf, "\<c-g>")
- call TermWait(buf)
+ call WaitForAssert({-> assert_match('^3', term_getline(buf, 1))}, 1000)
call VerifyScreenDump(buf, 'Test_searchstat_inc_2', {})
call term_sendkeys(buf, "\<c-g>")
- call TermWait(buf)
+ call WaitForAssert({-> assert_match('^1', term_getline(buf, 1))}, 1000)
call VerifyScreenDump(buf, 'Test_searchstat_inc_3', {})
call term_sendkeys(buf, "\<esc>:qa\<cr>")
let buf = RunVimInTerminal('-S XTest_tabpanel_visual', {'rows': 10, 'cols': 45})
call term_sendkeys(buf, "v2w")
+ call WaitForAssert({-> assert_match('VISUAL.*\d', term_getline(buf, 10))}, 1000)
call VerifyScreenDump(buf, 'Test_tabpanel_visual_0', {})
call term_sendkeys(buf, "\<Esc>0jw")
call term_sendkeys(buf, "v2wge")
call term_sendkeys(buf, ":call Getout()\n")
call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000)
call term_sendkeys(buf, "y")
- call WaitForAssert({-> assert_match('(Y)es, \[N\]o: ', term_getline(buf, 8))}, 1000)
+ call WaitForAssert({-> assert_match('Press ENTER or type command to continue', term_getline(buf, 8))}, 1000)
call term_sendkeys(buf, "\<CR>")
call TermWait(buf)
call StopVimInTerminal(buf)
let buf = RunVimInTerminal('-S XTest_block', {'rows': 8, 'cols': 50})
call term_sendkeys(buf, "\<C-V>gg$")
+ call WaitForAssert({-> assert_match('VISUAL.*\dx\d', term_getline(buf, 8))}, 1000)
call VerifyScreenDump(buf, 'Test_visual_block_with_virtualedit', {})
call term_sendkeys(buf, "\<Esc>gg\<C-V>G$")
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 392,
/**/
391,
/**/