summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2008-12-11 03:12:25 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2008-12-11 03:12:25 (GMT)
commitb2a402aa3a103c9f3b2eabfb5c2c0260951e1ffc (patch)
tree9b043e7aeb15e5959c1cc72f9580162680259e9c /test
parent0e4e4a675e9eec8ea69fa98038b13ddfeea4ebd8 (diff)
downloadSCons-b2a402aa3a103c9f3b2eabfb5c2c0260951e1ffc.zip
SCons-b2a402aa3a103c9f3b2eabfb5c2c0260951e1ffc.tar.gz
SCons-b2a402aa3a103c9f3b2eabfb5c2c0260951e1ffc.tar.bz2
Added regression test for issue #1249
Diffstat (limited to 'test')
-rw-r--r--test/Mkdir.py38
1 files changed, 37 insertions, 1 deletions
diff --git a/test/Mkdir.py b/test/Mkdir.py
index e6aeadc..144c9a6 100644
--- a/test/Mkdir.py
+++ b/test/Mkdir.py
@@ -34,7 +34,7 @@ import TestSCons
test = TestSCons.TestSCons()
-test.subdir('work1', 'work2')
+test.subdir('work1', 'work2', 'work3')
test.write(['work1', 'SConstruct'], """
Execute(Mkdir('d1'))
@@ -152,4 +152,40 @@ test.run(chdir = 'work2', arguments = 'hello/file2.out output')
test.must_match(['work2', 'output'], "work2/file1.in\nwork2/file2.in\n")
+
+#----------------------------------------
+# Regression test for bug #1249
+
+test.subdir(['work3', 'sub1'], ['work3', 'sub1', 'sub11'])
+
+test.write(['work3', 'SConstruct'], """\
+#/SConstruct ------------------------------------------
+import os
+env = Environment(ENV = os.environ)
+BuildDir('build', 'sub1', duplicate=0)
+base = '#build/sub1'
+Export('env base')
+SConscript('sub1/SConscript', exports='env')
+""")
+
+test.write(['work3', 'sub1', 'SConscript'], """\
+#/sub1/SConscript ----------------------------------
+Import ('env base')
+test1 = base + '/test1'
+Export ('env test1')
+env.Command(Dir(test1), '', Mkdir('$TARGET'))
+SConscript('sub11/SConscript')
+""")
+
+test.write(['work3', 'sub1', 'sub11', 'SConscript'], """\
+#/sub1/sub11/SConscript-------------------------
+Import('env test1')
+test11 = test1 + '/test11'
+print 'test11 = ' + test11
+env.Command(Dir(test11), '', Mkdir('$TARGET'))
+""")
+
+test.run(chdir = 'work3', arguments = '')
+
test.pass_test()
+