Mercurial > hg-stable
changeset 25060:29e54fe22a3f
run-tests: make sure all script lines are bytes
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 14 Apr 2015 16:09:39 -0400 |
parents | 0e0f1068b878 |
children | 625dd917f04f |
files | tests/run-tests.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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)