mirror of
https://github.com/neovim/neovim.git
synced 2025-10-18 07:41:51 +00:00
test: align Test_shell_options, Test_shellslash with Nvim default
'shellxquote' Nvim default was adjusted in: 131aad953c
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.
This commit is contained in:
@@ -22,22 +22,7 @@ func Test_shell_options()
|
|||||||
\ ['tcsh', '-c', '|& tee', '', '>&', '', '']]
|
\ ['tcsh', '-c', '|& tee', '', '>&', '', '']]
|
||||||
endif
|
endif
|
||||||
if has('win32')
|
if has('win32')
|
||||||
let shells += [['cmd', '/c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', ''],
|
let shells += [['cmd', '/s /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', '>&', '', '>&', '"&|<>()@^', '"']]
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" start a new Vim instance with 'shell' set to each of the supported shells
|
" 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
|
" The shell and cmdflag, and expected slash in tempname with shellslash set or
|
||||||
" unset. The assert checks the file separator before the leafname.
|
" unset. The assert checks the file separator before the leafname.
|
||||||
" ".*\\\\[^\\\\]*$"
|
" ".*\\\\[^\\\\]*$"
|
||||||
let shells = [['cmd', '/c', '\\', '/'],
|
let shells = [['cmd', '/c', '/', '/'],
|
||||||
\ ['powershell', '-Command', '\\', '/'],
|
\ ['powershell', '-Command', '/', '/'],
|
||||||
\ ['sh', '-c', '/', '/']]
|
\ ['sh', '-c', '/', '/']]
|
||||||
for e in shells
|
for e in shells
|
||||||
exe 'set shell=' .. e[0] .. ' | set shellcmdflag=' .. e[1]
|
exe 'set shell=' .. e[0] .. ' | set shellcmdflag=' .. e[1]
|
||||||
|
Reference in New Issue
Block a user