diff options
author | Steven Knight <knight@baldmt.com> | 2003-09-10 13:19:03 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-09-10 13:19:03 (GMT) |
commit | e181e48bb62502b88107536c2e8dbd5886bf17fd (patch) | |
tree | e835fcf4a2cf7f45f7af2386a58e1104c6ecc710 /test/SourceCode.py | |
parent | e10b74a59f1830769ba4c7e65a846228812ae2fa (diff) | |
download | SCons-e181e48bb62502b88107536c2e8dbd5886bf17fd.zip SCons-e181e48bb62502b88107536c2e8dbd5886bf17fd.tar.gz SCons-e181e48bb62502b88107536c2e8dbd5886bf17fd.tar.bz2 |
Make a Clean() environment method. Add global functions for AlwaysBuild(), Command(), Depends(), Ignore(), Install(), InstallAs(), Precious(), SideEffect() and SourceCode().
Diffstat (limited to 'test/SourceCode.py')
-rw-r--r-- | test/SourceCode.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/SourceCode.py b/test/SourceCode.py index cd8baf4..de2653f 100644 --- a/test/SourceCode.py +++ b/test/SourceCode.py @@ -35,7 +35,7 @@ import TestSCons test = TestSCons.TestSCons() -test.subdir('sub') +test.subdir('sub', 'sub2') test.write('SConstruct', """\ import os.path @@ -62,11 +62,15 @@ env.Cat('ccc.out', 'sub/ccc.in') env.Cat('all', ['aaa.out', 'bbb.out', 'ccc.out']) env.SourceCode('$SUBDIR', Builder(action=sc_cat, env=env)) SConscript('sub/SConscript', "env") + +SourceCode('sub2', Builder(action=sc_cat, env=env)) +env.Cat('ddd.out', 'sub2/ddd.in') """) test.write(['sub', 'sc-aaa.in'], "sub/sc-aaa.in\n") test.write(['sub', 'sc-bbb.in'], "sub/sc-bbb.in\n") test.write(['sub', 'sc-ccc.in'], "sub/sc-ccc.in\n") +test.write(['sub2', 'sc-ddd.in'], "sub2/sc-ddd.in\n") test.write(['sub', 'sc-SConscript'], "'sub/sc-SConscript'\n") @@ -82,14 +86,19 @@ cat("bbb.out", "%s") sc_cat("%s", []) cat("ccc.out", "%s") cat("all", ["aaa.out", "bbb.out", "ccc.out"]) +sc_cat("%s", []) +cat("ddd.out", "%s") """ % (os.path.join('sub', 'aaa.in'), os.path.join('sub', 'aaa.in'), os.path.join('sub', 'bbb.in'), os.path.join('sub', 'bbb.in'), os.path.join('sub', 'ccc.in'), - os.path.join('sub', 'ccc.in')))) + os.path.join('sub', 'ccc.in'), + os.path.join('sub2', 'ddd.in'), + os.path.join('sub2', 'ddd.in')))) test.fail_test(test.read(['sub', 'SConscript']) != "'sub/sc-SConscript'\n") test.fail_test(test.read('all') != "sub/sc-aaa.in\nsub/sc-bbb.in\nsub/sc-ccc.in\n") +test.fail_test(test.read('ddd.out') != "sub2/sc-ddd.in\n") test.pass_test() |