tests/test-run-tests.py
changeset 38554 f83600efa1ca
parent 35382 dfae14354660
child 41759 aaad36b88298
equal deleted inserted replaced
38553:3fb46734508d 38554:f83600efa1ca
    38     assert (expected.endswith(b'\n')
    38     assert (expected.endswith(b'\n')
    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(b'test-run-test.t', b'.', b'.')
    42     test = run_tests.TTest(b'test-run-test.t', b'.', b'.')
    43     match = test.linematch(expected, output)
    43     match, exact = test.linematch(expected, output)
    44     if isinstance(match, str):
    44     if isinstance(match, str):
    45         return 'special: ' + match
    45         return 'special: ' + match
    46     elif isinstance(match, bytes):
    46     elif isinstance(match, bytes):
    47         return 'special: ' + match.decode('utf-8')
    47         return 'special: ' + match.decode('utf-8')
    48     else:
    48     else: