diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2024-03-15 23:01:23 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2024-03-15 23:03:01 -0500 |
commit | 20bd38c24b2f9b7d9453777a7fcf9a3d0e7ce317 (patch) | |
tree | 08965ea159a1d4db7be00166760f7db51bc7d36c | |
parent | dbe9fc435a2aa64e937c85c1bd06e97e11ae2e19 (diff) |
[man]: Regression-test Savannah #64267.
* tmac/tests/tmac/tests/an_PD-restores-spacing.sh: Do it.
* tmac/tmac.am (tmac_TESTS): Run test.
Test fails at this commit.
-rw-r--r-- | ChangeLog | 7 | ||||
-rwxr-xr-x | tmac/tests/an_PD-restores-spacing.sh | 54 | ||||
-rw-r--r-- | tmac/tmac.am | 1 |
3 files changed, 62 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2024-03-15 G. Branden Robinson <g.branden.robinson@gmail.com> + [man]: Regression-test Savannah #64267. + + * tmac/tests/tmac/tests/an_PD-restores-spacing.sh: Do it. + * tmac/tmac.am (tmac_TESTS): Run test. + +2024-03-15 G. Branden Robinson <g.branden.robinson@gmail.com> + [man]: Fix Savannah #65464. * tmac/an.tmac (an*end-hyperlink): Unformat the diversion before diff --git a/tmac/tests/an_PD-restores-spacing.sh b/tmac/tests/an_PD-restores-spacing.sh new file mode 100755 index 000000000..6f46f6156 --- /dev/null +++ b/tmac/tests/an_PD-restores-spacing.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# +# Copyright (C) 2024 Free Software Foundation, Inc. +# +# This file is part of groff. +# +# 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" + +# Regression-test Savannah #64267. + +input='.TH foo 1 2024-03-15 "groff test suite" +.SH Name +foo \- frobnicate a bar +.SH Monsters +In this game reminiscent of +.IR rogue (6), +you can expect to encounter the following opponents in increasing order +of menace. +. +.PD 0 +.IP B +bat +.IP T +troll +.P +.PD \" inexpert page author did not put this _before_ the `P` call +.SH Treasure +There is a lot of it.' + +output=$(printf "%s\n" "$input" | "$groff" -man -Tascii -P-cbou) +echo "$output" +echo "$output" | sed -n -e '/troll/{' \ + -e 'n;/^$/{' \ + -e 'n;/Treasure/p;' \ + -e '}' \ + -e '}' | grep -q . + +exit + +# vim:set ai et sw=4 ts=4 tw=72: diff --git a/tmac/tmac.am b/tmac/tmac.am index 116360cec..fd9d1665e 100644 --- a/tmac/tmac.am +++ b/tmac/tmac.am @@ -168,6 +168,7 @@ tmac_TESTS = \ tmac/tests/an_MT-body-hyphenates.sh \ tmac/tests/an_MT-works.sh \ tmac/tests/an_P-register-works.sh \ + tmac/tests/an_PD-restores-spacing.sh \ tmac/tests/an_TH-repairs-ad-damage.sh \ tmac/tests/an_TH-repairs-hy-damage.sh \ tmac/tests/an_TP-works.sh \ |