0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.0211: test for ANSI colors fails without an "ls" command

Problem:    Test for ANSI colors fails without an "ls" command.
Solution:   Use "dir". (Ken Takata, closes #5582)
This commit is contained in:
Bram Moolenaar
2020-02-05 20:10:33 +01:00
parent eed3571fe0
commit 94255df057
2 changed files with 10 additions and 3 deletions

View File

@@ -1965,7 +1965,7 @@ func Test_range()
" settagstack()
call settagstack(1, #{items : range(4)})
" sign_define()
call assert_fails("call sign_define(range(5))", "E715:")
call assert_fails("call sign_placelist(range(5))", "E715:")
@@ -1997,12 +1997,17 @@ func Test_range()
set tagfunc=TagFunc
call assert_fails("call taglist('asdf')", 'E987:')
set tagfunc=
" term_start()
if has('terminal') && has('termguicolors')
call assert_fails('call term_start(range(3, 4))', 'E474:')
let g:terminal_ansi_colors = range(16)
call assert_fails('call term_start("ls", #{term_finish: "close"})', 'E475:')
if has('win32')
let cmd = "cmd /c dir"
else
let cmd = "ls"
endif
call assert_fails('call term_start("' .. cmd .. '", #{term_finish: "close"})', 'E475:')
unlet g:terminal_ansi_colors
endif