gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 8c361b52600245d1bb7053537f8ee0c044dadb69 Author: G. Branden Robinson <g.branden.robin...@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 25826f7a0..45336477e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -101,6 +101,15 @@ Fixes <https://savannah.gnu.org/bugs/?64230>. [I threw in a few more fixes. --GBR] +2023-04-22 G. Branden Robinson <g.branden.robin...@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.robin...@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 \ _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit