groff-commit
[Top][All Lists]
Advanced

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

[groff] 10/17: [tbl]: Regression-test Debian #1038391.


From: G. Branden Robinson
Subject: [groff] 10/17: [tbl]: Regression-test Debian #1038391.
Date: Wed, 9 Aug 2023 18:00:32 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 56c803ecaedf20bd43665431e4471e1990c2b94d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Aug 4 18:17:45 2023 -0500

    [tbl]: Regression-test Debian #1038391.
    
    * src/preproc/tbl/tests/align-staggered-text-blocks-correctly.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/align-staggered-text-blocks-correctly.sh | 62 ++++++++++++++++++++++
 3 files changed, 71 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 19cde8307..7e2f4f943 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-08-04  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [tbl]: Regression-test Debian #1038391.
+
+       * src/preproc/tbl/tests/\
+       align-staggered-text-blocks-correctly.sh: Do it.
+       * src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
+
 2023-08-04  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [man]: Deprecate `SB` macro.  It is a SunOS 4.0 (1988) extension
diff --git a/src/preproc/tbl/tbl.am b/src/preproc/tbl/tbl.am
index d4b0edb57..dc037cb27 100644
--- a/src/preproc/tbl/tbl.am
+++ b/src/preproc/tbl/tbl.am
@@ -25,6 +25,7 @@ PREFIXMAN1 += src/preproc/tbl/tbl.1
 EXTRA_DIST += src/preproc/tbl/tbl.1.man
 
 tbl_TESTS = \
+  src/preproc/tbl/tests/align-staggered-text-blocks-correctly.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/align-staggered-text-blocks-correctly.sh 
b/src/preproc/tbl/tests/align-staggered-text-blocks-correctly.sh
new file mode 100755
index 000000000..167884481
--- /dev/null
+++ b/src/preproc/tbl/tests/align-staggered-text-blocks-correctly.sh
@@ -0,0 +1,62 @@
+#!/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"
+
+fail=
+
+wail () {
+    echo ...FAILED >&2
+    fail=YES
+}
+
+# Regression-test Debian #1038391.
+#
+# Text blocks should honor row staggering.
+
+input='.
+.\" based on a test case from наб <nabijaczleweli@nabijaczleweli.xyz>
+The capital letters should appear struck-through due to row staggering.
+.sp
+.TS
+tab(@);
+L  L  C  R  A  L
+Lu Lu Cu Ru Au Lu .
+a@b@c@d@e@f
+_
+A@T{
+B
+T}@T{
+C
+T}@T{
+D
+T}@T{
+E
+T}@F
+.TE'
+
+output=$(printf "%s\n" "$input" | "$groff" -tZ -T ps)
+
+# This sadly seems fragile and device-dependent.  But a table entry
+# generally doesn't know where on the page it is typeset.
+echo "$output"
+test $(echo "$output" | grep -c 'V *44000') -eq 5
+
+# vim:set ai et sw=4 ts=4 tw=72:



reply via email to

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