Update of bug #68077 (group groff):

                  Status:               Confirmed => None
             Open/Closed:                  Closed => Open

    _______________________________________________________

Follow-up Comment #3:

Hi Deri,

I'm writing a regression test for this and getting Perl warnings.


$ ../src/devices/gropdf/tests/interpret-grout-correctly.sh
substr outside of string at ./gropdf line 650, <> line 1.
Use of uninitialized value $lin in substitution (s///) at ./gropdf line 659,
<> line 1.
Use of uninitialized value $lin in string eq at ./gropdf line 660, <> line 1.
substr outside of string at ./gropdf line 650, <> line 62.
Use of uninitialized value $lin in substitution (s///) at ./gropdf line 659,
<> line 62.
Use of uninitialized value $lin in string eq at ./gropdf line 660, <> line
62.
foo(1)

General Commands Manual

foo(1)

digit 0.

groff test suite

2026-02-20

1



$ sed -n '650p;659p;660p' gropdf
        my $lin=substr($_,1);
        $lin=~s/^\s+//;
        next if $lin eq '';


Here's the test script.


$ cat ../src/devices/gropdf/tests/interpret-grout-correctly.sh
#!/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"

# 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 "cannot locate 'pdftotext' command; skipping" >&2
    exit 77 # skip
fi

output=$(echo "$input" | "$gropdf" | pdftotext - -)
echo "$output"
echo "$output" | grep -Fq 'digit 0.'

# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:


I'm attaching it too, for your convenience.

(file #58270)

    _______________________________________________________

Additional Item Attachment:

Name: interpret-grout-correctly.sh   Size: 1.6KiB

<https://file.savannah.gnu.org/file/interpret-grout-correctly.sh?file_id=58270>


    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-2a2ecc185bd672dd377a2efbb667431a4b30acc3.tar.gz


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68077>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to