Commit 289c49ee authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

cmd/tests: Test calling batch files named as builtin commands.

parent 8bbd48bf
......@@ -2711,7 +2711,13 @@ echo>robinfile
if 1==1 call del batfile
dir /b
if exist batfile echo batfile shouldn't exist
rem arcane command, first resets errorlevel, second sets it to one
(call )
echo %ErrorLevel%
(call)
echo %ErrorLevel%
rem ... but not for 'if' or 'for'
call :setError 0
call if 1==1 echo bar 2> nul
echo %ErrorLevel%
call :setError 0
......@@ -2738,6 +2744,20 @@ call if 1==1 (
call call call echo passed
cd .. & rd /s/q foobar
echo --- mixing batch and builtins
erase /q echo.bat test.bat 2> NUL
echo @echo foo> echo.bat
echo @echo bar> test.bat & call test.bat
echo @echo.bat bar> test.bat & call test.bat
echo @call echo bar> test.bat & call test.bat
echo @call echo.bat bar> test.bat & call test.bat
erase /q echo.bat 2> NUL
echo @echo bar> test.bat & call test.bat
echo @echo.bat bar> test.bat & call test.bat
echo @call echo bar> test.bat & call test.bat
echo @call echo.bat bar> test.bat & call test.bat
erase /q test.bat 2> NUL
echo ------------ Testing SHIFT ------------
call :shiftFun p1 p2 p3 p4 p5
......
......@@ -1537,6 +1537,8 @@ foo created
Should expand foobaz
batfile
robinfile
0
@todo_wine@1
1
1
non-builtin dir
......@@ -1545,6 +1547,15 @@ Line two
Get if
... and else!
passed
--- mixing batch and builtins
bar@space@
@todo_wine@foo
foo
foo
bar@space@
bat bar@space@
bar@space@
bat bar@space@
------------ Testing SHIFT ------------
'p1' 'p2' 'p3' 'p4' 'p5'
'p2' 'p3' 'p4' 'p5' ''
......
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