gbranden pushed a commit to branch master
in repository groff.
commit f8bf2981609d5b7d2207ab6350b69c969a303587
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Apr 8 10:07:22 2026 -0500
[groff]: Unit-test `ss` request.
* src/roff/groff/tests/ss-request-works.sh: Do it.
* src/roff/groff/groff.am (groff_TESTS): Run test.
---
ChangeLog | 7 ++++
src/roff/groff/groff.am | 1 +
src/roff/groff/tests/ss-request-works.sh | 55 ++++++++++++++++++++++++++++++++
3 files changed, 63 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 1b9bfe33c..31cd98bda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-08 G. Branden Robinson <[email protected]>
+
+ [groff]: Unit-test `ss` request.
+
+ * src/roff/groff/tests/ss-request-works.sh: Do it.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2026-04-04 G. Branden Robinson <[email protected]>
* src/preproc/eqn/box.cpp (get_param): Add strictly unnecessary
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index a93571aac..28712fe28 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -124,6 +124,7 @@ groff_TESTS = \
src/roff/groff/tests/sizes-request-works.sh \
src/roff/groff/tests/so-request-accepts-embedded-space-in-arg.sh \
src/roff/groff/tests/soquiet-request-works.sh \
+ src/roff/groff/tests/ss-request-works.sh \
src/roff/groff/tests/stringdown-and-stringup-requests-work.sh \
src/roff/groff/tests/stringdown-request-rejects-request-names.sh \
src/roff/groff/tests/stringup-request-transforms-non-basic-latin.sh \
diff --git a/src/roff/groff/tests/ss-request-works.sh
b/src/roff/groff/tests/ss-request-works.sh
new file mode 100755
index 000000000..880cd54a8
--- /dev/null
+++ b/src/roff/groff/tests/ss-request-works.sh
@@ -0,0 +1,55 @@
+#!/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
+}
+
+input='.
+.ll 48n
+.ss 12
+1.\~J. Fict. Ch. Soc. 6 (2020), 3\[en]14.
+.ss 12 48 \" applies to next sentence ending
+Reprints no longer available through FCS.
+2.\~Better known for other work.
+.'
+
+# Expected output:
+#
+# 1. J. Fict. Ch. Soc. 6 (2020), 3-14. Reprints
+# no longer available through FCS. 2. Better
+# known for other work.
+
+output=$(printf '%s\n' "$input" | "$groff" -T ascii)
+echo "$output"
+
+echo "checking operation of 'ss' request with one argument"
+echo "$output" | grep -q "Soc\. 6 (2020), 3-14\. Reprints$" || wail
+
+echo "checking operation of 'ss' request with two arguments"
+echo "$output" | grep -q "through FCS\. 2\. Better$" || 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