diff options
author | Steven Knight <knight@baldmt.com> | 2002-01-12 19:17:54 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-01-12 19:17:54 (GMT) |
commit | bda9d350b0cc52fefb2303114e20fc954710d76e (patch) | |
tree | 343a6a217ac1b420ff7860ee399035757dfc4374 /test | |
parent | e6c4e9ae3fc9edc60981f15ece898645747ba82c (diff) | |
download | SCons-bda9d350b0cc52fefb2303114e20fc954710d76e.zip SCons-bda9d350b0cc52fefb2303114e20fc954710d76e.tar.gz SCons-bda9d350b0cc52fefb2303114e20fc954710d76e.tar.bz2 |
Make the Default() method accomodate targets with white space in the file name.
Diffstat (limited to 'test')
-rw-r--r-- | test/Default.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/test/Default.py b/test/Default.py index 1d86829..a03ff4b 100644 --- a/test/Default.py +++ b/test/Default.py @@ -32,7 +32,7 @@ python = sys.executable test = TestSCons.TestSCons() -test.subdir('one', 'two', 'three', 'four') +test.subdir('one', 'two', 'three', 'four', 'five') test.write('build.py', r""" import sys @@ -69,12 +69,21 @@ Default('foo.out bar.out') test.write(['four', 'SConstruct'], """ B = Builder(name = 'B', action = r'%s ../build.py $TARGET $SOURCES') env = Environment(BUILDERS = [B]) +env.B(target = ['foo bar'], source = 'foo.in') +env.B(target = 'foo', source = 'foo.in') +env.B(target = 'bar', source = 'bar.in') +Default(['foo bar']) +""" % python) + +test.write(['five', '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']: +for dir in ['one', 'two', 'three', 'four', 'five']: foo_in = os.path.join(dir, 'foo.in') bar_in = os.path.join(dir, 'bar.in') @@ -94,8 +103,12 @@ 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.fail_test(os.path.exists(test.workpath('four', 'foo'))) +test.fail_test(os.path.exists(test.workpath('four', 'bar'))) +test.fail_test(test.read(test.workpath('four', 'foo bar')) != "four/foo.in\n") + +test.fail_test(test.read(test.workpath('five', 'foo.out')) != "five/foo.in\n") +test.fail_test(test.read(test.workpath('five', 'bar.out')) != "five/bar.in\n") |