diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index d5397560bc6..ebcec489b7c 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -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 diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 0102c3bcbc5..146dbb5ad0a 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -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