gbranden pushed a commit to branch master
in repository groff.

commit 3f6b3328fa0c8b4d7544906ed0630274b8d036da
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jun 7 11:31:17 2026 -0500

    [groff]: Regression-test Savannah #68430.
    
    * src/roff/groff/tests/handle-right-brace-escape-as-macro-argument.sh:
      Do it.
    
    * src/roff/groff/groff.am (groff_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          |  8 +++
 src/roff/groff/groff.am                            |  1 +
 .../handle-right-brace-escape-as-macro-argument.sh | 64 ++++++++++++++++++++++
 3 files changed, 73 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 443c3c475..8085998a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-06-07  G. Branden Robinson <[email protected]>
+
+       [groff]: Regression-test Savannah #68430.
+
+       * src/roff/groff/tests/\
+       handle-right-brace-escape-as-macro-argument.sh: Do it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2026-06-04  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (assign_control_character_request)
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 4de34030d..f008163cc 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -107,6 +107,7 @@ groff_TESTS = \
   src/roff/groff/tests/fi-and-nf-requests-work.sh \
   src/roff/groff/tests/fp-request-does-not-traverse-directories.sh \
   src/roff/groff/tests/handle-special-input-code-points.sh \
+  src/roff/groff/tests/handle-right-brace-escape-as-macro-argument.sh \
   src/roff/groff/tests/hcode-request-copies-spec-char-code.sh \
   src/roff/groff/tests/hla-request-works.sh \
   src/roff/groff/tests/html-device-smoke-test.sh \
diff --git 
a/src/roff/groff/tests/handle-right-brace-escape-as-macro-argument.sh 
b/src/roff/groff/tests/handle-right-brace-escape-as-macro-argument.sh
new file mode 100755
index 000000000..7741af30b
--- /dev/null
+++ b/src/roff/groff/tests/handle-right-brace-escape-as-macro-argument.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Copyright 2026 G. Branden Robinson
+#
+# This file is part of groff, the GNU roff typesetting system.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+   echo "...FAILED"
+   fail=yes
+}
+
+# Regression-test Savannah #68430.
+
+input='.
+.de aa
+A
+..
+.if 1 \{.aa\}
+B
+.'
+
+echo "checking argumentless case" >&2
+output=$(printf '%s\n' "$input" | "$groff" -T ascii 2>/dev/null)
+echo "$output"
+echo "$output" | grep -Fqx "A B" || wail
+
+input='.
+.de aa
+A
+..
+.de bb
+.tm bb: I have \\n(.$ args
+B \\$1 \\$2
+..
+.if 1 \{.aa
+.bb\} Q\}Z
+C
+.'
+
+echo "checking argumentful case" >&2
+output=$(printf '%s\n' "$input" | "$groff" -T ascii 2>/dev/null)
+echo "$output"
+echo "$output" | grep -Fqx "A B QZ C" || wail
+
+test -z "$fail"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:

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

Reply via email to