diff options
Diffstat (limited to 'test/emitter.py')
-rw-r--r-- | test/emitter.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/emitter.py b/test/emitter.py index 7fc14f0..70d4c8f 100644 --- a/test/emitter.py +++ b/test/emitter.py @@ -30,6 +30,8 @@ import os.path test = TestSCons.TestSCons() +test.subdir('src') + test.write('SConstruct',""" BuildDir('var1', 'src', duplicate=0) BuildDir('var2', 'src', duplicate=1) @@ -38,10 +40,6 @@ SConscript('var1/SConscript') SConscript('var2/SConscript') """) -test.subdir('src') - -test.write('src/f.in', 'f.in') - test.write('src/SConscript',""" def build(target, source, env): for t in target: @@ -55,8 +53,12 @@ b = Builder(action=build, emitter=emitter) env=Environment(BUILDERS={ 'foo': b }) env.foo('f.out', 'f.in') +env.foo(File('g.out'), 'g.in') """) +test.write(['src', 'f.in'], 'f.in') +test.write(['src', 'g.in'], 'g.in') + test.run(arguments='.') test.fail_test(not os.path.exists(test.workpath('src', 'f.out'))) @@ -66,4 +68,11 @@ test.fail_test(not os.path.exists(test.workpath('var1', 'f.out.foo'))) test.fail_test(not os.path.exists(test.workpath('var2', 'f.out'))) test.fail_test(not os.path.exists(test.workpath('var2', 'f.out.foo'))) +test.fail_test(not os.path.exists(test.workpath('src', 'g.out'))) +test.fail_test(not os.path.exists(test.workpath('src', 'g.out.foo'))) +test.fail_test(not os.path.exists(test.workpath('var1', 'g.out'))) +test.fail_test(not os.path.exists(test.workpath('var1', 'g.out.foo'))) +test.fail_test(not os.path.exists(test.workpath('var2', 'g.out'))) +test.fail_test(not os.path.exists(test.workpath('var2', 'g.out.foo'))) + test.pass_test() |