mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-18 09:26:17 +00:00
cmd/tests: Test delayed expansion with spaces in IF and FOR.
Based on a patch by Alex Henrie. Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
232f282585
commit
8bbd48bfd8
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue