gbranden pushed a commit to branch master
in repository groff.
commit eeae97c6b40d08c43bf0a04967f4c64f89136e9f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Jul 17 11:03:09 2026 -0500
[groff]: Unit-test `hpf` and `hpfa` requests.
* src/roff/groff/tests/hpf-request-works.sh:
* src/roff/groff/tests/hpfa-request-works.sh: Do it.
* src/roff/groff/groff.am (groff_TESTS): Run tests.
Tests fail at this commit.
---
ChangeLog | 8 ++++++++
src/roff/groff/groff.am | 2 ++
src/roff/groff/tests/hpf-request-works.sh | 33 ++++++++++++++++++++++++++++++
src/roff/groff/tests/hpfa-request-works.sh | 33 ++++++++++++++++++++++++++++++
4 files changed, 76 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b1f046e75..2e979b759 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-07-17 G. Branden Robinson <[email protected]>
+
+ [groff]: Add unit tests for `hpf` and `hpfa` requests.
+
+ * src/roff/groff/tests/hpf-request-works.sh:
+ * src/roff/groff/tests/hpfa-request-works.sh: Do it.
+ * src/roff/groff/groff.am (groff_TESTS): Run tests.
+
2026-07-17 G. Branden Robinson <[email protected]>
* doc/doc.am (doc/groff-pdf-features.pdf): Add
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index f0c155a56..688841025 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -114,6 +114,8 @@ groff_TESTS = \
src/roff/groff/tests/hcode-request-copies-spec-char-code.sh \
src/roff/groff/tests/hcode-request-works.sh \
src/roff/groff/tests/hla-request-works.sh \
+ src/roff/groff/tests/hpf-request-works.sh \
+ src/roff/groff/tests/hpfa-request-works.sh \
src/roff/groff/tests/html-device-smoke-test.sh \
src/roff/groff/tests/html-device-works-with-grn-and-eqn.sh \
src/roff/groff/tests/html-does-not-fumble-tagged-paragraph.sh \
diff --git a/src/roff/groff/tests/hpf-request-works.sh
b/src/roff/groff/tests/hpf-request-works.sh
new file mode 100755
index 000000000..fc5cede2c
--- /dev/null
+++ b/src/roff/groff/tests/hpf-request-works.sh
@@ -0,0 +1,33 @@
+#!/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 over
+# 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='.
+.hpf
+.tm FOO
+.hpf hyphen.en
+.tm BAR
+.'
+
+output=$(printf '%s\n' "$input" | "$groff" -z 2>&1)
+echo "$output"
+echo "$output" | grep -Fqx 'BAR'
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/src/roff/groff/tests/hpfa-request-works.sh
b/src/roff/groff/tests/hpfa-request-works.sh
new file mode 100755
index 000000000..83d109f39
--- /dev/null
+++ b/src/roff/groff/tests/hpfa-request-works.sh
@@ -0,0 +1,33 @@
+#!/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 over
+# 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='.
+.hpfa
+.tm BAZ
+.hpf hyphen.en
+.tm QUX
+.'
+
+output=$(printf '%s\n' "$input" | "$groff" -z 2>&1)
+echo "$output"
+echo "$output" | grep -Fqx '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