cmd.exe: Fix parsing of && between quotes.
Signed-off-by: Francesco Noferi <lolisamurai@tfwno.gf> Signed-off-by: Myah Caron <qsniyg@protonmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a26bb7b2ef
commit
fc1bb9aff5
|
@ -178,6 +178,10 @@ rem cond 5 - string between quotes must be name of executable
|
||||||
cmd /c "say five"
|
cmd /c "say five"
|
||||||
echo @echo 5 >"say five.bat"
|
echo @echo 5 >"say five.bat"
|
||||||
cmd /c "say five"
|
cmd /c "say five"
|
||||||
|
rem cond 6 - && between quotes
|
||||||
|
cd .&&"cmd.exe" /c "echo hi"
|
||||||
|
cd "."&&cmd.exe /c "echo hi"
|
||||||
|
cd "."&&"cmd.exe" /c "echo hi"
|
||||||
|
|
||||||
echo ------- Testing CMD /C qualifier treatment ------------
|
echo ------- Testing CMD /C qualifier treatment ------------
|
||||||
rem no need for space after /c
|
rem no need for space after /c
|
||||||
|
|
|
@ -87,6 +87,9 @@ Passed
|
||||||
2@space@
|
2@space@
|
||||||
0@space@
|
0@space@
|
||||||
5@space@
|
5@space@
|
||||||
|
hi
|
||||||
|
hi
|
||||||
|
hi
|
||||||
------- Testing CMD /C qualifier treatment ------------
|
------- Testing CMD /C qualifier treatment ------------
|
||||||
0@space@
|
0@space@
|
||||||
1@space@
|
1@space@
|
||||||
|
|
|
@ -1792,7 +1792,8 @@ static BOOL WCMD_IsEndQuote(const WCHAR *quote, int quoteIndex)
|
||||||
|
|
||||||
/* Quote counting ends at EOL, redirection, space or pipe if current quote is complete */
|
/* Quote counting ends at EOL, redirection, space or pipe if current quote is complete */
|
||||||
else if(((quoteCount % 2) == 0)
|
else if(((quoteCount % 2) == 0)
|
||||||
&& ((quote[i] == '<') || (quote[i] == '>') || (quote[i] == '|') || (quote[i] == ' ')))
|
&& ((quote[i] == '<') || (quote[i] == '>') || (quote[i] == '|') || (quote[i] == ' ') ||
|
||||||
|
(quote[i] == '&')))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue