cmd/tests: Add tests for SHIFT builtin.

This commit is contained in:
Frédéric Delanoy 2011-09-13 12:06:45 +02:00 committed by Alexandre Julliard
parent 9bf515974d
commit ad064b44ed
2 changed files with 27 additions and 0 deletions

View File

@ -1256,6 +1256,26 @@ echo echo non-builtin dir> dir.cmd
call dir /b
cd .. & rd /s/q foobar
echo ------------ Testing SHIFT ------------
call :shiftFun p1 p2 p3 p4 p5
goto :endShiftFun
:shiftFun
echo '%1' '%2' '%3' '%4' '%5'
shift
echo '%1' '%2' '%3' '%4' '%5'
shift@tab@ /1
echo '%1' '%2' '%3' '%4' '%5'
shift /2
echo '%1' '%2' '%3' '%4' '%5'
shift /-1
echo '%1' '%2' '%3' '%4' '%5'
shift /0
echo '%1' '%2' '%3' '%4' '%5'
goto :eof
:endShiftFun
echo ------------ Testing cmd invocation ------------
rem FIXME: only a stub ATM
echo ... a batch file can delete itself ...

View File

@ -729,6 +729,13 @@ foo ''
@todo_wine@1
@todo_wine@1
non-builtin dir
------------ Testing SHIFT ------------
'p1' 'p2' 'p3' 'p4' 'p5'
'p2' 'p3' 'p4' 'p5' ''
'p3' 'p4' 'p5' '' ''
'p3' 'p5' '' '' ''
'p3' 'p5' '' '' ''
'p5' '' '' '' ''
------------ Testing cmd invocation ------------
... a batch file can delete itself ...
file correctly deleted