Frédéric Delanoy : cmd/tests: Add basic mkdir tests.

Alexandre Julliard julliard at winehq.org
Tue Jul 12 13:47:10 CDT 2011


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Mon Jul 11 23:34:06 2011 +0200

cmd/tests: Add basic mkdir tests.

---

 programs/cmd/tests/test_builtins.cmd     |   44 ++++++++++++++++++++++++++++++
 programs/cmd/tests/test_builtins.cmd.exp |   13 +++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 3af488e..1a1e136 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -149,6 +149,50 @@ if exist "file with spaces.dat" del "file with spaces.dat"
 cd ..
 rmdir "foo bar"
 
+echo ----------- Testing mkdir -----------
+call :setError 0
+rem md and mkdir are synonymous
+mkdir foobar
+echo %ErrorLevel%
+rmdir foobar
+md foobar
+echo %ErrorLevel%
+rmdir foobar
+rem Creating an already existing directory/file must fail
+mkdir foobar
+md foobar
+echo %ErrorLevel%
+rmdir foobar
+echo > foobar
+mkdir foobar
+echo %ErrorLevel%
+del foobar
+rem Multi-level path creation
+mkdir foo
+echo %ErrorLevel%
+mkdir foo\bar\baz
+echo %ErrorLevel%
+cd foo
+echo %ErrorLevel%
+cd bar
+echo %ErrorLevel%
+cd baz
+echo %ErrorLevel%
+echo > ..\..\bar2
+mkdir ..\..\..\foo\bar2
+echo %ErrorLevel%
+del ..\..\bar2
+mkdir ..\..\..\foo\bar2
+echo %ErrorLevel%
+rmdir ..\..\..\foo\bar2
+cd ..
+rmdir baz
+cd ..
+rmdir bar
+cd ..
+rmdir foo
+echo %ErrorLevel%
+
 echo -----------Testing Errorlevel-----------
 rem nt 4.0 doesn't really support a way of setting errorlevel, so this is weak
 rem See http://www.robvanderwoude.com/exit.php
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 2f3e285..a7116f7 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -102,6 +102,19 @@ r.test not found after delete, good
 del /q * succeeded on file1
 del /q * succeeded on file2.dat
 ------------ Testing del /s --------------
+----------- Testing mkdir -----------
+0
+0
+ at todo_wine@1
+ at todo_wine@1
+0
+0
+0
+0
+0
+ at todo_wine@1
+0
+0
 -----------Testing Errorlevel-----------
 1
 errorlevel just right, good




More information about the wine-cvs mailing list