diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index a0b243e56d9..764697bcd9f 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -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 diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 3ddd82469c7..07a503ecba9 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -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