neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit e5b9485eac1f6d5432d55c04d1b70c0740e22f92
parent 7360dda670d3702a2f6a8d4b65180a243811695b
Author: Justin M. Keyes <justinkz@gmail.com>
Date:   Mon, 16 Jan 2023 10:20:35 +0100

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.

Diffstat:
Msrc/nvim/testdir/test_shell.vim | 21+++------------------
1 file changed, 3 insertions(+), 18 deletions(-)

diff --git 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]