diff options
author | Steven Knight <knight@baldmt.com> | 2003-11-18 07:10:57 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-11-18 07:10:57 (GMT) |
commit | f178684f565030f529e50b58d060a98fd8795e14 (patch) | |
tree | 2852b82f577251e2af04c8bb3a335b0ca467e3b5 /test | |
parent | c1482a3213790dba0c7faed021e309cf0a010c00 (diff) | |
download | SCons-f178684f565030f529e50b58d060a98fd8795e14.zip SCons-f178684f565030f529e50b58d060a98fd8795e14.tar.gz SCons-f178684f565030f529e50b58d060a98fd8795e14.tar.bz2 |
Ensure that the ENV values are all strings. (Anthony Roach)
Diffstat (limited to 'test')
-rw-r--r-- | test/ENV.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/ENV.py b/test/ENV.py index 31ad970..98d04f9 100644 --- a/test/ENV.py +++ b/test/ENV.py @@ -24,6 +24,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +import os +import string import sys import TestSCons @@ -60,4 +62,24 @@ test.run(arguments = '.') test.fail_test(test.read('env1.out') != "build.py env1\ninput file\n") test.fail_test(test.read('env2.out') != "build.py env2\ninput file\n") + +test.write('SConstruct', """ +env = Environment() +foo = env.Command('foo', [], r'%s build.py $TARGET') +env['ENV']['LIST'] = [foo, 'bar'] +env['ENV']['FOO'] = foo +"""%python) + +test.write('build.py', +r""" +import os +print 'LIST:', os.environ['LIST'] +print 'FOO:', os.environ['FOO'] +""") + +test.run() + +test.fail_test(string.find(test.stdout(), "LIST: foo%sbar"%os.pathsep) == -1) +test.fail_test(string.find(test.stdout(), "FOO: foo") == -1) + test.pass_test() |