diff options
author | Steven Knight <knight@baldmt.com> | 2001-10-09 12:48:14 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-10-09 12:48:14 (GMT) |
commit | 66023265da41384cfe0d491bdb50747e1724476e (patch) | |
tree | d9650dfa6787a54dfc22747be7ca1562756219a6 /test | |
parent | 6ab2fc4ae2f0de33b77049bf222269288f56cb94 (diff) | |
download | SCons-66023265da41384cfe0d491bdb50747e1724476e.zip SCons-66023265da41384cfe0d491bdb50747e1724476e.tar.gz SCons-66023265da41384cfe0d491bdb50747e1724476e.tar.bz2 |
Add support for -c (clean targets).
Diffstat (limited to 'test')
-rw-r--r-- | test/option-c.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/option-c.py b/test/option-c.py index b7f6c17..d403e04 100644 --- a/test/option-c.py +++ b/test/option-c.py @@ -29,8 +29,6 @@ import TestSCons test = TestSCons.TestSCons() -test.pass_test() #XXX Short-circuit until this is implemented. - test.write('build.py', r""" import sys contents = open(sys.argv[2], 'r').read() @@ -40,7 +38,7 @@ file.close() """) test.write('SConstruct', """ -B = Builder(name = 'B', action = "python ../build.py %(target)s %(source)s") +B = Builder(name = 'B', action = "python build.py %(target)s %(source)s") env = Environment(BUILDERS = [B]) env.B(target = 'foo1.out', source = 'foo1.in') env.B(target = 'foo2.out', source = 'foo2.in') @@ -59,19 +57,19 @@ test.fail_test(test.read(test.workpath('foo1.out')) != "foo1.in\n") test.fail_test(test.read(test.workpath('foo2.out')) != "foo2.in\n") test.fail_test(test.read(test.workpath('foo3.out')) != "foo3.in\n") -test.run(arguments = '-c foo1.out') +test.run(arguments = '-c foo1.out', stdout = "Removed foo1.out\n") test.fail_test(os.path.exists(test.workpath('foo1.out'))) test.fail_test(not os.path.exists(test.workpath('foo2.out'))) test.fail_test(not os.path.exists(test.workpath('foo3.out'))) -test.run(arguments = '--clean foo2.out') +test.run(arguments = '--clean foo2.out', stdout = "Removed foo2.out\n") test.fail_test(os.path.exists(test.workpath('foo1.out'))) test.fail_test(os.path.exists(test.workpath('foo2.out'))) test.fail_test(not os.path.exists(test.workpath('foo3.out'))) -test.run(arguments = '--remove foo3.out') +test.run(arguments = '--remove foo3.out', stdout = "Removed foo3.out\n") test.fail_test(os.path.exists(test.workpath('foo1.out'))) test.fail_test(os.path.exists(test.workpath('foo2.out'))) @@ -79,11 +77,13 @@ test.fail_test(os.path.exists(test.workpath('foo3.out'))) test.run(arguments = 'foo1.out foo2.out foo3.out') -test.run(program = test.workpath('foo1.out'), stdout = "foo1.in\n") -test.run(program = test.workpath('foo2.out'), stdout = "foo2.in\n") -test.run(program = test.workpath('foo3.out'), stdout = "foo3.in\n") +test.fail_test(test.read(test.workpath('foo1.out')) != "foo1.in\n") +test.fail_test(test.read(test.workpath('foo2.out')) != "foo2.in\n") +test.fail_test(test.read(test.workpath('foo3.out')) != "foo3.in\n") -test.run(arguments = '-c .') +#XXXtest.run(arguments = '-c .', +test.run(arguments = '-c foo1.out foo2.out foo3.out', + stdout = "Removed foo1.out\nRemoved foo2.out\nRemoved foo3.out\n") test.fail_test(os.path.exists(test.workpath('foo1.out'))) test.fail_test(os.path.exists(test.workpath('foo2.out'))) |