comparison tests/run-tests.py @ 23077:605a8cb61a0c stable

run-tests: output diffs with only forward slashes This removes some gratuitous variance when testing on Windows with test-run-tests.t.
author Matt Mackall <mpm@selenic.com>
date Thu, 23 Oct 2014 13:44:34 -0500
parents 5ba11ab48fcf
children e53f6b72a0e4
comparison
equal deleted inserted replaced
23076:c312ef382033 23077:605a8cb61a0c
296 def getdiff(expected, output, ref, err): 296 def getdiff(expected, output, ref, err):
297 servefail = False 297 servefail = False
298 lines = [] 298 lines = []
299 for line in difflib.unified_diff(expected, output, ref, err): 299 for line in difflib.unified_diff(expected, output, ref, err):
300 if line.startswith('+++') or line.startswith('---'): 300 if line.startswith('+++') or line.startswith('---'):
301 line = line.replace('\\', '/')
301 if line.endswith(' \n'): 302 if line.endswith(' \n'):
302 line = line[:-2] + '\n' 303 line = line[:-2] + '\n'
303 lines.append(line) 304 lines.append(line)
304 if not servefail and line.startswith( 305 if not servefail and line.startswith(
305 '+ abort: child process failed to start'): 306 '+ abort: child process failed to start'):