gbranden pushed a commit to branch master
in repository groff.
commit 15b0799df6deadd45db4df413edfc021518583f6
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Apr 14 07:14:39 2026 -0500
[groff]: Unit-test `ns` request.
* src/roff/groff/tests/ns-request-works.sh: Do it.
* src/roff/groff/groff.am (groff_TESTS): Run test.
---
ChangeLog | 7 +++++
src/roff/groff/groff.am | 2 +-
src/roff/groff/tests/ns-request-works.sh | 44 ++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index a800dc2d8..856553078 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-14 G. Branden Robinson <[email protected]>
+
+ [groff]: Unit-test `ns` request.
+
+ * src/roff/groff/tests/ns-request-works.sh: Do it.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2026-04-14 G. Branden Robinson <[email protected]>
[groff]: Unit-test `dt` request.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 9cc52ba6a..0efa18c24 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -112,6 +112,7 @@ groff_TESTS = \
src/roff/groff/tests/logical-predicates-work.sh \
src/roff/groff/tests/localization-works.sh \
src/roff/groff/tests/msoquiet-request-works.sh \
+ src/roff/groff/tests/ns-request-works.sh \
src/roff/groff/tests/output-request-works.sh \
src/roff/groff/tests/pchar-request-works.sh \
src/roff/groff/tests/pdf-device-smoke-test.sh \
@@ -162,7 +163,6 @@ groff_XFAIL_TESTS = \
src/roff/groff/tests/stringup-request-transforms-non-basic-latin.sh
XFAIL_TESTS += $(groff_XFAIL_TESTS)
-
# Local Variables:
# mode: makefile-automake
# fill-column: 72
diff --git a/src/roff/groff/tests/ns-request-works.sh
b/src/roff/groff/tests/ns-request-works.sh
new file mode 100755
index 000000000..469b885fc
--- /dev/null
+++ b/src/roff/groff/tests/ns-request-works.sh
@@ -0,0 +1,44 @@
+#!/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"
+
+# Unit-test ns request.
+
+input='.
+.nf
+foo
+.sp
+bar
+.ns
+baz
+.sp
+qux
+.rs
+.sp
+wak
+.pl \n(nlu
+.'
+
+output=$(printf '%s\n' "$input" | "$groff" -T ascii | nl -ba)
+echo "$output"
+output=$(echo $output) # condense onto one line
+echo "$output" | grep -q "baz 5 6 qux"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit