Commit 8bbd48bf authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

cmd/tests: Test delayed expansion with spaces in IF and FOR.

Based on a patch by Alex Henrie. Signed-off-by: 's avatarEric Pouech <epouech@codeweavers.com>
parent 232f2825
......@@ -744,6 +744,17 @@ echo '%~xs1'
goto :eof
:endEchoFuns
setlocal EnableDelayedExpansion
set WINE_FOO=foo bar
for %%i in ("!WINE_FOO!") do echo %%i
for %%i in (!WINE_FOO!) do echo %%i
rem tests disabled for now... wine's cmd loops endlessly here
rem set WINE_FOO=4 4 4
rem for /l %%i in (!WINE_FOO!) do echo %%i
rem set WINE_FOO=4
rem for /l %%i in (1 2 !WINE_FOO!) do echo %%i
setlocal DisableDelayedExpansion
echo --- in digit variables
for %%0 in (a b) do echo %%0 %%1 %%2
echo ------------ Testing parameter zero ------------
......@@ -794,6 +805,12 @@ set WINE_FOO=foo
echo %WINE_FOO%
echo !WINE_FOO!
set WINE_FOO=
setlocal EnableDelayedExpansion
set WINE_FOO=foo bar
if !WINE_FOO!=="" (echo empty) else echo not empty
setlocal DisableDelayedExpansion
echo --- using /V cmd flag
echo @echo off> tmp.cmd
echo set WINE_FOO=foo>> tmp.cmd
......
......@@ -600,6 +600,9 @@ N
@drive@
''
'.eh'@or_broken@''
"foo bar"
@todo_wine@foo
@todo_wine@bar
--- in digit variables
@todo_wine@a %1 %2
@todo_wine@b %1 %2
......@@ -621,6 +624,7 @@ bar@or_broken@foo
0@or_broken@1
foo
!WINE_FOO!
@todo_wine@not empty
--- using /V cmd flag
foo
foo@or_broken@!WINE_FOO!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment