mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0619: too many delete() calls in tests
Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
This commit is contained in:
parent
82418263fa
commit
572a4433c8
@ -88,11 +88,11 @@ endfunc
|
|||||||
func Test_gf()
|
func Test_gf()
|
||||||
set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
|
set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
|
||||||
|
|
||||||
call writefile(["Test for gf command"], "Xtest1")
|
call writefile(["Test for gf command"], "Xtest1", 'D')
|
||||||
if has("unix")
|
if has("unix")
|
||||||
call writefile([" ${CDIR}/Xtest1"], "Xtestgf")
|
call writefile([" ${CDIR}/Xtest1"], "Xtestgf", 'D')
|
||||||
else
|
else
|
||||||
call writefile([" $TDIR/Xtest1"], "Xtestgf")
|
call writefile([" $TDIR/Xtest1"], "Xtestgf", 'D')
|
||||||
endif
|
endif
|
||||||
new Xtestgf
|
new Xtestgf
|
||||||
if has("unix")
|
if has("unix")
|
||||||
@ -109,14 +109,12 @@ func Test_gf()
|
|||||||
|
|
||||||
normal gf
|
normal gf
|
||||||
call assert_equal('Xtest1', fnamemodify(bufname(''), ":t"))
|
call assert_equal('Xtest1', fnamemodify(bufname(''), ":t"))
|
||||||
close!
|
|
||||||
|
|
||||||
call delete('Xtest1')
|
close!
|
||||||
call delete('Xtestgf')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_gf_visual()
|
func Test_gf_visual()
|
||||||
call writefile(['one', 'two', 'three', 'four'], "Xtest_gf_visual")
|
call writefile(['one', 'two', 'three', 'four'], "Xtest_gf_visual", 'D')
|
||||||
new
|
new
|
||||||
call setline(1, 'XXXtest_gf_visualXXX')
|
call setline(1, 'XXXtest_gf_visualXXX')
|
||||||
set hidden
|
set hidden
|
||||||
@ -139,33 +137,30 @@ func Test_gf_visual()
|
|||||||
call assert_equal(3, getcurpos()[1])
|
call assert_equal(3, getcurpos()[1])
|
||||||
|
|
||||||
" do not include the NUL at the end
|
" do not include the NUL at the end
|
||||||
call writefile(['x'], 'X')
|
call writefile(['x'], 'Xvisual', 'D')
|
||||||
let save_enc = &enc
|
let save_enc = &enc
|
||||||
for enc in ['latin1', 'utf-8']
|
for enc in ['latin1', 'utf-8']
|
||||||
exe "set enc=" .. enc
|
exe "set enc=" .. enc
|
||||||
new
|
new
|
||||||
call setline(1, 'X')
|
call setline(1, 'Xvisual')
|
||||||
set nomodified
|
set nomodified
|
||||||
exe "normal \<C-V>$gf"
|
exe "normal \<C-V>$gf"
|
||||||
call assert_equal('X', bufname())
|
call assert_equal('Xvisual', bufname())
|
||||||
bwipe!
|
bwipe!
|
||||||
endfor
|
endfor
|
||||||
let &enc = save_enc
|
let &enc = save_enc
|
||||||
call delete('X')
|
|
||||||
|
|
||||||
" line number in visual area is used for file name
|
" line number in visual area is used for file name
|
||||||
if has('unix')
|
if has('unix')
|
||||||
bwipe!
|
bwipe!
|
||||||
call writefile([], "Xtest_gf_visual:3")
|
call writefile([], "Xtest_gf_visual:3", 'D')
|
||||||
new
|
new
|
||||||
call setline(1, 'XXXtest_gf_visual:3XXX')
|
call setline(1, 'XXXtest_gf_visual:3XXX')
|
||||||
norm! 0ttvtXgF
|
norm! 0ttvtXgF
|
||||||
call assert_equal('Xtest_gf_visual:3', bufname('%'))
|
call assert_equal('Xtest_gf_visual:3', bufname('%'))
|
||||||
call delete('Xtest_gf_visual:3')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
bwipe!
|
bwipe!
|
||||||
call delete('Xtest_gf_visual')
|
|
||||||
set hidden&
|
set hidden&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@ -254,7 +249,7 @@ endfunc
|
|||||||
func Test_gf_subdirs_wildcard()
|
func Test_gf_subdirs_wildcard()
|
||||||
let cwd = getcwd()
|
let cwd = getcwd()
|
||||||
let dir = 'Xtestgf_dir'
|
let dir = 'Xtestgf_dir'
|
||||||
call mkdir(dir)
|
call mkdir(dir, 'R')
|
||||||
call chdir(dir)
|
call chdir(dir)
|
||||||
for i in range(300)
|
for i in range(300)
|
||||||
call mkdir(i)
|
call mkdir(i)
|
||||||
@ -269,7 +264,6 @@ func Test_gf_subdirs_wildcard()
|
|||||||
call assert_equal('99', fnamemodify(bufname(''), ":t"))
|
call assert_equal('99', fnamemodify(bufname(''), ":t"))
|
||||||
|
|
||||||
call chdir(cwd)
|
call chdir(cwd)
|
||||||
call delete(dir, 'rf')
|
|
||||||
set path&
|
set path&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ func Test_interrupt_global()
|
|||||||
cnoremap ; <Cmd>sleep 10<CR>
|
cnoremap ; <Cmd>sleep 10<CR>
|
||||||
call setline(1, repeat(['foo'], 5))
|
call setline(1, repeat(['foo'], 5))
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xtest_interrupt_global')
|
call writefile(lines, 'Xtest_interrupt_global', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_interrupt_global', {'rows': 6})
|
let buf = RunVimInTerminal('-S Xtest_interrupt_global', {'rows': 6})
|
||||||
|
|
||||||
call term_sendkeys(buf, ":g/foo/norm :\<C-V>;\<CR>")
|
call term_sendkeys(buf, ":g/foo/norm :\<C-V>;\<CR>")
|
||||||
@ -133,7 +133,6 @@ func Test_interrupt_global()
|
|||||||
call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 5))}, 1000)
|
call WaitForAssert({-> assert_match('Interrupted', term_getline(buf, 5))}, 1000)
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_interrupt_global')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -157,12 +157,12 @@ endfunc
|
|||||||
func Test_gui_read_stdin()
|
func Test_gui_read_stdin()
|
||||||
CheckUnix
|
CheckUnix
|
||||||
|
|
||||||
call writefile(['some', 'lines'], 'Xstdin')
|
call writefile(['some', 'lines'], 'Xstdin', 'D')
|
||||||
let script =<< trim END
|
let script =<< trim END
|
||||||
call writefile(getline(1, '$'), 'XstdinOK')
|
call writefile(getline(1, '$'), 'XstdinOK')
|
||||||
qa!
|
qa!
|
||||||
END
|
END
|
||||||
call writefile(script, 'Xscript')
|
call writefile(script, 'Xscript', 'D')
|
||||||
|
|
||||||
" Cannot use --not-a-term here, the "reading from stdin" message would not be
|
" Cannot use --not-a-term here, the "reading from stdin" message would not be
|
||||||
" displayed.
|
" displayed.
|
||||||
@ -176,9 +176,7 @@ func Test_gui_read_stdin()
|
|||||||
call system('cat Xstdin | ' .. vimcmd .. ' -f -g -S Xscript -')
|
call system('cat Xstdin | ' .. vimcmd .. ' -f -g -S Xscript -')
|
||||||
call assert_equal(['some', 'lines'], readfile('XstdinOK'))
|
call assert_equal(['some', 'lines'], readfile('XstdinOK'))
|
||||||
|
|
||||||
call delete('Xstdin')
|
|
||||||
call delete('XstdinOK')
|
call delete('XstdinOK')
|
||||||
call delete('Xscript')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_set_background()
|
func Test_set_background()
|
||||||
@ -853,33 +851,27 @@ endfunc
|
|||||||
" Test "vim -g" and also the GUIEnter autocommand.
|
" Test "vim -g" and also the GUIEnter autocommand.
|
||||||
func Test_gui_dash_g()
|
func Test_gui_dash_g()
|
||||||
let cmd = GetVimCommand('Xscriptgui')
|
let cmd = GetVimCommand('Xscriptgui')
|
||||||
call writefile([""], "Xtestgui")
|
call writefile([""], "Xtestgui", 'D')
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
|
au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
|
||||||
au GUIEnter * qall
|
au GUIEnter * qall
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xscriptgui')
|
call writefile(lines, 'Xscriptgui', 'D')
|
||||||
call system(cmd . ' -g')
|
call system(cmd . ' -g')
|
||||||
call WaitForAssert({-> assert_equal(['insertmode: 0'], readfile('Xtestgui'))})
|
call WaitForAssert({-> assert_equal(['insertmode: 0'], readfile('Xtestgui'))})
|
||||||
|
|
||||||
call delete('Xscriptgui')
|
|
||||||
call delete('Xtestgui')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test "vim -7" and also the GUIEnter autocommand.
|
" Test "vim -7" and also the GUIEnter autocommand.
|
||||||
func Test_gui_dash_y()
|
func Test_gui_dash_y()
|
||||||
let cmd = GetVimCommand('Xscriptgui')
|
let cmd = GetVimCommand('Xscriptgui')
|
||||||
call writefile([""], "Xtestgui")
|
call writefile([""], "Xtestgui", 'D')
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
|
au GUIEnter * call writefile(["insertmode: " . &insertmode], "Xtestgui")
|
||||||
au GUIEnter * qall
|
au GUIEnter * qall
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xscriptgui')
|
call writefile(lines, 'Xscriptgui', 'D')
|
||||||
call system(cmd . ' -y')
|
call system(cmd . ' -y')
|
||||||
call WaitForAssert({-> assert_equal(['insertmode: 1'], readfile('Xtestgui'))})
|
call WaitForAssert({-> assert_equal(['insertmode: 1'], readfile('Xtestgui'))})
|
||||||
|
|
||||||
call delete('Xscriptgui')
|
|
||||||
call delete('Xtestgui')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for "!" option in 'guioptions'. Use a terminal for running external
|
" Test for "!" option in 'guioptions'. Use a terminal for running external
|
||||||
@ -1412,7 +1404,7 @@ func Test_gui_drop_files()
|
|||||||
%argdelete
|
%argdelete
|
||||||
" pressing shift when dropping files should change directory
|
" pressing shift when dropping files should change directory
|
||||||
let save_cwd = getcwd()
|
let save_cwd = getcwd()
|
||||||
call mkdir('Xdropdir1')
|
call mkdir('Xdropdir1', 'R')
|
||||||
call writefile([], 'Xdropdir1/Xfile1')
|
call writefile([], 'Xdropdir1/Xfile1')
|
||||||
call writefile([], 'Xdropdir1/Xfile2')
|
call writefile([], 'Xdropdir1/Xfile2')
|
||||||
let d = #{files: ['Xdropdir1/Xfile1', 'Xdropdir1/Xfile2'], row: 1, col: 1,
|
let d = #{files: ['Xdropdir1/Xfile1', 'Xdropdir1/Xfile2'], row: 1, col: 1,
|
||||||
@ -1441,7 +1433,6 @@ func Test_gui_drop_files()
|
|||||||
call assert_equal('', @%)
|
call assert_equal('', @%)
|
||||||
%bw!
|
%bw!
|
||||||
%argdelete
|
%argdelete
|
||||||
call delete('Xdropdir1', 'rf')
|
|
||||||
|
|
||||||
" drop files in the command line. The GUI drop files adds the file names to
|
" drop files in the command line. The GUI drop files adds the file names to
|
||||||
" the low level input buffer. So need to use a cmdline map and feedkeys()
|
" the low level input buffer. So need to use a cmdline map and feedkeys()
|
||||||
|
@ -77,7 +77,7 @@ func Test_help_keyword()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_help_local_additions()
|
func Test_help_local_additions()
|
||||||
call mkdir('Xruntime/doc', 'p')
|
call mkdir('Xruntime/doc', 'pR')
|
||||||
call writefile(['*mydoc.txt* my awesome doc'], 'Xruntime/doc/mydoc.txt')
|
call writefile(['*mydoc.txt* my awesome doc'], 'Xruntime/doc/mydoc.txt')
|
||||||
call writefile(['*mydoc-ext.txt* my extended awesome doc'], 'Xruntime/doc/mydoc-ext.txt')
|
call writefile(['*mydoc-ext.txt* my extended awesome doc'], 'Xruntime/doc/mydoc-ext.txt')
|
||||||
let rtp_save = &rtp
|
let rtp_save = &rtp
|
||||||
@ -91,7 +91,7 @@ func Test_help_local_additions()
|
|||||||
call delete('Xruntime/doc/mydoc-ext.txt')
|
call delete('Xruntime/doc/mydoc-ext.txt')
|
||||||
close
|
close
|
||||||
|
|
||||||
call mkdir('Xruntime-ja/doc', 'p')
|
call mkdir('Xruntime-ja/doc', 'pR')
|
||||||
call writefile(["local-additions\thelp.jax\t/*local-additions*"], 'Xruntime-ja/doc/tags-ja')
|
call writefile(["local-additions\thelp.jax\t/*local-additions*"], 'Xruntime-ja/doc/tags-ja')
|
||||||
call writefile(['*help.txt* This is jax file', '',
|
call writefile(['*help.txt* This is jax file', '',
|
||||||
\ 'LOCAL ADDITIONS: *local-additions*', ''], 'Xruntime-ja/doc/help.jax')
|
\ 'LOCAL ADDITIONS: *local-additions*', ''], 'Xruntime-ja/doc/help.jax')
|
||||||
@ -116,8 +116,6 @@ func Test_help_local_additions()
|
|||||||
\ ], lines)
|
\ ], lines)
|
||||||
close
|
close
|
||||||
|
|
||||||
call delete('Xruntime', 'rf')
|
|
||||||
call delete('Xruntime-ja', 'rf')
|
|
||||||
let &rtp = rtp_save
|
let &rtp = rtp_save
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@ -129,7 +127,7 @@ endfunc
|
|||||||
" Test for the :helptags command
|
" Test for the :helptags command
|
||||||
" NOTE: if you run tests as root this will fail. Don't run tests as root!
|
" NOTE: if you run tests as root this will fail. Don't run tests as root!
|
||||||
func Test_helptag_cmd()
|
func Test_helptag_cmd()
|
||||||
call mkdir('Xtagdir/a/doc', 'p')
|
call mkdir('Xtagdir/a/doc', 'pR')
|
||||||
|
|
||||||
" No help file to process in the directory
|
" No help file to process in the directory
|
||||||
call assert_fails('helptags Xtagdir', 'E151:')
|
call assert_fails('helptags Xtagdir', 'E151:')
|
||||||
@ -151,8 +149,6 @@ func Test_helptag_cmd()
|
|||||||
" Duplicate tags in the help file
|
" Duplicate tags in the help file
|
||||||
call writefile(['*tag1*', '*tag1*', '*tag2*'], 'Xtagdir/a/doc/sample.txt')
|
call writefile(['*tag1*', '*tag1*', '*tag2*'], 'Xtagdir/a/doc/sample.txt')
|
||||||
call assert_fails('helptags Xtagdir', 'E154:')
|
call assert_fails('helptags Xtagdir', 'E154:')
|
||||||
|
|
||||||
call delete('Xtagdir', 'rf')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_helptag_cmd_readonly()
|
func Test_helptag_cmd_readonly()
|
||||||
@ -160,7 +156,7 @@ func Test_helptag_cmd_readonly()
|
|||||||
CheckNotRoot
|
CheckNotRoot
|
||||||
|
|
||||||
" Read-only tags file
|
" Read-only tags file
|
||||||
call mkdir('Xrodir/doc', 'p')
|
call mkdir('Xrodir/doc', 'pR')
|
||||||
call writefile([''], 'Xrodir/doc/tags')
|
call writefile([''], 'Xrodir/doc/tags')
|
||||||
call writefile([], 'Xrodir/doc/sample.txt')
|
call writefile([], 'Xrodir/doc/sample.txt')
|
||||||
call setfperm('Xrodir/doc/tags', 'r-xr--r--')
|
call setfperm('Xrodir/doc/tags', 'r-xr--r--')
|
||||||
@ -178,7 +174,6 @@ func Test_helptag_cmd_readonly()
|
|||||||
call writefile([], 'Xrodir/b/doc/sample.txt')
|
call writefile([], 'Xrodir/b/doc/sample.txt')
|
||||||
call setfperm('Xrodir/b/doc/sample.txt', '-w-------')
|
call setfperm('Xrodir/b/doc/sample.txt', '-w-------')
|
||||||
call assert_fails('helptags Xrodir', 'E153:', getfperm('Xrodir/b/doc/sample.txt'))
|
call assert_fails('helptags Xrodir', 'E153:', getfperm('Xrodir/b/doc/sample.txt'))
|
||||||
call delete('Xrodir', 'rf')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for setting the 'helpheight' option in the help window
|
" Test for setting the 'helpheight' option in the help window
|
||||||
|
@ -540,7 +540,7 @@ func Test_cursorline_after_yank()
|
|||||||
call writefile([
|
call writefile([
|
||||||
\ 'set cul rnu',
|
\ 'set cul rnu',
|
||||||
\ 'call setline(1, ["","1","2","3",""])',
|
\ 'call setline(1, ["","1","2","3",""])',
|
||||||
\ ], 'Xtest_cursorline_yank')
|
\ ], 'Xtest_cursorline_yank', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8})
|
let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8})
|
||||||
call TermWait(buf)
|
call TermWait(buf)
|
||||||
call term_sendkeys(buf, "Gy3k")
|
call term_sendkeys(buf, "Gy3k")
|
||||||
@ -551,7 +551,6 @@ func Test_cursorline_after_yank()
|
|||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_cursorline_yank')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" test for issue #4862
|
" test for issue #4862
|
||||||
@ -580,7 +579,7 @@ func Test_cursorline_with_visualmode()
|
|||||||
call writefile([
|
call writefile([
|
||||||
\ 'set cul',
|
\ 'set cul',
|
||||||
\ 'call setline(1, repeat(["abc"], 50))',
|
\ 'call setline(1, repeat(["abc"], 50))',
|
||||||
\ ], 'Xtest_cursorline_with_visualmode')
|
\ ], 'Xtest_cursorline_with_visualmode', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_cursorline_with_visualmode', {'rows': 12})
|
let buf = RunVimInTerminal('-S Xtest_cursorline_with_visualmode', {'rows': 12})
|
||||||
call TermWait(buf)
|
call TermWait(buf)
|
||||||
call term_sendkeys(buf, "V\<C-f>kkkjk")
|
call term_sendkeys(buf, "V\<C-f>kkkjk")
|
||||||
@ -589,7 +588,6 @@ func Test_cursorline_with_visualmode()
|
|||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_cursorline_with_visualmode')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_cursorcolumn_insert_on_tab()
|
func Test_cursorcolumn_insert_on_tab()
|
||||||
@ -600,7 +598,7 @@ func Test_cursorcolumn_insert_on_tab()
|
|||||||
set cursorcolumn
|
set cursorcolumn
|
||||||
call cursor(2, 2)
|
call cursor(2, 2)
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xcuc_insert_on_tab')
|
call writefile(lines, 'Xcuc_insert_on_tab', 'D')
|
||||||
|
|
||||||
let buf = RunVimInTerminal('-S Xcuc_insert_on_tab', #{rows: 8})
|
let buf = RunVimInTerminal('-S Xcuc_insert_on_tab', #{rows: 8})
|
||||||
call TermWait(buf)
|
call TermWait(buf)
|
||||||
@ -619,7 +617,6 @@ func Test_cursorcolumn_insert_on_tab()
|
|||||||
call VerifyScreenDump(buf, 'Test_cursorcolumn_insert_on_tab_2', {})
|
call VerifyScreenDump(buf, 'Test_cursorcolumn_insert_on_tab_2', {})
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xcuc_insert_on_tab')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_cursorcolumn_callback()
|
func Test_cursorcolumn_callback()
|
||||||
@ -637,14 +634,13 @@ func Test_cursorcolumn_callback()
|
|||||||
|
|
||||||
call timer_start(300, 'Func')
|
call timer_start(300, 'Func')
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xcuc_timer')
|
call writefile(lines, 'Xcuc_timer', 'D')
|
||||||
|
|
||||||
let buf = RunVimInTerminal('-S Xcuc_timer', #{rows: 8})
|
let buf = RunVimInTerminal('-S Xcuc_timer', #{rows: 8})
|
||||||
call TermWait(buf, 310)
|
call TermWait(buf, 310)
|
||||||
call VerifyScreenDump(buf, 'Test_cursorcolumn_callback_1', {})
|
call VerifyScreenDump(buf, 'Test_cursorcolumn_callback_1', {})
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xcuc_timer')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_wincolor()
|
func Test_wincolor()
|
||||||
@ -663,7 +659,7 @@ func Test_wincolor()
|
|||||||
call prop_add(6, 12, {"type": "foo", "end_col": 15})
|
call prop_add(6, 12, {"type": "foo", "end_col": 15})
|
||||||
/here
|
/here
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xtest_wincolor')
|
call writefile(lines, 'Xtest_wincolor', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
|
let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
|
||||||
call TermWait(buf)
|
call TermWait(buf)
|
||||||
call term_sendkeys(buf, "2G5lvj")
|
call term_sendkeys(buf, "2G5lvj")
|
||||||
@ -674,7 +670,6 @@ func Test_wincolor()
|
|||||||
" clean up
|
" clean up
|
||||||
call term_sendkeys(buf, "\<Esc>")
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_wincolor')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_wincolor_listchars()
|
func Test_wincolor_listchars()
|
||||||
@ -689,7 +684,7 @@ func Test_wincolor_listchars()
|
|||||||
call matchadd('Conceal', 'text')
|
call matchadd('Conceal', 'text')
|
||||||
normal 2G5zl
|
normal 2G5zl
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xtest_wincolorlcs')
|
call writefile(lines, 'Xtest_wincolorlcs', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_wincolorlcs', {'rows': 8})
|
let buf = RunVimInTerminal('-S Xtest_wincolorlcs', {'rows': 8})
|
||||||
|
|
||||||
call VerifyScreenDump(buf, 'Test_wincolor_lcs', {})
|
call VerifyScreenDump(buf, 'Test_wincolor_lcs', {})
|
||||||
@ -697,7 +692,6 @@ func Test_wincolor_listchars()
|
|||||||
" clean up
|
" clean up
|
||||||
call term_sendkeys(buf, "\<Esc>")
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_wincolorlcs')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_colorcolumn()
|
func Test_colorcolumn()
|
||||||
@ -714,14 +708,13 @@ func Test_colorcolumn()
|
|||||||
wincmd w
|
wincmd w
|
||||||
buf X
|
buf X
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xtest_colorcolumn')
|
call writefile(lines, 'Xtest_colorcolumn', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_colorcolumn', {'rows': 10})
|
let buf = RunVimInTerminal('-S Xtest_colorcolumn', {'rows': 10})
|
||||||
call term_sendkeys(buf, ":\<CR>")
|
call term_sendkeys(buf, ":\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_colorcolumn_1', {})
|
call VerifyScreenDump(buf, 'Test_colorcolumn_1', {})
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_colorcolumn')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_colorcolumn_bri()
|
func Test_colorcolumn_bri()
|
||||||
@ -731,14 +724,13 @@ func Test_colorcolumn_bri()
|
|||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
call setline(1, 'The quick brown fox jumped over the lazy dogs')
|
call setline(1, 'The quick brown fox jumped over the lazy dogs')
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xtest_colorcolumn_bri')
|
call writefile(lines, 'Xtest_colorcolumn_bri', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_colorcolumn_bri', {'rows': 10,'columns': 40})
|
let buf = RunVimInTerminal('-S Xtest_colorcolumn_bri', {'rows': 10,'columns': 40})
|
||||||
call term_sendkeys(buf, ":set co=40 linebreak bri briopt=shift:2 cc=40,41,43\<CR>")
|
call term_sendkeys(buf, ":set co=40 linebreak bri briopt=shift:2 cc=40,41,43\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_colorcolumn_2', {})
|
call VerifyScreenDump(buf, 'Test_colorcolumn_2', {})
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_colorcolumn_bri')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_colorcolumn_sbr()
|
func Test_colorcolumn_sbr()
|
||||||
@ -748,14 +740,13 @@ func Test_colorcolumn_sbr()
|
|||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
call setline(1, 'The quick brown fox jumped over the lazy dogs')
|
call setline(1, 'The quick brown fox jumped over the lazy dogs')
|
||||||
END
|
END
|
||||||
call writefile(lines, 'Xtest_colorcolumn_srb')
|
call writefile(lines, 'Xtest_colorcolumn_srb', 'D')
|
||||||
let buf = RunVimInTerminal('-S Xtest_colorcolumn_srb', {'rows': 10,'columns': 40})
|
let buf = RunVimInTerminal('-S Xtest_colorcolumn_srb', {'rows': 10,'columns': 40})
|
||||||
call term_sendkeys(buf, ":set co=40 showbreak=+++>\\ cc=40,41,43\<CR>")
|
call term_sendkeys(buf, ":set co=40 showbreak=+++>\\ cc=40,41,43\<CR>")
|
||||||
call VerifyScreenDump(buf, 'Test_colorcolumn_3', {})
|
call VerifyScreenDump(buf, 'Test_colorcolumn_3', {})
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('Xtest_colorcolumn_srb')
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" This test must come before the Test_cursorline test, as it appears this
|
" This test must come before the Test_cursorline test, as it appears this
|
||||||
|
@ -699,6 +699,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
619,
|
||||||
/**/
|
/**/
|
||||||
618,
|
618,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user