cmd: Add more tests about CALL and variable expansion.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
Eric Pouech 2024-06-25 08:53:46 +02:00 committed by Alexandre Julliard
parent e727324e15
commit 560521c14b
2 changed files with 27 additions and 0 deletions

View file

@ -2785,6 +2785,27 @@ call if 1==1 (
echo ... and else!
)
call call call echo passed
set WINE_FOO=WINE_BAR
set WINE_BAR=abc
call echo %%%WINE_FOO%%%
call cmd.exe /c echo %%%WINE_FOO%%%
call echo %%%%%WINE_FOO%%%%%
call cmd.exe /c echo %%%%%WINE_FOO%%%%%
set WINE_BAR=abc
set WINE_FOO=%%WINE_BAR%%
call :call_expand %WINE_FOO% %%WINE_FOO%% %%%WINE_FOO%%%
goto :call_expand_done
:call_expand
set WINE_BAR=def
echo %1 %2 %3
call echo %1 %2 %3
exit /b 0
:call_expand_done
cd .. & rd /s/q foobar
echo --- mixing batch and builtins

View file

@ -1585,6 +1585,12 @@ Line two
Get if
... and else!
passed
abc
abc
%WINE_BAR%
@todo_wine@abc
@todo_wine@abc %WINE_BAR% %WINE_BAR%
@todo_wine@abc def def
--- mixing batch and builtins
bar@space@
@todo_wine@foo