# HG changeset patch # User Augie Fackler # Date 1429042179 14400 # Node ID 29e54fe22a3f2c93e094d52317ee7bbfc715d270 # Parent 0e0f1068b878e1c37ed6bc3009b07f6b11f81e40 run-tests: make sure all script lines are bytes diff -r 0e0f1068b878 -r 29e54fe22a3f tests/run-tests.py --- a/tests/run-tests.py Tue Apr 14 10:56:58 2015 -0400 +++ b/tests/run-tests.py Tue Apr 14 16:09:39 2015 -0400 @@ -928,9 +928,9 @@ inpython = False if self._debug: - script.append('set -x\n') + script.append(b'set -x\n') if os.getenv('MSYSTEM'): - script.append('alias pwd="pwd -W"\n') + script.append(b'alias pwd="pwd -W"\n') for n, l in enumerate(lines): if not l.endswith(b'\n'): @@ -940,7 +940,7 @@ if len(lsplit) < 2 or lsplit[0] != b'#require': after.setdefault(pos, []).append(' !!! invalid #require\n') if not self._hghave(lsplit[1:]): - script = ["exit 80\n"] + script = [b"exit 80\n"] break after.setdefault(pos, []).append(l) elif l.startswith(b'#if'): @@ -979,15 +979,15 @@ script.append(l[2:]) elif l.startswith(b' $ '): # commands if inpython: - script.append('EOF\n') + script.append(b'EOF\n') inpython = False after.setdefault(pos, []).append(l) prepos = pos pos = n addsalt(n, False) cmd = l[4:].split() - if len(cmd) == 2 and cmd[0] == 'cd': - l = ' $ cd %s || exit 1\n' % cmd[1] + if len(cmd) == 2 and cmd[0] == b'cd': + l = b' $ cd %s || exit 1\n' % cmd[1] script.append(l[4:]) elif l.startswith(b' > '): # continuations after.setdefault(prepos, []).append(l) @@ -997,13 +997,13 @@ expected.setdefault(pos, []).append(l[2:]) else: if inpython: - script.append('EOF\n') + script.append(b'EOF\n') inpython = False # Non-command/result. Queue up for merged output. after.setdefault(pos, []).append(l) if inpython: - script.append('EOF\n') + script.append(b'EOF\n') if skipping is not None: after.setdefault(pos, []).append(' !!! missing #endif\n') addsalt(n + 1, False)