groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 06/16: [man]: Regression-test Savannah #64267.


From: G. Branden Robinson
Subject: [groff] 06/16: [man]: Regression-test Savannah #64267.
Date: Sat, 16 Mar 2024 01:48:51 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 20bd38c24b2f9b7d9453777a7fcf9a3d0e7ce317
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Mar 15 23:01:23 2024 -0500

    [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.
---
 ChangeLog                            |  7 +++++
 tmac/tests/an_PD-restores-spacing.sh | 54 ++++++++++++++++++++++++++++++++++++
 tmac/tmac.am                         |  1 +
 3 files changed, 62 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 26617dda2..83aeab5b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
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 \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]