groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/03: Add regression test for Savannah #57665.


From: G. Branden Robinson
Subject: [groff] 02/03: Add regression test for Savannah #57665.
Date: Fri, 9 Oct 2020 05:19:00 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 6144af847959afb652e1ef7d3536aba46dc5715f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Oct 9 19:55:49 2020 +1100

    Add regression test for Savannah #57665.
    
    * tmac/tests/an-old_TS_do_not_keep_tables_when_cR_set.sh: Add
      regression test for Savannah #57665.
    
    * tmac/tmac.am (TESTS): Run the test.
---
 ChangeLog                                          |  6 +++
 .../an-old_TS_do_not_keep_tables_when_cR_set.sh    | 51 ++++++++++++++++++++++
 tmac/tmac.am                                       |  1 +
 3 files changed, 58 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 3968d82..a0370d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2020-10-09  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * tmac/tests/an-old_TS_do_not_keep_tables_when_cR_set.sh: Add
+       regression test for Savannah #57665.
+       * tmac/tmac.am (TESTS): Run the test.
+
+2020-10-09  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * src/preproc/tbl/table.cpp (simple_entry::position_vertically):
        (block_entry::position_vertically):
        (table::determine_row_type):
diff --git a/tmac/tests/an-old_TS_do_not_keep_tables_when_cR_set.sh 
b/tmac/tests/an-old_TS_do_not_keep_tables_when_cR_set.sh
new file mode 100755
index 0000000..d63e076
--- /dev/null
+++ b/tmac/tests/an-old_TS_do_not_keep_tables_when_cR_set.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Copyright (C) 2020 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.
+#
+# The interior of this text is fragile with respect to line count.
+
+EXAMPLE='
+.TH ts\-hell 1 2020-10-09 "groff test suite"
+.SH Name
+ts\-hell \- 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
+.IR tbl (1)
+using \[lq]keeps\[rq].
+.
+We do not need those when
+.B cR
+is set.
+.
+.TS
+l.
+'$(seq 53)'
+.TE'
+
+OUTPUT=$(printf "%s\n" "$EXAMPLE" | "$groff" -Tascii -P-cbou -t -man)
+test -n "$(echo "$OUTPUT" | sed -n '/52/{N;/53/p}')"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 44eb541..3c9ea5d 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -168,6 +168,7 @@ tmac_TESTS = \
   tmac/tests/an-old_LL_init_sanely.sh \
   tmac/tests/an-old_TH_repairs_ad_damage.sh \
   tmac/tests/an-old_TH_repairs_hy_damage.sh \
+  tmac/tests/an-old_TS_do_not_keep_tables_when_cR_set.sh \
   tmac/tests/an-old_X_register_works.sh \
   tmac/tests/an-old_avoid_two-font_denial_of_service.sh \
   tmac/tests/doc-accept-mixed-case-section-headings.sh \



reply via email to

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