[PATCH 2 of 2] tests: ensure run-tests handles multiple lines of churn
timeless at gmail.com
Thu Mar 24 17:51:49 EDT 2016
On Thu, Mar 24, 2016 at 5:42 PM, timeless <timeless at gmail.com> wrote:
> Yuya Nishihara wrote:
>> This somehow failed on Windows. Can you take a look?
> That's because of:
> def linematch(el, l):
ok, not this:
> ... Windows goes through this path (which is totally broken):
> if el == l or os.name == 'nt' and el[:-1] + b'\r\n' == l:
> return True
Everyone goes through here:
> if el.endswith(b" (glob)\n"):
> # ignore '(glob)' added to l by 'replacements'
> if l.endswith(b" (glob)\n"):
> l = l[:-8] + b"\n"
The problem is in here:
> return TTest.globmatch(el[:-8], l)
def globmatch(el, l):
# The only supported special characters are * and ? plus / which also
# matches \ on windows. Escaping of these characters is supported.
if el + b'\n' == l:
# matching on "/" is not needed for this line
for pat in checkcodeglobpats:
On Windows, we trigger this:
Everyone else hits this:
If I disable the os.altsep -> return b'-glob', then the test would pass.
More information about the Mercurial-devel