groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/16: [man]: Regression-test Savannah #65462.


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

gbranden pushed a commit to branch master
in repository groff.

commit cb34b1e1970001f5fbd5454db96833fed7efe8b2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Mar 15 16:14:15 2024 -0500

    [man]: Regression-test Savannah #65462.
    
    * tmac/tests/an_adjustment-mode-preserved-after-paragraph-tag.sh: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          |  8 +++
 ...djustment-mode-preserved-after-paragraph-tag.sh | 73 ++++++++++++++++++++++
 tmac/tmac.am                                       |  1 +
 3 files changed, 82 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 3189963df..c37ba5c20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-03-15  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [man]: Regression-test Savannah #65462.
+
+       * tmac/tests/\
+       an_adjustment-mode-preserved-after-paragraph-tag.sh: Do it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2024-03-13  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/utils/indxbib/indxbib.cpp: Validate `-h` option arguments
diff --git a/tmac/tests/an_adjustment-mode-preserved-after-paragraph-tag.sh 
b/tmac/tests/an_adjustment-mode-preserved-after-paragraph-tag.sh
new file mode 100755
index 000000000..aaad571db
--- /dev/null
+++ b/tmac/tests/an_adjustment-mode-preserved-after-paragraph-tag.sh
@@ -0,0 +1,73 @@
+#!/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 #65462.
+
+input='.TH foo 1 2024-03-15 "groff test suite"
+.SH Name
+foo \- frobnicate a bar
+.SH Description
+.\" The seemingly casual text below is crafted so that one can visually
+.\" verify the presence or absence of adjustment.
+.\"   groff <= 1.23 defaults: BP=7n, LL=78n (BP didn'"'"'t exist yet)
+.\"   groff >  1.23 defaults: BP=5n, LL=80n
+Let us measure our degree of gruntlement.
+.P
+.ad l
+First, align output to the left.
+A dubious practice,
+to be sure,
+but the house style of Perl man pages to date.
+.IR pod2man (1)
+might soon come to support
+.I groff
+1.23'"'"'s
+.B AD
+string.
+.TP
+Seventh Edition Unix
+had the same preference in
+.I nroff
+mode in 1979,
+and did not adjust the text to both margins on terminals
+(using a
+.B na
+request),
+though it did when using a typesetter.
+.TP
+SunOS
+commented out the disablement of adjustment as early as its 2.0 release
+(1982),
+and appears to have retained that all the way through Solaris 10.
+.P
+The tagged paragraphs above should retain the alignment configured in
+the previous untagged paragraph
+(as should this one).'
+
+output=$(printf "%s\n" "$input" | "$groff" -man -Tascii -P-cbou)
+echo "$output"
+echo "$output" \
+    | grep -q 'had the same preference in nroff mode in 1979'
+
+exit
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 316af0ac4..116360cec 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -179,6 +179,7 @@ tmac_TESTS = \
   tmac/tests/an_UR-works.sh \
   tmac/tests/an_X-register-works.sh \
   tmac/tests/an_adjust-link-text-correctly.sh \
+  tmac/tests/an_adjustment-mode-preserved-after-paragraph-tag.sh \
   tmac/tests/an_avoid-two-font-denial-of-service.sh \
   tmac/tests/an_do-not-abbreviate-escape-using-TH-arguments.sh \
   tmac/tests/an_font-remapping-does-not-affect-titles.sh \



reply via email to

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