diff options
author | Dirk Baechle <dl9obn@darc.de> | 2012-12-16 17:56:16 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2012-12-16 17:56:16 (GMT) |
commit | 78785a796c5cb080dc6a0e7bc99c720a349b3859 (patch) | |
tree | 53e4be521ebf4c4f65c14c9e68b64b5327bf61c4 /test/Errors/non-executable-file.py | |
parent | 1bf9aa83fc024950012dd76d110443fc2d30c92a (diff) | |
download | SCons-78785a796c5cb080dc6a0e7bc99c720a349b3859.zip SCons-78785a796c5cb080dc6a0e7bc99c720a349b3859.tar.gz SCons-78785a796c5cb080dc6a0e7bc99c720a349b3859.tar.bz2 |
- extended the must_contain* methods of the test framework, such that they all support user-defined find/search functions
- relaxed several of the regex comparisons for better cross-platform compatibility
Diffstat (limited to 'test/Errors/non-executable-file.py')
-rw-r--r-- | test/Errors/non-executable-file.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/test/Errors/non-executable-file.py b/test/Errors/non-executable-file.py index db7c88a..e1b8f4e 100644 --- a/test/Errors/non-executable-file.py +++ b/test/Errors/non-executable-file.py @@ -42,30 +42,31 @@ Bad command or file name """ unrecognized = """\ -'%s' is not recognized as an internal or external command, +'.+' is not recognized as an internal or external command, operable program or batch file. -scons: *** [%s] Error 1 +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 +scons: \*\*\* \[%s\] Error 1 """ cannot_execute = """\ -%s: cannot execute -scons: *** [%s] Error %s +(sh: )*.+: cannot execute +scons: \*\*\* \[%s\] Error %s """ -Permission_denied = """\ -%s: Permission denied -scons: *** [%s] Error %s +permission_denied = """\ +.+: (p|P)ermission denied +scons: \*\*\* \[%s\] Error %s """ -permission_denied = """\ -%s: permission denied -scons: *** [%s] Error %s +konnte_nicht_gefunden_werden = """\ +Der Befehl ".+" ist entweder falsch geschrieben oder +konnte nicht gefunden werden. +scons: \*\*\* \[%s\] Error %s """ test.write('SConstruct', r""" @@ -83,22 +84,21 @@ test.description_set("Incorrect STDERR:\n%s\n" % test.stderr()) if os.name == 'nt': errs = [ bad_command, - unrecognized % (not_executable, '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 = [ - cannot_execute % ('sh: %s' % not_executable, 'f1', 1), + cannot_execute % ('f1', 1), ] - test.fail_test(not test.stderr() in errs) else: errs = [ - cannot_execute % (not_executable, 'f1', 126), - Permission_denied % (not_executable, 'f1', 126), - permission_denied % (not_executable, 'f1', 126), + cannot_execute % ('f1', 126), + permission_denied % ('f1', 126), ] - test.must_contain_any_line(test.stderr(), errs) + +test.must_contain_any_line(test.stderr(), errs, find=TestSCons.search_re) test.pass_test() |