##// END OF EJS Templates
run-tests: make sure all script lines are bytes
Augie Fackler -
r25060:29e54fe2 default
parent child Browse files
Show More
@@ -928,9 +928,9 b' class TTest(Test):'
928 inpython = False
928 inpython = False
929
929
930 if self._debug:
930 if self._debug:
931 script.append('set -x\n')
931 script.append(b'set -x\n')
932 if os.getenv('MSYSTEM'):
932 if os.getenv('MSYSTEM'):
933 script.append('alias pwd="pwd -W"\n')
933 script.append(b'alias pwd="pwd -W"\n')
934
934
935 for n, l in enumerate(lines):
935 for n, l in enumerate(lines):
936 if not l.endswith(b'\n'):
936 if not l.endswith(b'\n'):
@@ -940,7 +940,7 b' class TTest(Test):'
940 if len(lsplit) < 2 or lsplit[0] != b'#require':
940 if len(lsplit) < 2 or lsplit[0] != b'#require':
941 after.setdefault(pos, []).append(' !!! invalid #require\n')
941 after.setdefault(pos, []).append(' !!! invalid #require\n')
942 if not self._hghave(lsplit[1:]):
942 if not self._hghave(lsplit[1:]):
943 script = ["exit 80\n"]
943 script = [b"exit 80\n"]
944 break
944 break
945 after.setdefault(pos, []).append(l)
945 after.setdefault(pos, []).append(l)
946 elif l.startswith(b'#if'):
946 elif l.startswith(b'#if'):
@@ -979,15 +979,15 b' class TTest(Test):'
979 script.append(l[2:])
979 script.append(l[2:])
980 elif l.startswith(b' $ '): # commands
980 elif l.startswith(b' $ '): # commands
981 if inpython:
981 if inpython:
982 script.append('EOF\n')
982 script.append(b'EOF\n')
983 inpython = False
983 inpython = False
984 after.setdefault(pos, []).append(l)
984 after.setdefault(pos, []).append(l)
985 prepos = pos
985 prepos = pos
986 pos = n
986 pos = n
987 addsalt(n, False)
987 addsalt(n, False)
988 cmd = l[4:].split()
988 cmd = l[4:].split()
989 if len(cmd) == 2 and cmd[0] == 'cd':
989 if len(cmd) == 2 and cmd[0] == b'cd':
990 l = ' $ cd %s || exit 1\n' % cmd[1]
990 l = b' $ cd %s || exit 1\n' % cmd[1]
991 script.append(l[4:])
991 script.append(l[4:])
992 elif l.startswith(b' > '): # continuations
992 elif l.startswith(b' > '): # continuations
993 after.setdefault(prepos, []).append(l)
993 after.setdefault(prepos, []).append(l)
@@ -997,13 +997,13 b' class TTest(Test):'
997 expected.setdefault(pos, []).append(l[2:])
997 expected.setdefault(pos, []).append(l[2:])
998 else:
998 else:
999 if inpython:
999 if inpython:
1000 script.append('EOF\n')
1000 script.append(b'EOF\n')
1001 inpython = False
1001 inpython = False
1002 # Non-command/result. Queue up for merged output.
1002 # Non-command/result. Queue up for merged output.
1003 after.setdefault(pos, []).append(l)
1003 after.setdefault(pos, []).append(l)
1004
1004
1005 if inpython:
1005 if inpython:
1006 script.append('EOF\n')
1006 script.append(b'EOF\n')
1007 if skipping is not None:
1007 if skipping is not None:
1008 after.setdefault(pos, []).append(' !!! missing #endif\n')
1008 after.setdefault(pos, []).append(' !!! missing #endif\n')
1009 addsalt(n + 1, False)
1009 addsalt(n + 1, False)
General Comments 0
You need to be logged in to leave comments. Login now