gbranden pushed a commit to branch master
in repository groff.
commit 8d7785490f4619ed5a2a7b76833ae6ee429a053a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Jun 10 05:57:08 2024 -0500
[mm]: Regression-test Savannah #65865.
* contrib/mm/tests/cover-page-info-is-present.sh: Do it.
* contrib/mm/mm.am (mm_TESTS): Run test.
Test fails at this commit.
---
contrib/mm/ChangeLog | 7 +++
contrib/mm/mm.am | 1 +
contrib/mm/tests/cover-page-info-is-present.sh | 84 ++++++++++++++++++++++++++
3 files changed, 92 insertions(+)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 998d66a76..d7b7464eb 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-10 G. Branden Robinson <[email protected]>
+
+ Regression-test Savannah #65865.
+
+ * tests/cover-page-info-is-present.sh: Do it.
+ * mm.am (mm_TESTS): Run test.
+
2024-06-05 G. Branden Robinson <[email protected]>
* m.tmac (ML): Throw error if mandatory first argument missing.
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index ab1a99ce6..6b54af8ba 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -67,6 +67,7 @@ mm_TESTS = \
contrib/mm/tests/MT-1-reports-all-TM-numbers.sh \
contrib/mm/tests/MT-5-includes-AT-in-SG.sh \
contrib/mm/tests/P-indentation-works.sh \
+ contrib/mm/tests/cover-page-info-is-present.sh \
contrib/mm/tests/flush-long-displays-at-end-of-input.sh \
contrib/mm/tests/indexing-works.sh \
contrib/mm/tests/ms-cover-sheet-robust-to-missing-AF.sh \
diff --git a/contrib/mm/tests/cover-page-info-is-present.sh
b/contrib/mm/tests/cover-page-info-is-present.sh
new file mode 100755
index 000000000..e3f2526cc
--- /dev/null
+++ b/contrib/mm/tests/cover-page-info-is-present.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 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"
+
+fail=
+
+wail () {
+ echo FAILED >&2
+ fail=YES
+}
+
+# Regression-test Savannah #65865 and other things that could go wrong.
+
+input='.TL C123 F456
+A World-Shaking Breakthrough
+.AF "Yoyodyne Systems, Inc."
+.AU "Art Vandelay"
+.AU "H.\& E.\& Pennypacker"
+.TM 78-9-ABC 98-7-DEF
+.ND "June 10, 2024"
+.AS
+Our successful leverage of core competencies to achieve economies of
+scale has transformed our entire sector of industry with exciting new
+synergies in allocating more money to (already rich) people.
+.AE
+.MT'
+
+output=$(echo "$input" | "$groff" -mm -Tascii -P-cbou)
+echo "$output"
+
+echo "checking for charging case number" >&2
+echo "$output" | grep -q C123 || wail
+
+echo "checking for filing case number" >&2
+echo "$output" | grep -q F456 || wail
+
+echo "checking for title" >&2
+echo "$output" | grep -q Breakthrough || wail
+
+echo "checking for affiliated firm" >&2
+echo "$output" | grep -q Yoyodyne || wail
+
+echo "checking for first author" >&2
+echo "$output" | grep -q 'Art Vandelay' || wail
+
+echo "checking for second author" >&2
+echo "$output" | grep -Fq 'H. E. Pennypacker' || wail
+
+echo "checking for first technical memorandum number" >&2
+echo "$output" | grep -q '78-9-ABC' || wail
+
+echo "checking for second technical memorandum number" >&2
+echo "$output" | grep -q '98-7-DEF' || wail
+
+echo "checking for date" >&2
+echo "$output" | grep -q 'June 10, 2024' || wail
+
+echo "checking for abstract content" >&2
+echo "$output" | grep -q leverage || wail
+
+echo "checking for memorandum type notation" >&2
+echo "$output" | grep -iq 'memorandum for file' || wail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit