aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-01-16 10:20:35 +0100
committerJustin M. Keyes <justinkz@gmail.com>2023-01-16 11:27:35 +0100
commite5b9485eac1f6d5432d55c04d1b70c0740e22f92 (patch)
tree1cfb07648015fe0acb6748fb82680a1125190e76
parent7360dda670d3702a2f6a8d4b65180a243811695b (diff)
downloadrneovim-e5b9485eac1f6d5432d55c04d1b70c0740e22f92.tar.gz
rneovim-e5b9485eac1f6d5432d55c04d1b70c0740e22f92.tar.bz2
rneovim-e5b9485eac1f6d5432d55c04d1b70c0740e22f92.zip
test: align Test_shell_options, Test_shellslash with Nvim default
'shellxquote' Nvim default was adjusted in: 131aad953c007d382cbff1d2560471b29975da87 The use of "/s" is different than Vim, and may avoid the need for `shellxquote="&|<>()@^`. For the other shells, Nvim intentionally does not fiddle with the various "shell*" options if 'shell' is set by the user: if the user sets 'shell', they are expected to set other "shell*" options correctly.
-rw-r--r--src/nvim/testdir/test_shell.vim21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/nvim/testdir/test_shell.vim b/src/nvim/testdir/test_shell.vim
index 2166308aea..8b9c7a5b12 100644
--- a/src/nvim/testdir/test_shell.vim
+++ b/src/nvim/testdir/test_shell.vim
@@ -22,22 +22,7 @@ func Test_shell_options()
\ ['tcsh', '-c', '|& tee', '', '>&', '', '']]
endif
if has('win32')
- let shells += [['cmd', '/c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', ''],
- \ ['cmd.exe', '/c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '('],
- \ ['powershell.exe', '-Command', '2>&1 | Out-File -Encoding default',
- \ '', '2>&1 | Out-File -Encoding default', '"&|<>()@^', '"'],
- \ ['powershell', '-Command', '2>&1 | Out-File -Encoding default', '',
- \ '2>&1 | Out-File -Encoding default', '"&|<>()@^', '"'],
- \ ['sh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['ksh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['mksh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['pdksh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['zsh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['zsh-beta.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['bash.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['dash.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
- \ ['csh.exe', '-c', '>&', '', '>&', '"&|<>()@^', '"'],
- \ ['tcsh.exe', '-c', '>&', '', '>&', '"&|<>()@^', '"']]
+ let shells += [['cmd', '/s /c', '>%s 2>&1', '', '>%s 2>&1', '', '"']]
endif
" start a new Vim instance with 'shell' set to each of the supported shells
@@ -148,8 +133,8 @@ func Test_shellslash()
" The shell and cmdflag, and expected slash in tempname with shellslash set or
" unset. The assert checks the file separator before the leafname.
" ".*\\\\[^\\\\]*$"
- let shells = [['cmd', '/c', '\\', '/'],
- \ ['powershell', '-Command', '\\', '/'],
+ let shells = [['cmd', '/c', '/', '/'],
+ \ ['powershell', '-Command', '/', '/'],
\ ['sh', '-c', '/', '/']]
for e in shells
exe 'set shell=' .. e[0] .. ' | set shellcmdflag=' .. e[1]