gbranden pushed a commit to branch master
in repository groff.

commit a0fb5b9ab243ca60e814be5f0fb52161bb818452
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Nov 6 03:22:33 2025 -0600

    [groff]: Add compat mode delim neg testing (1/x).
    
    * src/roff/groff/tests/check-delimiter-validity.sh: Add negative
      testing.  Verify that *roff arithmetic operators are invalid as
      numeric expression delimiters in compatibility mode.
---
 ChangeLog                                        | 6 ++++++
 src/roff/groff/tests/check-delimiter-validity.sh | 9 +++++++++
 2 files changed, 15 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 464d0bdc3..684479297 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-11-06  G. Branden Robinson <[email protected]>
+
+       * src/roff/groff/tests/check-delimiter-validity.sh: Add negative
+       testing.  Verify that *roff arithmetic operators are invalid as
+       numeric expression delimiters in compatibility mode.
+
 2025-11-06  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (token::is_usable_as_delimter): In
diff --git a/src/roff/groff/tests/check-delimiter-validity.sh 
b/src/roff/groff/tests/check-delimiter-validity.sh
index a360789aa..77c219fbc 100755
--- a/src/roff/groff/tests/check-delimiter-validity.sh
+++ b/src/roff/groff/tests/check-delimiter-validity.sh
@@ -95,6 +95,15 @@ do
     echo "$output" | grep -Fqx '_   _' || wail
 done
 
+for c in + - / '*' % '<' '>' = '&' : '(' ')'
+do
+    echo "checking invalidity of '$c' as numeric expression delimiter" \
+         "in compatibility mode" >&2
+    output=$(printf '_\\h%c1n+2n%c_\n' "$c" "$c" \
+      | "$groff" -C -w delim -T ascii -P -cbou | sed '/^$/d')
+    echo "$output" | grep -Fqx '_   _' && wail
+done
+
 for octal in 002 003 005 006 007 177
 do
     echo "checking validity of control character $octal (octal)" \

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to