5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 __revision__
= "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
31 test
= TestSCons
.TestSCons()
33 not_executable
= test
.workpath("not_executable")
35 test
.write(not_executable
, "\n")
37 test
.write("f1.in", "\n")
40 Bad command or file name
44 '.+' is not recognized as an internal or external command,
45 operable program or batch file.
46 scons: \\*\\*\\* \\[%s\\] Error 1
50 The name specified is not recognized as an
51 internal or external command, operable program or batch file.
52 scons: \\*\\*\\* \\[%s\\] Error 1
56 (sh: )*.+: cannot execute(( -)? \\[?Permission denied\\]?)?
57 scons: \\*\\*\\* \\[%s\\] Error %s
60 permission_denied
= """\
61 .+: (p|P)ermission denied
62 scons: \\*\\*\\* \\[%s\\] Error %s
65 konnte_nicht_gefunden_werden
= """\
66 Der Befehl ".+" ist entweder falsch geschrieben oder
67 konnte nicht gefunden werden.
68 scons: \\*\\*\\* \\[%s\\] Error %s
71 test
.write('SConstruct', r
"""
72 bld = Builder(action = '%s $SOURCES $TARGET')
73 env = Environment(BUILDERS = { 'bld': bld })
74 env.bld(target = 'f1', source = 'f1.in')
75 """ % not_executable
.replace('\\', '\\\\'))
77 test
.run(arguments
='.',
78 stdout
= test
.wrap_stdout("%s f1.in f1\n" % not_executable
, error
=1),
82 test
.description_set("Incorrect STDERR:\n%s\n" % test
.stderr())
87 konnte_nicht_gefunden_werden
% ('f1', 1),
92 cannot_execute
% ('f1', 126),
93 permission_denied
% ('f1', 126),
96 test
.must_contain_any_line(test
.stderr(), errs
, find
=TestSCons
.search_re
)
102 # indent-tabs-mode:nil
104 # vim: set expandtab tabstop=4 shiftwidth=4: