Mercurial > hg
diff tests/run-tests.py @ 35381:14fd435763ee
run-tests: suggest a (glob) for os.path.sep mismatches with '\r\n' EOL too
We already do this for lines ending in '\n', such that the test only needs to be
run with --interactive and the changes accepted at the end. But that wasn't
working with list-tree.py output for example, and required manual fixup.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 10 Dec 2017 00:00:36 -0500 |
parents | 8e72f9152c4d |
children | dfae14354660 |
line wrap: on
line diff
--- a/tests/run-tests.py Sat Dec 09 23:46:44 2017 -0500 +++ b/tests/run-tests.py Sun Dec 10 00:00:36 2017 -0500 @@ -1610,8 +1610,10 @@ if l.endswith(b" (glob)\n"): l = l[:-8] + b"\n" return TTest.globmatch(el[:-8], l) or retry - if os.altsep and l.replace(b'\\', b'/') == el: - return b'+glob' + if os.altsep: + _l = l.replace(b'\\', b'/') + if el == _l or os.name == 'nt' and el[:-1] + b'\r\n' == _l: + return b'+glob' return retry @staticmethod