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/option/help-options.py | |
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/option/help-options.py')
-rw-r--r-- | test/option/help-options.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/option/help-options.py b/test/option/help-options.py index 9a87306..0f4dd4d 100644 --- a/test/option/help-options.py +++ b/test/option/help-options.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,7 +30,6 @@ Verify behavior of the -H and --help-options options. """ import re -import string import TestSCons @@ -53,13 +53,13 @@ test.must_contain_all_lines(test.stdout(), expect) ignored_re = re.compile('.*Ignored for compatibility\\.\n', re.S) stdout = ignored_re.sub('', test.stdout()) -lines = string.split(stdout, '\n') -lines = filter(lambda x: x[:3] == ' -', lines) -lines = map(lambda x: x[3:], lines) -lines = map(lambda x: x[0] == '-' and x[1:] or x, lines) -options = map(lambda x: string.split(x)[0], lines) -options = map(lambda x: x[-1] == ',' and x[:-1] or x, options) -lowered = map(lambda x: string.lower(x), options) +lines = stdout.split('\n') +lines = [x for x in lines if x[:3] == ' -'] +lines = [x[3:] for x in lines] +lines = [x[0] == '-' and x[1:] or x for x in lines] +options = [x.split()[0] for x in lines] +options = [x[-1] == ',' and x[:-1] or x for x in options] +lowered = [x.lower() for x in options] sorted = lowered[:] sorted.sort() if lowered != sorted: |