diff options
author | Robert Managan <ramanagan@att.net> | 2012-12-18 23:09:21 (GMT) |
---|---|---|
committer | Robert Managan <ramanagan@att.net> | 2012-12-18 23:09:21 (GMT) |
commit | b91167a75ea49620ea587482df0efd30d9a9cf16 (patch) | |
tree | 5767433bfda9d36e134af9b09446db20ddd34f0b /test/Errors/nonexistent-executable.py | |
parent | 5758e27903c4e584b08ad2d69fa80884894e140e (diff) | |
parent | 02cae725ed116ae6cd996fe3bf5888f7f8f61b97 (diff) | |
download | SCons-b91167a75ea49620ea587482df0efd30d9a9cf16.zip SCons-b91167a75ea49620ea587482df0efd30d9a9cf16.tar.gz SCons-b91167a75ea49620ea587482df0efd30d9a9cf16.tar.bz2 |
update to latest SCons commits
Diffstat (limited to 'test/Errors/nonexistent-executable.py')
-rw-r--r-- | test/Errors/nonexistent-executable.py | 53 |
1 files changed, 14 insertions, 39 deletions
diff --git a/test/Errors/nonexistent-executable.py b/test/Errors/nonexistent-executable.py index b9deea1..acaaaeb 100644 --- a/test/Errors/nonexistent-executable.py +++ b/test/Errors/nonexistent-executable.py @@ -46,58 +46,33 @@ test.run(arguments='.', stderr = None, status = 2) -bad_command = """\ -Bad command or file name -""" - -unrecognized = """\ -'%s' is not recognized as an internal or external command, -operable program or batch file. -scons: *** [%s] Error 1 -""" - -unspecified = """\ -The name specified is not recognized as an -internal or external command, operable program or batch file. -scons: *** [%s] Error 1 -""" - -not_found_1_space = """\ -sh: %s: not found -scons: *** [%s] Error %s -""" - -not_found_2_spaces = """\ -sh: %s: not found -scons: *** [%s] Error %s -""" - -No_such = """\ -%s: No such file or directory -scons: *** [%s] Error %s -""" +bad_command = """Bad command or file name""" +unrecognized = r"""'.+' is not recognized as an internal or external command,\s+operable program or batch file.\sscons: \*\*\* \[%s\] Error 1""" +unspecified = r"""The name specified is not recognized as an\s+internal or external command, operable program or batch file.\s+scons: \*\*\* \[%s\] Error 1""" +not_found_space = r"""sh: (\d: )*.+: \s*not found\s+scons: \*\*\* \[%s\] Error %s""" +No_such = r""".+: No such file or directory\s+scons: \*\*\* \[%s\] Error %s""" +konnte_nicht_gefunden_werden = r"""Der Befehl ".+" ist entweder falsch geschrieben oder\s+konnte nicht gefunden werden.\s+scons: \*\*\* \[%s\] Error %s""" test.description_set("Incorrect STDERR:\n%s\n" % test.stderr()) if os.name == 'nt': errs = [ bad_command, - unrecognized % (no_such_file, 'f1'), + unrecognized % 'f1', + konnte_nicht_gefunden_werden % ('f1', 1), unspecified % 'f1' ] - test.fail_test(not test.stderr() in errs) elif sys.platform.find('sunos') != -1: errs = [ - not_found_1_space % (no_such_file, 'f1', 1), + not_found_space % ('f1', 1), ] - test.fail_test(not test.stderr() in errs) else: errs = [ - not_found_1_space % (no_such_file, 'f1', 1), - not_found_2_spaces % (no_such_file, 'f1', 1), - not_found_1_space % (no_such_file, 'f1', 127), - No_such % (no_such_file, 'f1', 127), + not_found_space % ('f1', 1), + not_found_space % ('f1', 127), + No_such % ('f1', 127), ] - test.must_contain_any_line(test.stderr(), errs) + +test.must_contain_any_line(test.stderr(), errs, find=TestSCons.search_re) test.pass_test() |