diff options
author | Steven Knight <knight@baldmt.com> | 2002-12-16 16:05:47 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-12-16 16:05:47 (GMT) |
commit | 1f839d9933b456ba4ebb5098ce1f9ab01f398a94 (patch) | |
tree | 7165ff465bd2952e77af3b5de4d1690af0e4cacc /test | |
parent | 87f783b6bdbdfe77ba3d92f41f7e0e9cda0de2d4 (diff) | |
download | SCons-1f839d9933b456ba4ebb5098ce1f9ab01f398a94.zip SCons-1f839d9933b456ba4ebb5098ce1f9ab01f398a94.tar.gz SCons-1f839d9933b456ba4ebb5098ce1f9ab01f398a94.tar.bz2 |
Make the 'Do not know how to build' error message catch more cases. (Anthony Roach)
Diffstat (limited to 'test')
-rw-r--r-- | test/SideEffect.py | 1 | ||||
-rw-r--r-- | test/nonexistent.py | 32 | ||||
-rw-r--r-- | test/option--U.py | 7 |
3 files changed, 35 insertions, 5 deletions
diff --git a/test/SideEffect.py b/test/SideEffect.py index 3f3b75d..29acb83 100644 --- a/test/SideEffect.py +++ b/test/SideEffect.py @@ -70,7 +70,6 @@ test.write('bar.in', 'bar.in 2 \n') test.run(arguments = 'log.txt', stdout=test.wrap_stdout("""\ copy() < bar.in > bar.out copy() < blat.in > blat.out -scons: Nothing to be done for `log.txt'. """)) expect = """\ diff --git a/test/nonexistent.py b/test/nonexistent.py index 6219c1c..57bf5e1 100644 --- a/test/nonexistent.py +++ b/test/nonexistent.py @@ -38,6 +38,8 @@ test.write('SConstruct', """ env = Environment() env.Command("aaa.out", "aaa.in", "should never get executed") env.Command("bbb.out", "bbb.in", "should never get executed") +File('xxx') +Dir('ddd') """) test.run(arguments = 'foo', @@ -46,7 +48,6 @@ test.run(arguments = 'foo', test.run(arguments = '-k foo/bar foo', stderr = """scons: *** Do not know how to make target `foo/bar'. -scons: *** Do not know how to make target `foo'. """, status = 2) @@ -60,4 +61,33 @@ scons: *** No Builder for target `aaa.in', needed by `aaa.out'. """, status = 2) +test.run(arguments = '-k aaa.in bbb.in', + stderr = """scons: *** Do not know how to make target `aaa.in'. +scons: *** Do not know how to make target `bbb.in'. +""", + status = 2) + + +test.run(arguments = 'xxx', + stderr = "scons: *** Do not know how to make target `xxx'. Stop.\n", + status = 2) + +test.run(arguments = 'ddd') + + +# Make sure that SCons doesn't print up-to-date messages for non-derived files that exist: +test.write('SConstruct', """ +File('xxx') +""") + +test.write('xxx', "xxx") + +test.run(arguments='xxx', stdout=test.wrap_stdout("""\ +scons: Nothing to be done for `xxx'. +""")) + +test.run(arguments='xxx', stdout=test.wrap_stdout("""\ +scons: Nothing to be done for `xxx'. +""")) + test.pass_test() diff --git a/test/option--U.py b/test/option--U.py index 4e8b408..d700267 100644 --- a/test/option--U.py +++ b/test/option--U.py @@ -144,10 +144,11 @@ Default('.') test.run(chdir = 'sub4', arguments = '-U') test.write('SConstruct', """ -Default('no_a_target.in') +Default('not_a_target.in') """) -# The following should result in an error, but because of bug 642327, it doesn't: -test.run(arguments = '-U') +test.run(arguments = '-U', status=2, stderr="""\ +scons: *** Do not know how to make target `not_a_target.in'. Stop. +""") test.pass_test() |