diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
commit | 22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch) | |
tree | 0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/AddOption | |
parent | 75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff) | |
download | SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.zip SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.gz SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.bz2 |
Move 2.0 changes collected in branches/pending back to trunk for further
development. Note that this set of changes is NOT backward-compatible;
the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
Diffstat (limited to 'test/AddOption')
-rw-r--r-- | test/AddOption/help.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/AddOption/help.py b/test/AddOption/help.py index 7b5c01d..26b9775 100644 --- a/test/AddOption/help.py +++ b/test/AddOption/help.py @@ -21,6 +21,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +from __future__ import generators ### KEEP FOR COMPATIBILITY FIXERS __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -29,8 +30,6 @@ Verify the help text when the AddOption() function is used (and when it's not). """ -import string - import TestSCons test = TestSCons.TestSCons() @@ -56,27 +55,27 @@ expected_lines = [ ] test.run(arguments = '-h') -lines = string.split(test.stdout(), '\n') -missing = filter(lambda e, l=lines: not e in l, expected_lines) +lines = test.stdout().split('\n') +missing = [e for e in expected_lines if e not in lines] if missing: print "====== STDOUT:" print test.stdout() print "====== Missing the following lines in the above AddOption() help output:" - print string.join(missing, "\n") + print "\n".join(missing) test.fail_test() test.unlink('SConstruct') test.run(arguments = '-h') -lines = string.split(test.stdout(), '\n') -unexpected = filter(lambda e, l=lines: e in l, expected_lines) +lines = test.stdout().split('\n') +unexpected = [e for e in expected_lines if e in lines] if unexpected: print "====== STDOUT:" print test.stdout() print "====== Unexpected lines in the above non-AddOption() help output:" - print string.join(unexpected, "\n") + print "\n".join(unexpected) test.fail_test() test.pass_test() |