gbranden pushed a commit to branch master
in repository groff.
commit a813adf748df37505c1b057ad92aa19942ca8fde
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Dec 20 00:17:22 2025 -0600
[groff]: Add still more delimiter tests.
* src/roff/groff/tests/check-delimiter-validity.sh: Check
unparameterized and invalid escape sequences for usability as escape
sequence delimiters. See Savannah #67375.
---
ChangeLog | 6 ++++++
src/roff/groff/tests/check-delimiter-validity.sh | 17 +++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 75dca3fec..95ae4a3c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-12-20 G. Branden Robinson <[email protected]>
+
+ * src/roff/groff/tests/check-delimiter-validity.sh: Check
+ unparameterized and invalid escape sequences for usability as
+ escape sequence delimiters. See Savannah #67375.
+
2025-12-19 G. Branden Robinson <[email protected]>
* src/roff/troff/input.cpp (read_title_parts): Throw deprecation
diff --git a/src/roff/groff/tests/check-delimiter-validity.sh
b/src/roff/groff/tests/check-delimiter-validity.sh
index fc02522d3..c1792b952 100755
--- a/src/roff/groff/tests/check-delimiter-validity.sh
+++ b/src/roff/groff/tests/check-delimiter-validity.sh
@@ -81,6 +81,23 @@ do
echo "$output" | grep -Eqx '1 +2 +3' || wail
done
+# Test unparameterized and invalid escape sequences. The latter degrade
+# to ordinary characters. See below regarding `\0`, `\^`, and `\|`.
+for c in E G I J K P T U W \
+ a c d e i j p q r t u y \
+ / % '<' '>' = '&' : ')' \
+ "'" ',' ';' \
+ '@' ']' '^' '_' \
+ '`' '{' '}' '~'
+do
+ echo 'checking validity of backslash-"'$c'"' \
+ "as escape sequence delimiter when not in compatibility mode" \
+ >&2
+ output=$(printf '\\l%c1n+2n\\&0%c\n' "$c" "$c" \
+ | "$groff" -w delim -T ascii | sed '/^$/d')
+ echo "$output" | grep -Fqx 000 || wail
+done
+
for c in 0 1 2 3 4 5 6 7 8 9 + - '(' . '|'
do
echo "checking invalidity of '$c' as escape sequence delimiter" \
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit