gbranden pushed a commit to branch master
in repository groff.
commit ab7f903e168ce0fc04b0eb6cde10be273d9e4e08
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu May 28 15:11:08 2026 -0500
[groff]: Regression-test Savannah #68357.
* src/roff/groff/tests/error-no-space-between-dt-or-wh-arguments.sh: Do
it.
* src/roff/groff/groff.am (groff_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 8 +++
src/roff/groff/groff.am | 1 +
.../error-no-space-between-dt-or-wh-arguments.sh | 60 ++++++++++++++++++++++
3 files changed, 69 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 6faa2a222..305c4d473 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-05-28 G. Branden Robinson <[email protected]>
+
+ [groff]: Regression-test Savannah #68357.
+
+ * src/roff/groff/tests/\
+ error-no-space-between-dt-or-wh-arguments.sh: Do it.
+ * src/roff/groff/groff.am (groff_TESTS): Run test.
+
2026-05-28 G. Branden Robinson <[email protected]>
[groff]: Unit-test `wh` and `ch` requests.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 0379a33ae..484116533 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -99,6 +99,7 @@ groff_TESTS = \
src/roff/groff/tests/dt-request-works.sh \
src/roff/groff/tests/dvi-device-smoke-test.sh \
src/roff/groff/tests/error-dt-request-given-bogus-arguments.sh \
+ src/roff/groff/tests/error-no-space-between-dt-or-wh-arguments.sh \
src/roff/groff/tests/error-overflow-symbol-table.sh \
src/roff/groff/tests/evc-request-produces-no-output-if-invalid.sh \
src/roff/groff/tests/fi-and-nf-requests-work.sh \
diff --git a/src/roff/groff/tests/error-no-space-between-dt-or-wh-arguments.sh
b/src/roff/groff/tests/error-no-space-between-dt-or-wh-arguments.sh
new file mode 100755
index 000000000..66a3ac241
--- /dev/null
+++ b/src/roff/groff/tests/error-no-space-between-dt-or-wh-arguments.sh
@@ -0,0 +1,60 @@
+#!/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
+}
+
+# Regression-test Savannah #68357. We expect NO output.
+
+input='.
+.de PT
+OUCH
+..
+.de DT
+WHOOPS
+.br
+..
+.wh 9vPT
+.pwh
+.di DD
+.dt 3vDT
+.pwh
+.br
+.di
+.'
+
+error=$(printf '%s\n' "$input" | "$groff" 2>&1 >/dev/null | nl -ba \
+ | tr '\t' ' ')
+echo "$error"
+
+echo "checking that invalid 'wh' request did not plant trap" >&2
+echo "$error" | grep -q 'PT' && wail
+
+echo "checking that invalid 'dt' request did not plant trap" >&2
+echo "$error" | grep -q 'DT' && 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