diff options
author | Steven Knight <knight@baldmt.com> | 2004-05-23 12:13:44 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-05-23 12:13:44 (GMT) |
commit | 571b716dd3556cb7307a74684f205705ae46b40e (patch) | |
tree | 2c78912009c9c6cb2159523d8e8f0f3f36d5a2cf /test | |
parent | d157a17661410b67ad01cefa8d60b4c265185738 (diff) | |
download | SCons-571b716dd3556cb7307a74684f205705ae46b40e.zip SCons-571b716dd3556cb7307a74684f205705ae46b40e.tar.gz SCons-571b716dd3556cb7307a74684f205705ae46b40e.tar.bz2 |
Better handling of syntax errors during variable expansion. (Anthony Roach)
Diffstat (limited to 'test')
-rw-r--r-- | test/errors.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/errors.py b/test/errors.py index 4c493f6..7e24fed 100644 --- a/test/errors.py +++ b/test/errors.py @@ -189,7 +189,7 @@ env.subst('$foo.bar.3.0') """) test.run(status=2, stderr=""" -scons: \*\*\* Syntax error trying to evaluate `\$foo\.bar\.3\.0' +scons: \*\*\* Syntax error `invalid syntax( \(line 1\))?' trying to evaluate `\$foo\.bar\.3\.0' File "SConstruct", line 2, in \? """) @@ -199,10 +199,21 @@ env.subst_list('$foo.3.0.x') """) test.run(status=2, stderr=""" -scons: \*\*\* Syntax error trying to evaluate `\$foo\.3\.0\.x' +scons: \*\*\* Syntax error `invalid syntax( \(line 1\))?' trying to evaluate `\$foo\.3\.0\.x' File "SConstruct", line 2, in \? """) +#Test syntax errors when trying to expand construction variables at build time: +test.write('SConstruct', """\ +env = Environment() +env.Command('foo.bar', [], '$foo.bar.3.0') +""") + +test.run(status=2, stderr=r"""scons: \*\*\* \[foo\.bar\] Syntax error `invalid syntax( \(line 1\))?' trying to evaluate `\$foo\.bar\.3\.0' +""") + + + test.pass_test() |