diff options
| author | Steven Knight <knight@baldmt.com> | 2004-01-29 03:35:57 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-01-29 03:35:57 (GMT) |
| commit | 1ed5ce4f1c15b7608fe2fa62be76f7a781f98faa (patch) | |
| tree | 2e6c2769a032d26227b22c39df84706d35ed7408 /test/errors.py | |
| parent | d0b4699180b7177561f452b646b85ec39f09d0e2 (diff) | |
| download | SCons-1ed5ce4f1c15b7608fe2fa62be76f7a781f98faa.zip SCons-1ed5ce4f1c15b7608fe2fa62be76f7a781f98faa.tar.gz SCons-1ed5ce4f1c15b7608fe2fa62be76f7a781f98faa.tar.bz2 | |
Provide a better error message when a construction variable expansion is a Python syntax error.
Diffstat (limited to 'test/errors.py')
| -rw-r--r-- | test/errors.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/errors.py b/test/errors.py index d87b41a..4c493f6 100644 --- a/test/errors.py +++ b/test/errors.py @@ -182,4 +182,27 @@ test.run(status=2, stderr="scons: \\*\\*\\* \\[one.out\\] Error 2\n") +# Test syntax errors when trying to expand construction variables. +test.write('SConstruct', """\ +env = Environment() +env.subst('$foo.bar.3.0') +""") + +test.run(status=2, stderr=""" +scons: \*\*\* Syntax error trying to evaluate `\$foo\.bar\.3\.0' +File "SConstruct", line 2, in \? +""") + +test.write('SConstruct', """\ +env = Environment() +env.subst_list('$foo.3.0.x') +""") + +test.run(status=2, stderr=""" +scons: \*\*\* Syntax error trying to evaluate `\$foo\.3\.0\.x' +File "SConstruct", line 2, in \? +""") + + + test.pass_test() |
