gbranden pushed a commit to branch master
in repository groff.

commit 0da99484112530ed1685d68e803b257e0bea746c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Feb 20 19:49:05 2026 -0600

    [gropdf]: Regression-test Savannah #68077.
    
    * src/devices/gropdf/tests/interpret-grout-correctly.sh: Do it.
    
    * src/devices/gropdf/gropdf.am (gropdf_TESTS): Run test.
    
    Validated by manually reverting the one-line fix to Savannah #68077.
---
 ChangeLog                                          |  7 ++
 src/devices/gropdf/gropdf.am                       |  1 +
 .../gropdf/tests/interpret-grout-correctly.sh      | 98 ++++++++++++++++++++++
 3 files changed, 106 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 1def928a9..cb455d137 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-02-20  G. Branden Robinson <[email protected]>
+
+       [gropdf]: Regression-test Savannah #68077.
+
+       * src/devices/gropdf/tests/interpret-grout-correctly.sh: Do it.
+       * src/devices/gropdf/gropdf.am (gropdf_TESTS): Run test.
+
 2026-02-20  G. Branden Robinson <[email protected]>
 
        * src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh:
diff --git a/src/devices/gropdf/gropdf.am b/src/devices/gropdf/gropdf.am
index 807e43665..e874d3e86 100644
--- a/src/devices/gropdf/gropdf.am
+++ b/src/devices/gropdf/gropdf.am
@@ -58,6 +58,7 @@ pdfmom: $(gropdf_dir)/pdfmom.pl $(SH_DEPS_SED_SCRIPT)
        && chmod +x $@
 
 gropdf_TESTS = \
+  src/devices/gropdf/tests/interpret-grout-correctly.sh \
   tmac/tests/pdf_bookmark-starting-with-control-char-works.sh \
   tmac/tests/pdf_pdfhref-W-without-link-text-works.sh \
   tmac/tests/pdfpic_does-not-choke-on-bad-pdfinfo-output.sh \
diff --git a/src/devices/gropdf/tests/interpret-grout-correctly.sh 
b/src/devices/gropdf/tests/interpret-grout-correctly.sh
new file mode 100755
index 000000000..147969f74
--- /dev/null
+++ b/src/devices/gropdf/tests/interpret-grout-correctly.sh
@@ -0,0 +1,98 @@
+#!/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/>.
+
+gropdf="${abs_top_builddir:-.}/gropdf"
+fontdir="${abs_top_builddir:-.}/font"
+
+# Regression-test Savannah #68077.
+
+input='#
+x T pdf
+x res 72000 1 1
+x init
+p1
+x X ps:exec [/Dest /foo(1) /View [/FitH -26000 u] /DEST pdfmark
+x X ps:exec [/Dest /foo(1) /Title (foo(1)) /Level 1 /OUT pdfmark
+x font 39 TI
+f39
+s10000
+md
+DFd
+V43000
+H73970
+tfoo
+x font 5 TR
+f5
+h180
+t(1)
+h151030
+tGeneral
+wh2500
+tCommands
+wh2500
+tManual
+f39
+h153000
+tfoo
+f5
+h180
+t(1)
+n12000 0
+x X pdf: markrestart
+V91000
+H72000
+tdigit
+wx font 37 TB
+f37
+h2500
+t0
+f5
+t.
+n12000 0
+x X pdf: marksuspend
+V756000
+H72000
+tgrof
+H88410
+tf
+wh2500
+ttest
+wh2500
+tsuite
+h153150
+t2026-02-20
+h205670
+t1
+n12000 0
+x trailer
+V792000
+x stop
+#'
+
+if ! command -v pdftotext >/dev/null
+then
+    echo "$0: cannot locate 'pdftotext' command; skipping" >&2
+    exit 77 # skip
+fi
+
+output=$(echo "$input" | "$gropdf" -F "$fontdir" | pdftotext - -)
+echo "$output"
+echo "$output" | grep -Fq 'digit 0.'
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to