mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-18 09:06:16 +00:00
cmd/tests: Test calling batch files named as builtin commands.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
8bbd48bfd8
commit
289c49ee21
|
@ -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' ''
|
||||
|
|
Loading…
Reference in a new issue