diff options
author | Steven Knight <knight@baldmt.com> | 2001-12-17 05:36:08 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-12-17 05:36:08 (GMT) |
commit | 2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473 (patch) | |
tree | c30ce7708b16e20a505bb00d966002f9f3a58e36 /test | |
parent | afe9f16b5aeb7fc9861c354a58b05d3f2119b46b (diff) | |
download | SCons-2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473.zip SCons-2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473.tar.gz SCons-2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473.tar.bz2 |
Make Default() accept a node
Diffstat (limited to 'test')
-rw-r--r-- | test/Default.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/Default.py b/test/Default.py index ceab745..135d7cb 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() |