cmd/tests: Add tests for recursive rmdir.

This commit is contained in:
Frédéric Delanoy 2011-07-19 09:49:25 +02:00 committed by Alexandre Julliard
parent 33e2034227
commit 23cd306a7d
2 changed files with 23 additions and 0 deletions

View File

@ -308,6 +308,27 @@ echo %ErrorLevel%
if exist foo echo non-empty dir not removed
rmdir foo\bar
rmdir foo
rem Recursive rmdir
mkdir foo\bar\baz
rmdir /s /Q foo
if not exist foo (
echo recursive rmdir succeeded
) else (
rd foo\bar\baz
rd foo\bar
rd foo
)
mkdir foo\bar\baz
echo foo > foo\bar\brol
rmdir /s /Q foo
if not exist foo (
echo recursive rmdir succeeded
) else (
rd foo\bar\baz
del foo\bar\brol
rd foo\bar
rd foo
)
echo -----------Testing Errorlevel-----------
rem nt 4.0 doesn't really support a way of setting errorlevel, so this is weak

View File

@ -166,6 +166,8 @@ file not removed
non-empty dir not removed
0
non-empty dir not removed
recursive rmdir succeeded
recursive rmdir succeeded
-----------Testing Errorlevel-----------
1
errorlevel just right, good