From f0a091c06a8c2b2071ad93423280c218fa1cd405 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Sun, 23 Jun 2024 18:16:50 +0000 Subject: Catch spurious @y. The author of the change most likely mistyped @y for @z. Note that we can not catch an @x in place of @z at this time. The f-c-l script starts a change hunk whenever it encounters @x. Only a second @x triggers an error---in slight deviation from CWEB's behavior. git-svn-id: svn://tug.org/texlive/trunk@71599 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/tests/fix-changefile-lines.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Build/source/texk/web2c') diff --git a/Build/source/texk/web2c/tests/fix-changefile-lines.py b/Build/source/texk/web2c/tests/fix-changefile-lines.py index 1f763fbda99..4ba0f0cb523 100755 --- a/Build/source/texk/web2c/tests/fix-changefile-lines.py +++ b/Build/source/texk/web2c/tests/fix-changefile-lines.py @@ -122,6 +122,9 @@ class ChangeReader: while self._pos < len(self._lines): line = self._lines[self._pos] + if line.startswith("@y"): + eprint(f"! Where is the matching @z?. (l. {self._pos+1} of change file)") + sys.exit(1) if line.startswith("@x"): self._chunk_start = self._pos while True: @@ -134,6 +137,7 @@ class ChangeReader: self._match_lines = self._lines[ self._chunk_start + 1 : self._pos ] + self._pos += 1 return True elif line.startswith("@x") or line.startswith("@z"): eprint(f"! Where is the matching @y?. (l. {self._pos+1} of change file)") -- cgit v1.2.3