[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 06/49: [man, mdoc]: Regression-test special case.
From: |
G. Branden Robinson |
Subject: |
[groff] 06/49: [man, mdoc]: Regression-test special case. |
Date: |
Sun, 6 Nov 2022 00:37:18 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 36a85c307b0eabca346ad5f20a99f6071c14f8cf
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 2 03:07:55 2022 -0500
[man, mdoc]: Regression-test special case.
[man, mdoc]: Regression-test special case of continuous rendering when
the last pending output line in the document is 1v from the (notional)
page bottom.
* tmac/tests/an_output-footer-when-continuously-rendering.sh:
* tmac/tests/doc_output-footer-when-continuously-rendering.sh: Do it.
* tmac/tmac.am (tmac_TESTS): Run tests.
Tests fail at this commit.
---
ChangeLog | 11 ++++++
...an_output-footer-when-continuously-rendering.sh | 41 +++++++++++++++++++++
...oc_output-footer-when-continuously-rendering.sh | 43 ++++++++++++++++++++++
tmac/tmac.am | 2 +
4 files changed, 97 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 10d6af090..3f620e5c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-11-02 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [man, mdoc]: Regression-test special case of continuous
+ rendering when the last pending output line in the document is
+ 1v from the (notional) page bottom.
+
+ * tmac/tests/an_output-footer-when-continuously-rendering.sh:
+ * tmac/tests/doc_output-footer-when-continuously-rendering.sh:
+ Do it.
+ * tmac/tmac.am (tmac_TESTS): Run tests.
+
2022-11-02 G. Branden Robinson <g.branden.robinson@gmail.com>
* tmac/an.tmac (TE): Update diagnostic to mention another
diff --git a/tmac/tests/an_output-footer-when-continuously-rendering.sh
b/tmac/tests/an_output-footer-when-continuously-rendering.sh
new file mode 100755
index 000000000..4cf476be7
--- /dev/null
+++ b/tmac/tests/an_output-footer-when-continuously-rendering.sh
@@ -0,0 +1,41 @@
+#!/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"
+
+# Ensure that the page footer is printed even when a pending output line
+# is 1v from the page bottom. (A page ejection inside an end of input
+# trap exits the formatter.)
+
+input='.TH foo 1 2022-11-02 "groff test suite"
+.SH Name
+foo \\- frobnicate a bar
+.SH Description
+.rs
+.sp 60v
+line 61
+.br
+line 62'
+
+output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -man)
+echo "$output"
+echo "$output" | grep -Eqx 'groff test suite +2022-11-02 +foo\(1\)'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tests/doc_output-footer-when-continuously-rendering.sh
b/tmac/tests/doc_output-footer-when-continuously-rendering.sh
new file mode 100755
index 000000000..330307170
--- /dev/null
+++ b/tmac/tests/doc_output-footer-when-continuously-rendering.sh
@@ -0,0 +1,43 @@
+#!/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"
+
+# Ensure that the page footer is printed even when a pending output line
+# is 1v from the page bottom. (A page ejection inside an end of input
+# trap exits the formatter.)
+
+input='.Dd 2022-11-02
+.Dt foo 1
+.Os "groff test suite"
+.Sh Name
+.Nm foo
+.Nd frobnicate a bar
+.Sh Description
+.rs
+.sp 60v
+line 61
+.br
+line 62'
+
+output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -mdoc)
+echo "$output" | grep -Eqx 'groff test suite +2022-11-02 +foo\(1\)'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index c68365ce2..9c398a781 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -172,6 +172,7 @@ tmac_TESTS = \
tmac/tests/an_handle-degenerate-input-quietly.sh \
tmac/tests/an_inner-footer-abbreviation-works.sh \
tmac/tests/an_no-break-after-short-paragraph-tags.sh \
+ tmac/tests/an_output-footer-when-continuously-rendering.sh \
tmac/tests/an_page-footers-present.sh \
tmac/tests/an_page-header-has-current-data.sh \
tmac/tests/an_reset-hyphenation-correctly.sh \
@@ -188,6 +189,7 @@ tmac_TESTS = \
tmac/tests/doc_accept-mixed-case-section-headings.sh \
tmac/tests/doc_do-not-loop-infinitely-when-shortening-headers.sh \
tmac/tests/doc_indents-correctly.sh \
+ tmac/tests/doc_output-footer-when-continuously-rendering.sh \
tmac/tests/doc_smoke-test.sh \
tmac/tests/e_chapter-titles-work.sh \
tmac/tests/e_columns-work-on-long-pages.sh \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 06/49: [man, mdoc]: Regression-test special case.,
G. Branden Robinson <=