gbranden pushed a commit to branch master
in repository groff.
commit eb410f413b6d1f24341431850df8391e867c9add
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Aug 11 19:36:43 2025 -0500
[tbl]: Regression-test Savannah #67420.
* src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh: Add
test.
* src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 6 +++
src/preproc/tbl/tbl.am | 1 +
.../tests/boxed-TH-tables-work-on-utf8-device.sh | 63 ++++++++++++++++++++++
3 files changed, 70 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index aa5bc41c7..67dbfc990 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-08-11 G. Branden Robinson <[email protected]>
+
+ * src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh:
+ Add test.
+ * src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
+
2025-08-11 G. Branden Robinson <[email protected]>
* src/preproc/tbl/table.cpp (table::print_single_hrule):
diff --git a/src/preproc/tbl/tbl.am b/src/preproc/tbl/tbl.am
index 8113327a7..b2ecc4d6b 100644
--- a/src/preproc/tbl/tbl.am
+++ b/src/preproc/tbl/tbl.am
@@ -26,6 +26,7 @@ EXTRA_DIST += src/preproc/tbl/tbl.1.man
tbl_TESTS = \
src/preproc/tbl/tests/align-staggered-text-blocks-correctly.sh \
+ src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh \
src/preproc/tbl/tests/boxes-and-vertical-rules.sh \
src/preproc/tbl/tests/check-horizontal-line-length.sh \
src/preproc/tbl/tests/check-line-intersections.sh \
diff --git a/src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh
b/src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh
new file mode 100755
index 000000000..f10278ce3
--- /dev/null
+++ b/src/preproc/tbl/tests/boxed-TH-tables-work-on-utf8-device.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# Copyright (C) 2025 G. Branden Robinson
+#
+# 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"
+
+fail=
+
+wail () {
+ echo ...FAILED >&2
+ fail=YES
+}
+
+# Regression-test Savannah #67420.
+#
+# Correct box-drawing glyphs should appear between the heading and body
+# of boxed `TH` tables on the "utf8" output device.
+
+input='.
+.LP
+This is an
+.I ms
+document.
+.TS H
+allbox;
+C
+L.
+Heading
+.TH
+some data
+.TE
+.pl \n(nlu
+.'
+
+output=$(printf "%s\n" "$input" | "$groff" -t -m s -T utf8)
+echo "$output"
+output=$(echo "$output" | sed -n '11p' | od -t x1)
+echo "$output"
+
+echo "checking that left edge of table after heading looks like |-" >&2
+echo "$output" | grep -q '0000000 *e2 *94 *9c' || wail
+
+echo "checking that right edge of table after heading looks like -|" >&2
+echo "$output" | grep -q '0000040 .* e2 *94 *a4 *0.$' || wail
+
+test -z "$fail"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit