diff options
author | Steven Knight <knight@baldmt.com> | 2002-01-11 15:03:46 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-01-11 15:03:46 (GMT) |
commit | e6c4e9ae3fc9edc60981f15ece898645747ba82c (patch) | |
tree | c36fa5eac0d3d576e2ad42b4fb6d2f861373f353 /test | |
parent | dd40d81aa957e6c4724c648bf74390280849e944 (diff) | |
download | SCons-e6c4e9ae3fc9edc60981f15ece898645747ba82c.zip SCons-e6c4e9ae3fc9edc60981f15ece898645747ba82c.tar.gz SCons-e6c4e9ae3fc9edc60981f15ece898645747ba82c.tar.bz2 |
Fix using a directory as Default().
Diffstat (limited to 'test')
-rw-r--r-- | test/Default.py | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/test/Default.py b/test/Default.py index 5685c3d..1d86829 100644 --- a/test/Default.py +++ b/test/Default.py @@ -99,30 +99,57 @@ test.fail_test(test.read(test.workpath('four', 'bar.out')) != "four/bar.in\n") -test.subdir('subdir') +test.subdir('sub1') 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') +SConscript('sub1/SConscript') """ % python) test.write('xxx.in', "xxx.in\n") -test.write(['subdir', 'SConscript'], """ +test.write(['sub1', '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.write(['sub1', 'xxx.in'], "sub1/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.fail_test(test.read(test.workpath('sub1', 'xxx.out')) != "sub1/xxx.in\n") + + + +test.subdir('sub2') + +test.write('SConstruct', """ +Default('sub2') +B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES') +env = Environment(BUILDERS = [B]) +env.B(target = 'xxx.out', source = 'xxx.in') +SConscript('sub2/SConscript') +""" % python) + +test.write('xxx.in', "xxx.in\n") + +test.write(['sub2', 'SConscript'], """ +B = Builder(name = 'B', action = r'%s build.py $TARGET $SOURCES') +env = Environment(BUILDERS = [B]) +env.B(target = 'xxx.out', source = 'xxx.in') +""" % python) + +test.write(['sub2', 'xxx.in'], "sub2/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('sub2', 'xxx.out')) != "sub2/xxx.in\n") |