diff options
author | Steven Knight <knight@baldmt.com> | 2009-12-15 06:35:05 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-12-15 06:35:05 (GMT) |
commit | 3771ce697111a708f23ca69c60ad4ca7bc1030e4 (patch) | |
tree | ca33cdc9e3374ef2ac6542edddec954568eb75ea /QMTest | |
parent | 297837e8a1f6abf3c888c340a80a40107ac93ce3 (diff) | |
download | SCons-3771ce697111a708f23ca69c60ad4ca7bc1030e4.zip SCons-3771ce697111a708f23ca69c60ad4ca7bc1030e4.tar.gz SCons-3771ce697111a708f23ca69c60ad4ca7bc1030e4.tar.bz2 |
Add a TestSCons.option_not_yet_implemented() method and use it so
the tests of those options expect an exit status of 1.
Diffstat (limited to 'QMTest')
-rw-r--r-- | QMTest/TestSCons.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index f73de04..e698f4e 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -412,6 +412,25 @@ class TestSCons(TestCommon): kw['match'] = self.match_re_dotall apply(self.run, [], kw) + def option_not_yet_implemented(self, option, arguments=None, **kw): + """ + Verifies expected behavior for options that are not yet implemented: + a warning message, and exit status 1. + """ + msg = "Warning: the %s option is not yet implemented\n" % option + kw['stderr'] = msg + kw['status'] = 1 + if arguments: + # If it's a long option and the argument string begins with '=', + # it's of the form --foo=bar and needs no separating space. + if option[:2] == '--' and arguments[0] == '=': + kw['arguments'] = option + arguments + else: + kw['arguments'] = option + ' ' + arguments + # TODO(1.5) + #return self.run(**kw) + return apply(self.run, (), kw) + def diff_substr(self, expect, actual, prelen=20, postlen=40): i = 0 for x, y in zip(expect, actual): |