Frédéric Delanoy : cmd/tests: Add pushd/ popd tests.

Alexandre Julliard julliard at winehq.org
Wed Aug 31 13:19:23 CDT 2011


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Aug 30 23:33:52 2011 +0200

cmd/tests: Add pushd/popd tests.

---

 programs/cmd/tests/test_builtins.cmd     |   33 ++++++++++++++++++++++++++++++
 programs/cmd/tests/test_builtins.cmd.exp |   15 +++++++++++++
 2 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index f473b91..5bd375e 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -1027,6 +1027,39 @@ if not exist foobar (echo foobar removed) else echo foobar not removed!
 if not exist bar\baz (echo bar\baz removed) else echo bar\baz not removed!
 cd .. & rd /s/q foobaz
 
+echo ----------- Testing pushd/popd -----------
+cd
+echo ...popd is no-op when dir stack is empty
+popd
+cd
+echo ...pushing non-existing dir
+pushd foobar
+cd
+echo ...basic behaviour
+mkdir foobar\baz
+pushd foobar
+cd
+popd
+cd
+pushd foobar
+pushd baz
+cd
+popd
+cd
+pushd baz
+popd
+cd
+popd
+cd
+pushd .
+cd foobar\baz
+pushd ..
+cd
+popd
+popd
+cd
+rd /s/q foobar
+
 echo ------------ Testing attrib --------------
 rem FIXME Add tests for archive, hidden and system attributes + mixed attributes modifications
 mkdir foobar & cd foobar
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 5419476..c67b10f 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -634,6 +634,21 @@ foo removed
 bar removed
 foobar removed
 bar\baz removed
+----------- Testing pushd/popd -----------
+ at pwd@
+...popd is no-op when dir stack is empty
+ at pwd@
+...pushing non-existing dir
+ at pwd@
+...basic behaviour
+ at pwd@\foobar
+ at pwd@
+ at pwd@\foobar\baz
+ at pwd@\foobar
+ at pwd@\foobar
+ at pwd@
+ at pwd@\foobar
+ at pwd@
 ------------ Testing attrib --------------
 @todo_wine at A            @pwd@\foobar\foo at or_broken@A          @pwd@\foobar\foo at or_broken@A       I    @pwd@\foobar\foo
 ... read-only attribute




More information about the wine-cvs mailing list