cmd/tests: Add tests for recursive rmdir.
This commit is contained in:
parent
33e2034227
commit
23cd306a7d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue