[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 06/11: Regression-test Savannah #61279.
From: |
G. Branden Robinson |
Subject: |
[groff] 06/11: Regression-test Savannah #61279. |
Date: |
Tue, 5 Oct 2021 07:11:07 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit d02e369f5bfd887c60e345824b90dc81bfbeb888
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Oct 5 12:11:04 2021 +1100
Regression-test Savannah #61279.
* tmac/tests/an_font-remapping-does-not-affect-titles.sh: Do it.
* tmac/tmac.am (tmac_TESTS): Run test.
Test fails at this commit.
---
ChangeLog | 7 +++
.../an_font-remapping-does-not-affect-titles.sh | 50 ++++++++++++++++++++++
tmac/tmac.am | 1 +
3 files changed, 58 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 756e023..7c280f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-10-05 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Regression-test Savannah #61279.
+
+ * tmac/tests/an_font-remapping-does-not-affect-titles.sh: Do it.
+ * tmac/tmac.am (tmac_TESTS): Run test.
+
2021-10-04 G. Branden Robinson <g.branden.robinson@gmail.com>
* tmac/an.tmac (an-abbreviate-title): Rename to...
diff --git a/tmac/tests/an_font-remapping-does-not-affect-titles.sh
b/tmac/tests/an_font-remapping-does-not-affect-titles.sh
new file mode 100755
index 0000000..5f8c8c9
--- /dev/null
+++ b/tmac/tests/an_font-remapping-does-not-affect-titles.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Copyright (C) 2021 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 #61279.
+#
+# If a SH or SS (sub)section heading was about to be output at the
+# bottom of a page but wasn't because of the vertical space .ne-eded,
+# we want to ensure that font remapping for the headings doesn't affect
+# page footers and headers.
+
+INPUT='.TH \\fIfoo\\fP 1 2021-10-04 "groff test suite"
+.SH Name
+foo \\- a command with a very short name
+.sp 50v
+.SH "\\fIgroff\\fP integration"
+A complicated situation.'
+
+OUTPUT=$(echo "$INPUT" | "$groff" -Tascii -man -rcR=0 -Z)
+
+# Expected:
+# 75 p2
+# 76 x font 2 I
+# 77 f2
+# 78 s10
+# 79 V160
+# 80 H0
+# 81 tfoo
+
+echo "$OUTPUT" | nl | grep -E '77[[:space:]]+f2'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 9b7455f..7febbb6 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -164,6 +164,7 @@ tmac_TESTS = \
tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh \
tmac/tests/an_X-register-works.sh \
tmac/tests/an_avoid-two-font-denial-of-service.sh \
+ tmac/tests/an_font-remapping-does-not-affect-titles.sh \
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 \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 06/11: Regression-test Savannah #61279.,
G. Branden Robinson <=