[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 05/07: Add regression test for Savannah #59604.
From: |
G. Branden Robinson |
Subject: |
[groff] 05/07: Add regression test for Savannah #59604. |
Date: |
Fri, 11 Jun 2021 01:31:05 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit fa19dfc9f3a072255257f497f393613bae2fe1cd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jun 11 14:42:01 2021 +1000
Add regression test for Savannah #59604.
* tmac/tests/s_IP-indents-using-paragraph-type-size.sh: Add it.
* tmac/tmac.am (tmac_TEST): Run it.
Test fails at this commit.
---
ChangeLog | 7 ++++
.../s_IP-indents-using-paragraph-type-size.sh | 49 ++++++++++++++++++++++
tmac/tmac.am | 1 +
3 files changed, 57 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index a18a7a8..ed7fedc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-11 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Add regression test for Savannah #59604.
+
+ * tmac/tests/s_IP-indents-using-paragraph-type-size.sh: Add it.
+ * tmac/tmac.am (tmac_TEST): Run it.
+
2021-06-08 G. Branden Robinson <g.branden.robinson@gmail.com>
Refactor grog even more aggressively. Make the tedious search
diff --git a/tmac/tests/s_IP-indents-using-paragraph-type-size.sh
b/tmac/tests/s_IP-indents-using-paragraph-type-size.sh
new file mode 100755
index 0000000..17d0d09
--- /dev/null
+++ b/tmac/tests/s_IP-indents-using-paragraph-type-size.sh
@@ -0,0 +1,49 @@
+#!/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 #59604.
+#
+# Ensure that the indentation amount used by IP is based on the type
+# size of the _paragraph_, not a preceding heading (which might have
+# been affected by GROWPS).
+
+EXAMPLE=\
+'.nr PSINCR 3p
+.nr GROWPS 3
+.SH 1
+Text
+.IP 1. 4
+Filling
+.IP 2. 4
+Sentences'
+
+OUTPUT=$(echo "$EXAMPLE" | "$groff" -ms -Z \
+ | sed -n '/^H92000$/{
+ N
+ /\ntFilling$/{
+ p
+ b
+ }
+ }')
+test -n "$OUTPUT"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 8a06a19..7c21053 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -185,6 +185,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_smoke-test.sh \
+ tmac/tests/s_IP-indents-using-paragraph-type-size.sh \
tmac/tests/s_IP-respects-inter-sentence-space-in-tags.sh \
tmac/tests/s_PN-works.sh \
tmac/tests/s_R-handles-its-arguments.sh \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 05/07: Add regression test for Savannah #59604.,
G. Branden Robinson <=