diff options
author | Steven Knight <knight@baldmt.com> | 2003-05-19 03:01:10 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-05-19 03:01:10 (GMT) |
commit | a371da732f6b9bdf35639b88b0e6b8370b088261 (patch) | |
tree | c485f67398f32e8851d5e7ecad397c709cbaa464 /test | |
parent | a4a6636bb15d7544abb5ee360aff6c7bb9ee21be (diff) | |
download | SCons-a371da732f6b9bdf35639b88b0e6b8370b088261.zip SCons-a371da732f6b9bdf35639b88b0e6b8370b088261.tar.gz SCons-a371da732f6b9bdf35639b88b0e6b8370b088261.tar.bz2 |
Change the Building message to say Cleaning when the -c option is used.
Diffstat (limited to 'test')
-rw-r--r-- | test/option-c.py | 27 | ||||
-rw-r--r-- | test/option-n.py | 9 |
2 files changed, 25 insertions, 11 deletions
diff --git a/test/option-c.py b/test/option-c.py index 482525d..c149c2a 100644 --- a/test/option-c.py +++ b/test/option-c.py @@ -72,8 +72,15 @@ test.fail_test(test.read(test.workpath('foo2.xxx')) != "foo2.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") +def wrap_clean_stdout(string): + return "scons: Reading SConscript files ...\n" + \ + "scons: done reading SConscript files.\n" + \ + "scons: Cleaning targets ...\n" + \ + string + \ + "scons: done cleaning targets.\n" + test.run(arguments = '-c foo1.out', - stdout = test.wrap_stdout("Removed foo1.out\n")) + stdout = wrap_clean_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.xxx'))) @@ -81,7 +88,7 @@ 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 foo2.xxx', - stdout = test.wrap_stdout("Removed foo2.xxx\nRemoved foo2.out\n")) + stdout = wrap_clean_stdout("Removed foo2.xxx\nRemoved foo2.out\n")) test.fail_test(os.path.exists(test.workpath('foo1.out'))) test.fail_test(os.path.exists(test.workpath('foo2.xxx'))) @@ -89,7 +96,7 @@ 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', - stdout = test.wrap_stdout("Removed foo3.out\n")) + stdout = wrap_clean_stdout("Removed foo3.out\n")) test.fail_test(os.path.exists(test.workpath('foo1.out'))) test.fail_test(os.path.exists(test.workpath('foo2.xxx'))) @@ -108,7 +115,7 @@ if hasattr(os, 'symlink'): test.fail_test(not os.path.islink(test.workpath('symlink2'))) test.run(arguments = '-c foo2.xxx', - stdout = test.wrap_stdout("Removed foo2.xxx\n")) + stdout = wrap_clean_stdout("Removed foo2.xxx\n")) test.fail_test(test.read(test.workpath('foo1.out')) != "foo1.in\n") test.fail_test(os.path.exists(test.workpath('foo2.xxx'))) @@ -127,7 +134,7 @@ if hasattr(os, 'symlink'): test.run(arguments = 'foo1.out foo2.out foo3.out') -expect = test.wrap_stdout("""Removed foo1.out +expect = wrap_clean_stdout("""Removed foo1.out Removed foo2.xxx Removed foo2.out Removed foo3.out @@ -145,7 +152,7 @@ test.fail_test(test.read(test.workpath('foo3.out')) != "foo3.in\n") test.writable('.', 0) f = open(test.workpath('foo1.out')) test.run(arguments = '-c foo1.out', - stdout = test.wrap_stdout("scons: Could not remove 'foo1.out': Permission denied\n")) + stdout = wrap_clean_stdout("scons: Could not remove 'foo1.out': Permission denied\n")) test.fail_test(not os.path.exists(test.workpath('foo1.out'))) f.close() test.writable('.', 1) @@ -172,7 +179,7 @@ test.write(['subd', 'SConscript'], """ Clean('.', 'foox.in') """) -expect = test.wrap_stdout("""Removed foo2.xxx +expect = wrap_clean_stdout("""Removed foo2.xxx Removed aux1.x Removed aux2.x """) @@ -182,11 +189,11 @@ test.fail_test(os.path.exists(test.workpath('foo2.xxx'))) test.fail_test(test.read(test.workpath('foo2.out')) != "foo2.in\n") test.fail_test(test.read(test.workpath('foo3.out')) != "foo3.in\n") -expect = test.wrap_stdout("Removed %s\n" % os.path.join('subd', 'foox.in')) +expect = wrap_clean_stdout("Removed %s\n" % os.path.join('subd', 'foox.in')) test.run(arguments = '-c subd', stdout=expect) test.fail_test(os.path.exists(test.workpath('foox.in'))) -expect = test.wrap_stdout("""Removed foo1.out +expect = wrap_clean_stdout("""Removed foo1.out Removed foo2.xxx Removed foo2.out Removed foo3.out @@ -196,7 +203,7 @@ Removed directory subd """ % (os.path.join('subd','SConscript'), os.path.join('subd', 'foon.in'))) test.run(arguments = '-c -n .', stdout=expect) -expect = test.wrap_stdout("""Removed foo1.out +expect = wrap_clean_stdout("""Removed foo1.out Removed foo2.out Removed foo3.out Removed %s diff --git a/test/option-n.py b/test/option-n.py index 348c20c..b71648d 100644 --- a/test/option-n.py +++ b/test/option-n.py @@ -111,7 +111,14 @@ test.run(arguments = args) test.fail_test(not os.path.exists(test.workpath('f1.out'))) test.fail_test(not os.path.exists(test.workpath('f2.out'))) -expect = test.wrap_stdout("Removed f1.out\nRemoved f2.out\n") +def wrap_clean_stdout(string): + return "scons: Reading SConscript files ...\n" + \ + "scons: done reading SConscript files.\n" + \ + "scons: Cleaning targets ...\n" + \ + string + \ + "scons: done cleaning targets.\n" + +expect = wrap_clean_stdout("Removed f1.out\nRemoved f2.out\n") test.run(arguments = '-n -c ' + args, stdout = expect) |