diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-05-21 06:06:27 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-05-21 06:06:27 (GMT) |
commit | 935e698566833e2c50898f39f565414404c68cbd (patch) | |
tree | 140962ae0b8ebef170e83e21092fec4f510e91d4 /QMTest | |
parent | b040d94fad9024d5715d22cdc071384e827696b2 (diff) | |
download | SCons-935e698566833e2c50898f39f565414404c68cbd.zip SCons-935e698566833e2c50898f39f565414404c68cbd.tar.gz SCons-935e698566833e2c50898f39f565414404c68cbd.tar.bz2 |
Update deprecated features to the next life-cycle stage
Diffstat (limited to 'QMTest')
-rw-r--r-- | QMTest/TestSCons.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index f9e2250..2122977 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -409,6 +409,26 @@ class TestSCons(TestCommon): kw['arguments'] = option + ' ' + arguments return self.run(**kw) + def deprecated_warning(self, warn, msg): + """ + Verifies the expected behavior occurs for deprecation warnings. + TODO: Need something else for deprecation errors. + """ + # all warnings off, should get no output + self.run(arguments = '--warn=no-deprecated .', stderr='') + + # warning enabled, should get expected output + stderr = '\nscons: warning: ' + re_escape(msg) + '\n' + file_expr + self.run(arguments = '--warn=%s .' % warn, stderr=stderr) + + # no --warn option, should get either nothing or expected output + expect = """()|(%s)""" % (stderr) + self.run(arguments = '--warn=no-%s .' % warn, stderr=expect) + + # warning disabled, should get either nothing or mandatory message + expect = """()|(Can not disable mandataory warning: 'no-%s'\n\n%s)""" % (warn, stderr) + self.run(arguments = '--warn=no-%s .' % warn, stderr=expect) + def diff_substr(self, expect, actual, prelen=20, postlen=40): i = 0 for x, y in zip(expect, actual): |