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 | b9da200e528ab51373bdd2e5fad06f57d4a268c4 (patch) | |
tree | 2e6c2769a032d26227b22c39df84706d35ed7408 /test/errors.py | |
parent | 337d309e434809058ceb356b40f7415d7c07cc09 (diff) | |
download | SCons-b9da200e528ab51373bdd2e5fad06f57d4a268c4.zip SCons-b9da200e528ab51373bdd2e5fad06f57d4a268c4.tar.gz SCons-b9da200e528ab51373bdd2e5fad06f57d4a268c4.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() |