summaryrefslogtreecommitdiff
path: root/test/Default.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-12-17 05:36:08 +0000
committerSteven Knight <knight@baldmt.com>2001-12-17 05:36:08 +0000
commit2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473 (patch)
treec30ce7708b16e20a505bb00d966002f9f3a58e36 /test/Default.py
parentafe9f16b5aeb7fc9861c354a58b05d3f2119b46b (diff)
downloadscons-2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473.tar.gz
Make Default() accept a node
Diffstat (limited to 'test/Default.py')
-rw-r--r--test/Default.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/Default.py b/test/Default.py
index ceab745a..135d7cb7 100644
--- a/test/Default.py
+++ b/test/Default.py
@@ -32,7 +32,7 @@ python = sys.executable
test = TestSCons.TestSCons()
-test.subdir('one', 'two', 'three')
+test.subdir('one', 'two', 'three', 'four')
test.write('build.py', r"""
import sys
@@ -66,7 +66,15 @@ env.B(target = 'bar.out', source = 'bar.in')
Default('foo.out bar.out')
""" % python)
-for dir in ['one', 'two', 'three']:
+test.write(['four', 'SConstruct'], """
+B = Builder(name = 'B', action = r'%s ../build.py $TARGET $SOURCES')
+env = Environment(BUILDERS = [B])
+Default(env.B(target = 'foo.out', source = 'foo.in'))
+Default(env.B(target = 'bar.out', source = 'bar.in'))
+""" % python)
+
+
+for dir in ['one', 'two', 'three', 'four']:
foo_in = os.path.join(dir, 'foo.in')
bar_in = os.path.join(dir, 'bar.in')
@@ -86,4 +94,8 @@ test.fail_test(test.read(test.workpath('two', 'bar.out')) != "two/bar.in\n")
test.fail_test(test.read(test.workpath('three', 'foo.out')) != "three/foo.in\n")
test.fail_test(test.read(test.workpath('three', 'bar.out')) != "three/bar.in\n")
+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.pass_test()