diff options
Diffstat (limited to 'Build/source/texk/web2c/tests/fix-changefile-lines.py')
-rwxr-xr-x | Build/source/texk/web2c/tests/fix-changefile-lines.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py index 6a40e5127f5..1f763fbda99 100755 --- a/Build/source/texk/web2c/tests/fix-changefile-lines.py +++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py @@ -127,9 +127,7 @@ class ChangeReader: while True: self._pos += 1 if self._pos >= len(self._lines): - eprint( - f"ERROR: Missing @y for @x on l.{self._chunk_start + 1} in change file" - ) + eprint(f"! Change file ended before @y. (l. {self._pos+1} of change file)") sys.exit(1) line = self._lines[self._pos] if line.startswith("@y"): @@ -137,6 +135,10 @@ class ChangeReader: self._chunk_start + 1 : self._pos ] return True + elif line.startswith("@x") or line.startswith("@z"): + eprint(f"! Where is the matching @y?. (l. {self._pos+1} of change file)") + eprint(line) + sys.exit(1) self._pos += 1 return False @@ -149,8 +151,8 @@ class ChangeReader: try: (part, section, line_number), tex_line = web_reader.next_line() except: - eprint("ERROR: Could not find match for line:") - eprint(f" {self._match_lines[0]}") + eprint(f"! Change file entry did not match. (l. {self._chunk_start+2} of change file)") + eprint(self._match_lines[0]) sys.exit(1) if tex_line == self._match_lines[0]: for i in range(1, len(self._match_lines)): @@ -159,8 +161,8 @@ class ChangeReader: except: tex_line = None if tex_line is None or tex_line != self._match_lines[i]: - eprint("ERROR: Could not match all lines following match line:") - eprint(f" {self._match_lines[0]}") + eprint(f"! Change file entry did not match. (l. {self._chunk_start+2+i} of change file)") + eprint(self._match_lines[i]) sys.exit(1) return part, section, line_number |