summaryrefslogtreecommitdiff
path: root/test/Default.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-12-22 06:04:55 +0000
committerSteven Knight <knight@baldmt.com>2001-12-22 06:04:55 +0000
commit475d94a9464a232dacd2f7dfefc6f2e0292f9e2c (patch)
tree0b97739b07d4c7fd27b7332a4013e842157ede1f /test/Default.py
parentdaf4a9eeb6adeaaac7026314f2accbed9176afdd (diff)
downloadscons-475d94a9464a232dacd2f7dfefc6f2e0292f9e2c.tar.gz
Make Default work with subdirectories.
Diffstat (limited to 'test/Default.py')
-rw-r--r--test/Default.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/Default.py b/test/Default.py
index 135d7cb7..5685c3d1 100644
--- a/test/Default.py
+++ b/test/Default.py
@@ -98,4 +98,32 @@ test.fail_test(test.read(test.workpath('four', 'foo.out')) != "four/foo.in\n")
test.fail_test(test.read(test.workpath('four', 'bar.out')) != "four/bar.in\n")
+
+test.subdir('subdir')
+
+test.write('SConstruct', """
+B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES')
+env = Environment(BUILDERS = [B])
+env.B(target = 'xxx.out', source = 'xxx.in')
+SConscript('subdir/SConscript')
+""" % python)
+
+test.write('xxx.in', "xxx.in\n")
+
+test.write(['subdir', 'SConscript'], """
+B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES')
+env = Environment(BUILDERS = [B])
+env.B(target = 'xxx.out', source = 'xxx.in')
+Default('xxx.out')
+""" % python)
+
+test.write(['subdir', 'xxx.in'], "subdir/xxx.in\n")
+
+test.run() # no arguments, use the Default
+
+test.fail_test(os.path.exists(test.workpath('xxx.out')))
+test.fail_test(test.read(test.workpath('subdir', 'xxx.out')) != "subdir/xxx.in\n")
+
+
+
test.pass_test()