diff options
author | Steven Knight <knight@baldmt.com> | 2001-12-22 06:04:55 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-12-22 06:04:55 (GMT) |
commit | 475d94a9464a232dacd2f7dfefc6f2e0292f9e2c (patch) | |
tree | 0b97739b07d4c7fd27b7332a4013e842157ede1f /test/Default.py | |
parent | daf4a9eeb6adeaaac7026314f2accbed9176afdd (diff) | |
download | SCons-475d94a9464a232dacd2f7dfefc6f2e0292f9e2c.zip SCons-475d94a9464a232dacd2f7dfefc6f2e0292f9e2c.tar.gz SCons-475d94a9464a232dacd2f7dfefc6f2e0292f9e2c.tar.bz2 |
Make Default work with subdirectories.
Diffstat (limited to 'test/Default.py')
-rw-r--r-- | test/Default.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/Default.py b/test/Default.py index 135d7cb..5685c3d 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() |