[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 28/31: Add regression tests for Savannah #60373.
From: |
G. Branden Robinson |
Subject: |
[groff] 28/31: Add regression tests for Savannah #60373. |
Date: |
Sun, 30 May 2021 11:12:39 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit fc8603322f91d5d4ede07422d51e9ee1143bae87
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun May 30 20:47:34 2021 +1000
Add regression tests for Savannah #60373.
* contrib/mm/tests/LT_SP_AU_without_AT_works.sh:
* contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh: Add tests.
* contrib/mm/mm.am (mm_TESTS): Run tests.
Tests fail at this commit.
---
ChangeLog | 8 ++++
contrib/mm/mm.am | 2 +
contrib/mm/tests/LT_SP_AU_without_AT_works.sh | 50 ++++++++++++++++++++++++
contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh | 49 +++++++++++++++++++++++
4 files changed, 109 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 27cc2b4..1f10bf1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-05-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ Add regression tests for Savannah #60373.
+
+ * contrib/mm/tests/LT_SP_AU_without_AT_works.sh:
+ * contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh: Add tests.
+ * contrib/mm/mm.am (mm_TESTS): Run tests.
+
2021-05-30 Tadziu Hoffman <hoffmann@usm.uni-muenchen.de>
Fix Savannah #57034.
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index 5bd4940..f4114bb 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -66,6 +66,8 @@ EXTRA_DIST += \
contrib/mm/mmroff.pl
mm_TESTS = \
+ contrib/mm/tests/LT_SP_AU_without_AT_works.sh \
+ contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh \
contrib/mm/tests/MT_5_includes_AT_in_SG.sh
TESTS += $(mm_TESTS)
EXTRA_DIST += $(mm_TESTS)
diff --git a/contrib/mm/tests/LT_SP_AU_without_AT_works.sh
b/contrib/mm/tests/LT_SP_AU_without_AT_works.sh
new file mode 100755
index 0000000..7589966
--- /dev/null
+++ b/contrib/mm/tests/LT_SP_AU_without_AT_works.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 #60373 (3/3).
+#
+# Ensure that an author name (AU) with no title (AT) isn't rendered with
+# a trailing comma.
+#
+# Thanks to Robert Goulding for the reproducer.
+
+EXAMPLE='.LT SP
+.WA "John Doe"
+Nowhere,
+USA.
+.WE
+.IA "Jane Smith"
+Somewhere,
+UK.
+.IE
+.LO SJ "Letter of Introduction"
+.LO SA "Dear Ms.\& Smith"
+.P
+This is the text of the letter.
+.FC "Yours sincerely,"
+.SG'
+
+echo "$EXAMPLE" \
+ | "$groff" -Tascii -P-cbou -mm \
+ | grep -Eqx '[[:space:]]+JOHN DOE[[:space:]]*'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh
b/contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.sh
new file mode 100755
index 0000000..98c3fda
--- /dev/null
+++ b/contrib/mm/tests/LT_SP_multi-word_LO_SJ_works.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 #60373 (1/3).
+#
+# Ensure that a multi-word subject line (LO SJ) gets rendered.
+#
+# Thanks to Robert Goulding for the reproducer.
+
+EXAMPLE='.LT SP
+.WA "John Doe"
+Nowhere,
+USA.
+.WE
+.IA "Jane Smith"
+Somewhere,
+UK.
+.IE
+.LO SJ "Letter of Introduction"
+.LO SA "Dear Ms.\& Smith"
+.P
+This is the text of the letter.
+.FC "Yours sincerely,"
+.SG'
+
+echo "$EXAMPLE" \
+ | "$groff" -Tascii -P-cbou -mm \
+ | grep -Eqx '[[:space:]]+LETTER OF INTRODUCTION[[:space:]]*'
+
+# vim:set ai et sw=4 ts=4 tw=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 28/31: Add regression tests for Savannah #60373.,
G. Branden Robinson <=