diff options
Diffstat (limited to 'test/ValidateOptions.py')
-rw-r--r-- | test/ValidateOptions.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/test/ValidateOptions.py b/test/ValidateOptions.py index 09609efe2..65e216b9f 100644 --- a/test/ValidateOptions.py +++ b/test/ValidateOptions.py @@ -30,19 +30,22 @@ import TestSCons test = TestSCons.TestSCons() test.file_fixture('fixture/SConstruct-check-valid-options', 'SConstruct') -# Should see "This is in SConstruct" +# Should see "This is in SConstruct" because all options specified (none) are valid and +# so ValidatedOptions() won't exit before it's printed. test.run() test.must_contain_single_instance_of(test.stdout(), ["This is in SConstruct"]) +# Should see "This is in SConstruct" because all options specified (--testing=abc) are valid and +# so ValidatedOptions() won't exit before it's printed. test.run(arguments="--testing=abc") test.must_contain_single_instance_of(test.stdout(), ["This is in SConstruct"]) -# Should not see "This is in SConstruct" -test.run(arguments="--garbage=xyz", status=2, stderr=".*SCons Error: no such option: --garbage.*", match=TestSCons.match_re_dotall) -test.fail_test(("This is in SConstruct" in test.stdout()), message='"This is in SConstruct" should not be output. This means ValidateOptions() did not error out before this was printed') - - - +# Should not see "This is in SConstruct" because the option specified (--garbage=xyz) is invalid and +# so ValidatedOptions() will exit before it's printed. +test.run(arguments="--garbage=xyz", status=2, stderr=".*SCons Error: no such option: --garbage.*", + match=TestSCons.match_re_dotall) +test.fail_test(("This is in SConstruct" in test.stdout()), + message='"This is in SConstruct" should not be output. This means ValidateOptions() did not error out before this was printed') # Local Variables: # tab-width:4 |