gbranden pushed a commit to branch master
in repository groff.
commit 6a45b4300ee1415064ac27c879ae38055c6034cd
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Dec 21 11:14:29 2025 -0600
[troff]: Regression-test Savannah #67843.
* src/roff/groff/tests/po-request-works: New file.
* src/roff/groff/groff.am (groff_TESTS): Run test.
Test fails at this commit.
Arbitrary milestone observance: this is our 300th automated test script.
---
ChangeLog | 7 ++++
src/roff/groff/groff.am | 1 +
src/roff/groff/tests/po-request-works.sh | 64 ++++++++++++++++++++++++++++++++
3 files changed, 72 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 99302004e..7a54b9ad5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-12-21 G. Branden Robinson <[email protected]>
+
+ [troff]: Regression-test Savannah #67843.
+
+ * src/roff/groff/tests/po-request-works: New file.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2025-12-21 G. Branden Robinson <[email protected]>
[troff]: Refactor. Split `TOKEN_HORIZONTAL_MOTION` token type
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index ecf98433e..1965fda40 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -104,6 +104,7 @@ groff_TESTS = \
src/roff/groff/tests/pchar-request-works.sh \
src/roff/groff/tests/pdf-device-smoke-test.sh \
src/roff/groff/tests/pi-request-works.sh \
+ src/roff/groff/tests/po-request-works.sh \
src/roff/groff/tests/ps-device-smoke-test.sh \
src/roff/groff/tests/recognize-end-of-sentence.sh \
src/roff/groff/tests/regression_savannah_56555.sh \
diff --git a/src/roff/groff/tests/po-request-works.sh
b/src/roff/groff/tests/po-request-works.sh
new file mode 100755
index 000000000..62f295a4b
--- /dev/null
+++ b/src/roff/groff/tests/po-request-works.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Copyright 2025 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 >&2
+ fail=YES
+}
+
+input='.
+.nf
+foo
+.po
+bar
+.po 5n
+baz
+.po
+qux
+.po 0
+.po
+jeq
+.'
+
+output=$(printf "%s\n" "$input" | "$groff" -T ascii)
+echo "$output"
+
+echo "checking that initial page offset is zero in nroff mode"
+echo "$output" | grep -Fqx 'foo' || wail
+
+echo "checking that initial previous page offset is zero in nroff mode"
+echo "$output" | grep -Fqx 'bar' || wail
+
+echo "checking operation of page offset request"
+echo "$output" | grep -Fqx ' baz' || wail # 5 spaces
+
+echo "checking page offset without argument restores previous setting"
+echo "$output" | grep -Fqx 'qux' || wail
+
+echo "checking that an explicit page offset argument the same as the" \
+ "stored previous value clobbers the previous value"
+echo "$output" | grep -Fqx 'jeq' || 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