diff options
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() |