cmd/tests: Add tests for SHIFT builtin.
This commit is contained in:
parent
9bf515974d
commit
ad064b44ed
|
@ -1256,6 +1256,26 @@ echo echo non-builtin dir> dir.cmd
|
||||||
call dir /b
|
call dir /b
|
||||||
cd .. & rd /s/q foobar
|
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 ------------
|
echo ------------ Testing cmd invocation ------------
|
||||||
rem FIXME: only a stub ATM
|
rem FIXME: only a stub ATM
|
||||||
echo ... a batch file can delete itself ...
|
echo ... a batch file can delete itself ...
|
||||||
|
|
|
@ -729,6 +729,13 @@ foo ''
|
||||||
@todo_wine@1
|
@todo_wine@1
|
||||||
@todo_wine@1
|
@todo_wine@1
|
||||||
non-builtin dir
|
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 ------------
|
------------ Testing cmd invocation ------------
|
||||||
... a batch file can delete itself ...
|
... a batch file can delete itself ...
|
||||||
file correctly deleted
|
file correctly deleted
|
||||||
|
|
Loading…
Reference in New Issue