cmd/tests: Segment mkdir tests for an easier read.

This commit is contained in:
Frédéric Delanoy 2011-09-12 20:28:03 +02:00 committed by Alexandre Julliard
parent c03f813c87
commit 8fff969ce6
2 changed files with 12 additions and 6 deletions

View File

@ -881,14 +881,14 @@ rmdir "foo bar"
echo ----------- Testing mkdir -----------
call :setError 0
rem md and mkdir are synonymous
echo ... 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
echo ... creating an already existing directory/file must fail ...
mkdir foobar
md foobar
echo %ErrorLevel%
@ -897,7 +897,7 @@ echo > foobar
mkdir foobar
echo %ErrorLevel%
del foobar
rem Multi-level path creation
echo ... multilevel path creation ...
mkdir foo
echo %ErrorLevel%
mkdir foo\bar\baz
@ -922,13 +922,13 @@ rmdir bar
cd ..
rmdir foo
echo %ErrorLevel%
rem Trailing backslashes
echo ... trailing backslashes ...
mkdir foo\\\\
echo %ErrorLevel%
if exist foo (rmdir foo & echo dir created
) else ( echo dir not created )
echo %ErrorLevel%
rem Invalid chars
echo ... invalid chars ...
mkdir ?
echo mkdir ? gives errorlevel %ErrorLevel%
call :setError 0
@ -954,7 +954,7 @@ if not exist foo (
cd ..
rmdir foo
)
rem multiples directories at once
echo ... multiple directories at once ...
mkdir foobaz & cd foobaz
mkdir foo bar\baz foobar
if exist foo (echo foo created) else echo foo not created!

View File

@ -595,10 +595,13 @@ del /q * succeeded on file1
del /q * succeeded on file2.dat
------------ Testing del /s --------------
----------- Testing mkdir -----------
... md and mkdir are synonymous ...
0
0
... creating an already existing directory/file must fail ...
1
1
... multilevel path creation ...
0
0
0
@ -607,15 +610,18 @@ del /q * succeeded on file2.dat
1
0
0
... trailing backslashes ...
0
dir created
0
... invalid chars ...
mkdir ? gives errorlevel 1
mkdir ?\foo gives errorlevel 1
mkdir foo\? gives errorlevel 1
ok, foo created
mkdir foo\bar\? gives errorlevel 1
ok, foo\bar created
... multiple directories at once ...
foo created
bar created
foobar created