[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/25: [man]: Regression-test Savannah #61734.
From: |
G. Branden Robinson |
Subject: |
[groff] 01/25: [man]: Regression-test Savannah #61734. |
Date: |
Wed, 2 Mar 2022 05:12:04 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 254a2cc54e685289d460ddc50090fecc2ad291f0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Feb 22 22:42:29 2022 +1100
[man]: Regression-test Savannah #61734.
* tmac/tests/an_reset-hyphenation-correctly.sh: Do it.
* tmac/tmac.am (tmac_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 7 ++++
tmac/tests/an_reset-hyphenation-correctly.sh | 63 ++++++++++++++++++++++++++++
tmac/tmac.am | 1 +
3 files changed, 71 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b6c3ddd2..12455d0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-02-22 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [man]: Regression-test Savannah #61734.
+
+ * tmac/tests/an_reset-hyphenation-correctly.sh: Do it.
+ * tmac/tmac.am (tmac_TESTS): Run test.
+
2022-02-21 G. Branden Robinson <g.branden.robinson@gmail.com>
* man/groff_char.7.man (History): Add new section.
diff --git a/tmac/tests/an_reset-hyphenation-correctly.sh
b/tmac/tests/an_reset-hyphenation-correctly.sh
new file mode 100755
index 00000000..71914196
--- /dev/null
+++ b/tmac/tests/an_reset-hyphenation-correctly.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 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"
+
+# Fix problem observed while implementing Savannah #61734. Using a
+# hyphenation of "en" (English) with the hyphenation mode for Swedish
+# produces bad breaks.
+
+input='.TH foo 1 2022-02-21 "groff test suite"
+xx
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+glyph
+'
+
+fail=
+
+wail () {
+ echo "...$* FAILED" >&2
+ fail=yes
+}
+
+echo "checking continuous rendering mode" >&2
+output=$(printf "%s" "$input" \
+ | "$groff" -Tascii -P-cbou -man -msv -men)
+echo "$output" | grep -q 'g-$' && wail
+
+echo "checking discontinuous (paginated) rendering mode" >&2
+output=$(printf "%s" "$input" \
+ | "$groff" -Tascii -P-cbou -man -rcR=0 -msv -men)
+echo "$output" | grep -q 'g-$' && wail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 56785f9a..33006425 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -173,6 +173,7 @@ tmac_TESTS = \
tmac/tests/an_no-break-after-short-paragraph-tags.sh \
tmac/tests/an_page-footers-present.sh \
tmac/tests/an_page-header-has-current-data.sh \
+ tmac/tests/an_reset-hyphenation-correctly.sh \
tmac/tests/an_title-abbreviation-works.sh \
tmac/tests/andoc_clear-doc-traps.sh \
tmac/tests/andoc_flush-between-packages.sh \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/25: [man]: Regression-test Savannah #61734.,
G. Branden Robinson <=