groff-commit
[Top][All Lists]
Advanced

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

[groff] 08/115: [mdoc]: Regression-test Savannah #57665 for mdoc.


From: G. Branden Robinson
Subject: [groff] 08/115: [mdoc]: Regression-test Savannah #57665 for mdoc.
Date: Thu, 1 Jun 2023 10:45:59 -0400 (EDT)

gbranden pushed a commit to branch branden-2022-06-01
in repository groff.

commit 1abddec1d46288b100c5fab565a20c01fbf97486
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Apr 22 03:13:30 2023 -0500

    [mdoc]: Regression-test Savannah #57665 for mdoc.
    
    * tmac/tests/doc_TS-do-not-keep-tables-when-cR-set.sh: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Fixes <https://savannah.gnu.org/bugs/?64037>.
---
 ChangeLog                                          |  9 ++++
 .../tests/doc_TS-do-not-keep-tables-when-cR-set.sh | 54 ++++++++++++++++++++++
 tmac/tmac.am                                       |  1 +
 3 files changed, 64 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a48b2c8bf..82d573de2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,15 @@
        Fixes <https://savannah.gnu.org/bugs/?64230>.  [I threw in a few
        more fixes.  --GBR]
 
+2023-04-22  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [mdoc]: Regression-test Savannah #57665, but for mdoc.
+
+       * tmac/tests/doc_TS-do-not-keep-tables-when-cR-set.sh: Do it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
+       Fixes <https://savannah.gnu.org/bugs/?64037>.
+
 2023-04-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [docs]: Attempt to further clarify end-of-sentence detection.
diff --git a/tmac/tests/doc_TS-do-not-keep-tables-when-cR-set.sh 
b/tmac/tests/doc_TS-do-not-keep-tables-when-cR-set.sh
new file mode 100755
index 000000000..7f6740743
--- /dev/null
+++ b/tmac/tests/doc_TS-do-not-keep-tables-when-cR-set.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# Copyright (C) 2023 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 #57665, but for mdoc(7).
+#
+# The interior of this text is fragile with respect to line count.
+
+input='.Dd 2023-04-22
+.Dt ts\-hell 1
+.Os "groff test suite"
+.Sh Name
+.Nm ts\-hell
+.Nd turn off tbl keeps when continuous rendering
+.Sh Description
+A long table should not get spurious blank lines inserted into it when
+continuously rendering.
+.
+This arises from
+.Xr tbl 1
+using \[lq]keeps\[rq].
+.
+We do not need those when
+.Ql cR
+is set.
+.
+.TS
+L.
+'$(n=1; while [ $n -le 66 ]; do echo $n; n=$(( n + 1 )); done)'
+.TE'
+
+output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -t -mdoc)
+echo "$output"
+test -z "$(echo "$output" | sed -n '/^  *1$/,/^  *66$/s/^ *$/FNORD/p')"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 437297acb..62b03ffa4 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -199,6 +199,7 @@ tmac_TESTS = \
   tmac/tests/doc_Mt-works.sh \
   tmac/tests/doc_Nm-works.sh \
   tmac/tests/doc_P-register-works.sh \
+  tmac/tests/doc_TS-do-not-keep-tables-when-cR-set.sh \
   tmac/tests/doc_X-register-works.sh \
   tmac/tests/doc_accept-mixed-case-section-headings.sh \
   tmac/tests/doc_do-not-loop-infinitely-when-shortening-headers.sh \



reply via email to

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