|
1 | 1 | #!/usr/bin/env python
|
2 | 2 | #
|
3 |
| -# __COPYRIGHT__ |
| 3 | +# MIT License |
| 4 | +# |
| 5 | +# Copyright The SCons Foundation |
4 | 6 | #
|
5 | 7 | # Permission is hereby granted, free of charge, to any person obtaining
|
6 | 8 | # a copy of this software and associated documentation files (the
|
|
20 | 22 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21 | 23 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22 | 24 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23 |
| -# |
24 |
| - |
25 |
| -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" |
26 | 25 |
|
27 | 26 | """
|
28 | 27 | Test that setting illegal construction variables fails in ways that are
|
|
37 | 36 | SConscript_path = test.workpath('SConscript')
|
38 | 37 |
|
39 | 38 | test.write(SConstruct_path, """\
|
40 |
| -env = Environment() |
| 39 | +_ = DefaultEnvironment(tools=[]) |
| 40 | +env = Environment(tools=[]) |
41 | 41 | env['foo-bar'] = 1
|
42 | 42 | """)
|
43 | 43 |
|
44 | 44 | expect_stderr = """
|
45 |
| -scons: *** Illegal construction variable `foo-bar' |
46 |
| -""" + test.python_file_line(SConstruct_path, 2) |
| 45 | +scons: *** Illegal construction variable 'foo-bar' |
| 46 | +""" + test.python_file_line(SConstruct_path, 3) |
47 | 47 |
|
48 | 48 | test.run(arguments='.', status=2, stderr=expect_stderr)
|
49 | 49 |
|
|
54 | 54 | """)
|
55 | 55 |
|
56 | 56 | test.write('SConscript', """\
|
57 |
| -env = Environment() |
| 57 | +_ = DefaultEnvironment(tools=[]) |
| 58 | +env = Environment(tools=[]) |
58 | 59 | env['foo(bar)'] = 1
|
59 | 60 | """)
|
60 | 61 |
|
61 | 62 |
|
62 | 63 | expect_stderr = """
|
63 |
| -scons: *** Illegal construction variable `foo(bar)' |
64 |
| -""" + test.python_file_line(SConscript_path, 2) |
| 64 | +scons: *** Illegal construction variable 'foo(bar)' |
| 65 | +""" + test.python_file_line(SConscript_path, 3) |
65 | 66 |
|
66 | 67 | test.run(arguments='.', status=2, stderr=expect_stderr)
|
67 | 68 |
|
|
0 commit comments