From: stevenknight Date: Wed, 7 Apr 2004 00:58:04 +0000 (+0000) Subject: Make the targets/sources warnings test pass regardless of dictionary order. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=02487a04611838c25e23cfa6bd15533bb3f5faa0;p=scons.git Make the targets/sources warnings test pass regardless of dictionary order. git-svn-id: http://scons.tigris.org/svn/scons/trunk@950 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/test/option--warn.py b/test/option--warn.py index 0bf9a7e3..41a37e1a 100644 --- a/test/option--warn.py +++ b/test/option--warn.py @@ -158,10 +158,10 @@ test.write('file3b.out', 'file3b.out\n') test.run(arguments='.', stderr=r""" -scons: warning: Did you mean to use `target' instead of `targets'\? +scons: warning: Did you mean to use `(target|source)' instead of `(targets|sources)'\? File "SConstruct", line \d+, in .+ -scons: warning: Did you mean to use `source' instead of `sources'\? +scons: warning: Did you mean to use `(target|source)' instead of `(targets|sources)'\? File "SConstruct", line \d+, in .+ """) @@ -170,10 +170,10 @@ test.must_match(['file3b'], 'file3b.out\n') test.run(arguments='--warn=misleading-keywords .', stderr=r""" -scons: warning: Did you mean to use `target' instead of `targets'\? +scons: warning: Did you mean to use `(target|source)' instead of `(targets|sources)'\? File "SConstruct", line \d+, in .+ -scons: warning: Did you mean to use `source' instead of `sources'\? +scons: warning: Did you mean to use `(target|source)' instead of `(targets|sources)'\? File "SConstruct", line \d+, in .+ """) diff --git a/test/overrides.py b/test/overrides.py index eb43cedd..fa76b566 100644 --- a/test/overrides.py +++ b/test/overrides.py @@ -115,14 +115,14 @@ test.write('mylink.py',""" open('goodbye.not_exe', 'wt').write('this is not a program!') """) -test.run(arguments='goodbye.not_exe', stderr="""\ - -scons: warning: Did you mean to use `target' instead of `targets'? -File "SConstruct", line 8, in ? - -scons: warning: Did you mean to use `source' instead of `sources'? -File "SConstruct", line 8, in ? -""") +test.run(arguments='goodbye.not_exe', stderr=None) +test.fail_test(not test.match_re(test.stderr(), r""" +scons: warning: Did you mean to use `(target|source)' instead of `(targets|sources)'\? +File "SConstruct", line \d+, in .+ + +scons: warning: Did you mean to use `(target|source)' instead of `(targets|sources)'\? +File "SConstruct", line \d+, in .+ +""")) assert test.read('goodbye.not_obj') == 'this is no object file!' assert test.read('goodbye.not_exe') == 'this is not a program!'