@@ -61,21 +61,21 @@ func Test_shell_options()
6161 for e in shells
6262 exe ' set shell=' .. e [0 ]
6363 if e [0 ] = ~# ' .*csh$' || e [0 ] = ~# ' .*csh.exe$'
64- let str1 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\ !%# \\ '"
65- let str2 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\\\ !\\ %\\ # \\ '"
64+ let str1 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\ !%# \\ '\\ '' \\\\ ! \\ % \\ #' "
65+ let str2 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\\\ !\\ %\\ # \\ '\\ '' \\\\\\ ! \\\\ % \\\\ #' "
6666 elseif e [0 ] = ~# ' .*powershell$' || e [0 ] = ~# ' .*powershell.exe$'
6767 \ || e [0 ] = ~# ' .*pwsh$' || e [0 ] = ~# ' .*pwsh.exe$'
68- let str1 = " 'cmd \" arg1\" ''arg2'' !%# \\ '"
69- let str2 = " 'cmd \" arg1\" ''arg2'' \\ !\\ %\\ # \\ '"
68+ let str1 = " 'cmd \" arg1\" ''arg2'' !%# \\ '' \\ ! \\ % \\ #' "
69+ let str2 = " 'cmd \" arg1\" ''arg2'' \\ !\\ %\\ # \\ '' \\\\ ! \\\\ % \\\\ #' "
7070 elseif e [0 ] = ~# ' .*fish$' || e [0 ] = ~# ' .*fish.exe$'
71- let str1 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' !%# \\\\ '"
72- let str2 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\ !\\ %\\ # \\\\ '"
71+ let str1 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' !%# \\\\ '\\ '' \\\\ ! \\\\ % \\\\ #' "
72+ let str2 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\ !\\ %\\ # \\\\ '\\ '' \\\\\\ ! \\\\\\ % \\\\\\ #' "
7373 else
74- let str1 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' !%# \\ '"
75- let str2 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\ !\\ %\\ # \\ '"
74+ let str1 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' !%# \\ '\\ '' \\ ! \\ % \\ #' "
75+ let str2 = " 'cmd \" arg1\" '\\ ''arg2'\\ '' \\ !\\ %\\ # \\ '\\ '' \\\\ ! \\\\ % \\\\ #' "
7676 endif
77- call assert_equal (str1, shellescape (" cmd \" arg1\" 'arg2' !%# \\ " ), e [0 ])
78- call assert_equal (str2, shellescape (" cmd \" arg1\" 'arg2' !%# \\ " , 1 ), e [0 ])
77+ call assert_equal (str1, shellescape (" cmd \" arg1\" 'arg2' !%# \\ ' \\ ! \\ % \\ # " ), e [0 ])
78+ call assert_equal (str2, shellescape (" cmd \" arg1\" 'arg2' !%# \\ ' \\ ! \\ % \\ # " , 1 ), e [0 ])
7979
8080 " Try running an external command with the shell.
8181 if executable (e [0 ])
0 commit comments