summaryrefslogtreecommitdiffstats
path: root/test/SConscript.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-09-15 14:01:28 (GMT)
committerSteven Knight <knight@baldmt.com>2003-09-15 14:01:28 (GMT)
commitc41dc6daf69787a9f4d4984aec727af705445e46 (patch)
tree24ce63856445f3ab2b29f4593bd0cb886cd4f4ba /test/SConscript.py
parentf36ff530132ecfe7941f80d2d6e5f03f75decf41 (diff)
downloadSCons-c41dc6daf69787a9f4d4984aec727af705445e46.zip
SCons-c41dc6daf69787a9f4d4984aec727af705445e46.tar.gz
SCons-c41dc6daf69787a9f4d4984aec727af705445e46.tar.bz2
Turn more global functions into Environment methods. (clone of 0.92.C121)
Diffstat (limited to 'test/SConscript.py')
-rw-r--r--test/SConscript.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SConscript.py b/test/SConscript.py
index 7ebffc3..d889c44 100644
--- a/test/SConscript.py
+++ b/test/SConscript.py
@@ -363,4 +363,25 @@ test.run(arguments = ".",
stdout = test.wrap_stdout(read_str = "`white space/SConscript'\n",
build_str = "scons: `.' is up to date.\n"))
+# Test calling SConscript through a construction environment.
+test.subdir('sub')
+test.write("SConstruct", """\
+env = Environment(SUBDIR='sub')
+print "SConstruct"
+x = 'xxx'
+env.Export("x")
+env.SConscript('$SUBDIR/SConscript')
+""")
+
+test.write(['sub', 'SConscript'], """\
+env = Environment()
+env.Import("x")
+print "sub/SConscript"
+print "x =", x
+""")
+
+test.run(arguments = ".",
+ stdout = test.wrap_stdout(read_str = "SConstruct\nsub/SConscript\nx = xxx\n",
+ build_str = "scons: `.' is up to date.\n"))
+
test.pass_test()