cmd/tests: Test nested loop variables expansion.

Based on a patch by Dimitry Sokolov.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
Eric Pouech 2024-05-06 11:06:07 +02:00 committed by Alexandre Julliard
parent 14bdf6e725
commit 232f282585
2 changed files with 15 additions and 0 deletions

View file

@ -1403,6 +1403,18 @@ goto :endForTestFun2
echo %1 %2
goto :eof
:endForTestFun2
echo --- nested FORs and args tempering
set "WINE_ARGS= -foo=bar -x=y"
:test_for_loop_params_parse
for /F "tokens=1,* delims= " %%a in ("%WINE_ARGS%") do (
for /F "tokens=1,2 delims==" %%1 in ("%%a") do (
echo inner argument {%%1, %%2}
)
set "WINE_ARGS=%%b"
goto :test_for_loop_params_parse
)
set "WINE_ARGS="
mkdir foobar & cd foobar
mkdir foo
mkdir bar

View file

@ -1000,6 +1000,9 @@ A C
A D
B C
B D
--- nested FORs and args tempering
@todo_wine@inner argument {-foo, bar}
@todo_wine@inner argument {-x, y}
--- basic wildcards
bazbaz
--- wildcards in subdirs