gbranden pushed a commit to branch master
in repository groff.

commit a0dcc4b5cc9ccb7653ae7aa46d9e861597240324
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Oct 17 15:35:58 2026 -0500

    [groff]: Unit-test `rr` request.
    
    * src/roff/groff/tests/rr-request-works.sh: New file; do it.
    
    * src/roff/groff/groff.am: Update `groff_TESTS` to run test.
---
 ChangeLog                                |  7 +++++++
 src/roff/groff/groff.am                  |  1 +
 src/roff/groff/tests/rr-request-works.sh | 34 ++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 55dbe8549..10551dc45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-10-17  G. Branden Robinson <[email protected]>
+
+       [groff]: Unit-test `rr` request.
+
+       * src/roff/groff/tests/rr-request-works.sh: New file; do it.
+       * src/roff/groff/groff.am: Update `groff_TESTS` to run test.
+
 2026-10-18  G. Branden Robinson <[email protected]>
 
        [troff]: Improve error diagnostics.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 343fd896f..cd3cac23b 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -160,6 +160,7 @@ groff_TESTS = \
   src/roff/groff/tests/regression_savannah_59202.sh \
   src/roff/groff/tests/rhw-request-works.sh \
   src/roff/groff/tests/roman-format-register-interpolation-works.sh \
+  src/roff/groff/tests/rr-request-works.sh \
   src/roff/groff/tests/safer-mode-works.sh \
   src/roff/groff/tests/set-stroke-thickness.sh \
   src/roff/groff/tests/sizes-request-works.sh \
diff --git a/src/roff/groff/tests/rr-request-works.sh 
b/src/roff/groff/tests/rr-request-works.sh
new file mode 100755
index 000000000..a4ce4e5c3
--- /dev/null
+++ b/src/roff/groff/tests/rr-request-works.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# 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"
+
+input='.
+.nr a 1
+.nr b 2
+.nr c 3
+.rr b
+a=\n[a] b=\n[b] c=\n[c]
+.br
+.pl \n[nl]u
+.'
+
+output=$(printf '%s\n' "$input" | "$groff" -T ascii)
+echo "$output"
+echo "$output" | grep -qx 'a=1 b=0 c=3'
+
+# 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