gbranden pushed a commit to branch master
in repository groff.
commit 028f80cf2da8301e235b049c93e49138d0bb44f3
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Dec 29 23:10:08 2023 -0600
[tbl]: Regression-test Savannah #62471.
* src/preproc/tbl/tests/horizontal-rules-not-drawn-too-long.sh: Do it.
* src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 8 +++
src/preproc/tbl/tbl.am | 1 +
.../tests/horizontal-rules-not-drawn-too-long.sh | 71 ++++++++++++++++++++++
3 files changed, 80 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 57d3f82fd..eb42323c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-12-29 G. Branden Robinson <[email protected]>
+
+ [tbl]: Regression-test Savannah #62471.
+
+ * src/preproc/tbl/tests/horizontal-rules-not-drawn-too-long.sh:
+ Do it.
+ * src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
+
2023-12-29 G. Branden Robinson <[email protected]>
* src/preproc/tbl/table.cpp (table::compute_overall_width):
diff --git a/src/preproc/tbl/tbl.am b/src/preproc/tbl/tbl.am
index dc037cb27..d27b5589b 100644
--- a/src/preproc/tbl/tbl.am
+++ b/src/preproc/tbl/tbl.am
@@ -38,6 +38,7 @@ tbl_TESTS = \
src/preproc/tbl/tests/do-not-segv-when-backslash-R-in-text-block.sh \
src/preproc/tbl/tests/expand-region-option-works.sh \
src/preproc/tbl/tests/format-time-diagnostics-work.sh \
+ src/preproc/tbl/tests/horizontal-rules-not-drawn-too-long.sh \
src/preproc/tbl/tests/save-and-restore-hyphenation-parameters.sh \
src/preproc/tbl/tests/save-and-restore-inter-sentence-space.sh \
src/preproc/tbl/tests/save-and-restore-line-numbering.sh \
diff --git a/src/preproc/tbl/tests/horizontal-rules-not-drawn-too-long.sh
b/src/preproc/tbl/tests/horizontal-rules-not-drawn-too-long.sh
new file mode 100755
index 000000000..afab81bae
--- /dev/null
+++ b/src/preproc/tbl/tests/horizontal-rules-not-drawn-too-long.sh
@@ -0,0 +1,71 @@
+#!/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 #62471.
+#
+# Horizontal rules should not be drawn too long in nroff mode.
+
+input='.
+.ll 65n
+.ec @
+.nf
+1234567890@
+1234567890@
+1234567890@
+1234567890@
+1234567890@
+1234567890@
+12345
+.fi
+@l?65n@&*?
+.ec
+.TS
+L.
+table with no boxes or horizontal rules
+.TE
+.sp
+.TS
+box;
+Lx.
+boxed table
+.TE
+.sp
+.TS
+Lx.
+foo
+_
+bar
+.TE
+.sp
+.TS
+box;
+Lx.
+boxed table with
+_
+horizontal rule in data
+.TE'
+
+output=$(printf "%s\n" "$input" | "$groff" -t -Tascii)
+echo "$output"
+test $(echo "$output" | grep -Ecx '[-]{65}') -eq 1
+
+# vim:set ai et sw=4 ts=4 tw=72:
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit