=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: cmd/tests: Add tests for SHIFT builtin.

Alexandre Julliard julliard at winehq.org
Wed Sep 14 12:25:41 CDT 2011


Module: wine
Branch: master
Commit: ad064b44ed7a773e4fdf6dab9cda240ae6172c5b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ad064b44ed7a773e4fdf6dab9cda240ae6172c5b

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Sep 13 12:06:45 2011 +0200

cmd/tests: Add tests for SHIFT builtin.

---

 programs/cmd/tests/test_builtins.cmd     |   20 ++++++++++++++++++++
 programs/cmd/tests/test_builtins.cmd.exp |    7 +++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 7551e57..cd30e4f 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -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 at 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 ...
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 733e1d5..19536fe 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -729,6 +729,13 @@ foo ''
 @todo_wine at 1
 @todo_wine at 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




More information about the wine-cvs mailing list