Show More
@@ -105,9 +105,13 b' if sys.version_info > (3, 5, 0):' | |||||
105 | PYTHON3 = True |
|
105 | PYTHON3 = True | |
106 | xrange = range # we use xrange in one place, and we'd rather not use range |
|
106 | xrange = range # we use xrange in one place, and we'd rather not use range | |
107 | def _bytespath(p): |
|
107 | def _bytespath(p): | |
|
108 | if p is None: | |||
|
109 | return p | |||
108 | return p.encode('utf-8') |
|
110 | return p.encode('utf-8') | |
109 |
|
111 | |||
110 | def _strpath(p): |
|
112 | def _strpath(p): | |
|
113 | if p is None: | |||
|
114 | return p | |||
111 | return p.decode('utf-8') |
|
115 | return p.decode('utf-8') | |
112 |
|
116 | |||
113 | elif sys.version_info >= (3, 0, 0): |
|
117 | elif sys.version_info >= (3, 0, 0): | |
@@ -1383,7 +1387,8 b' class TTest(Test):' | |||||
1383 | else: |
|
1387 | else: | |
1384 | m = optline.match(el) |
|
1388 | m = optline.match(el) | |
1385 | if m: |
|
1389 | if m: | |
1386 |
conditions = [ |
|
1390 | conditions = [ | |
|
1391 | c for c in m.group(2).split(b' ')] | |||
1387 |
|
1392 | |||
1388 | if not self._hghave(conditions)[0]: |
|
1393 | if not self._hghave(conditions)[0]: | |
1389 | optional.append(i) |
|
1394 | optional.append(i) | |
@@ -1497,7 +1502,7 b' class TTest(Test):' | |||||
1497 | else: |
|
1502 | else: | |
1498 | m = optline.match(el) |
|
1503 | m = optline.match(el) | |
1499 | if m: |
|
1504 | if m: | |
1500 | conditions = [c for c in m.group(2).split(' ')] |
|
1505 | conditions = [c for c in m.group(2).split(b' ')] | |
1501 |
|
1506 | |||
1502 | el = m.group(1) + b"\n" |
|
1507 | el = m.group(1) + b"\n" | |
1503 | if not self._hghave(conditions)[0]: |
|
1508 | if not self._hghave(conditions)[0]: |
@@ -39,7 +39,7 b' def lm(expected, output):' | |||||
39 | and output.endswith(b'\n')), 'missing newline' |
|
39 | and output.endswith(b'\n')), 'missing newline' | |
40 | assert not re.search(br'[^ \w\\/\r\n()*?]', expected + output), \ |
|
40 | assert not re.search(br'[^ \w\\/\r\n()*?]', expected + output), \ | |
41 | b'single backslash or unknown char' |
|
41 | b'single backslash or unknown char' | |
42 | test = run_tests.TTest('test-run-test.t', '.', '.') |
|
42 | test = run_tests.TTest(b'test-run-test.t', b'.', b'.') | |
43 | match = test.linematch(expected, output) |
|
43 | match = test.linematch(expected, output) | |
44 | if isinstance(match, str): |
|
44 | if isinstance(match, str): | |
45 | return 'special: ' + match |
|
45 | return 'special: ' + match |
General Comments 0
You need to be logged in to leave comments.
Login now