aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-26 08:57:59 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-26 12:08:50 +0800
commit0aaef07224eb4243c944765cfc6692b08cbe8750 (patch)
tree7519fdbc30189dc7b0c3e2e7913ab0ac9bb1bf0a /src
parent3c5b43580163340209aa13c731e5a34ff3c5deb4 (diff)
downloadrneovim-0aaef07224eb4243c944765cfc6692b08cbe8750.tar.gz
rneovim-0aaef07224eb4243c944765cfc6692b08cbe8750.tar.bz2
rneovim-0aaef07224eb4243c944765cfc6692b08cbe8750.zip
vim-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 vim/vim#5582) https://github.com/vim/vim/commit/94255df057afa0b7dde77612f3274d4440871bd1 Cherry-pick test_functions.vim change from patch 8.2.0186.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_functions.vim13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index b9446a7a87..871aab7ff1 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -2128,7 +2128,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:")
@@ -2161,12 +2161,17 @@ func Test_range()
set tagfunc=TagFunc
call assert_fails("call taglist('asdf')", 'E987:')
set tagfunc=
-
+
" term_start()
- if has('terminal')
+ 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