cmd/tests: Test that ErrorLevel is set to 9009 when unknown commands are encountered.

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

View File

@ -331,6 +331,9 @@ if not exist foo (
)
echo -----------Testing Errorlevel-----------
rem WARNING: Do *not* add tests using ErrorLevel after this section
should_not_exist 2> nul > nul
echo %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
call :setError 1

View File

@ -169,6 +169,7 @@ non-empty dir not removed
recursive rmdir succeeded
recursive rmdir succeeded
-----------Testing Errorlevel-----------
9009
1
errorlevel just right, good
abc0def@or_broken@abc1def