diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2024-06-23 18:16:50 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2024-06-23 18:16:50 +0000 |
commit | f0a091c06a8c2b2071ad93423280c218fa1cd405 (patch) | |
tree | c49b206ff2a1d88393126094c5b32d617028025d /Build/source/texk/web2c | |
parent | 88095a6fd0357a19ddb407b70e301be826c6bb46 (diff) |
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
Diffstat (limited to 'Build/source/texk/web2c')
-rwxr-xr-x | Build/source/texk/web2c/tests/fix-changefile-lines.py | 4 |
1 files changed, 4 insertions, 0 deletions
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)") |