groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 04/05: Add regression test for Savannah #60025.


From: G. Branden Robinson
Subject: [groff] 04/05: Add regression test for Savannah #60025.
Date: Wed, 10 Feb 2021 15:15:40 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 153802eb1d3ec60d4c7a7c636ebfd5b9dd480a0d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Feb 11 06:19:46 2021 +1100

    Add regression test for Savannah #60025.
---
 ChangeLog                  |  7 +++++++
 tmac/tests/doc_Mt-works.sh | 47 ++++++++++++++++++++++++++++++++++++++++++++++
 tmac/tmac.am               |  1 +
 3 files changed, 55 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index e419a0d..dd52ec7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-02-11  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       Add regression test for Savannah #60025.
+
+       * tmac/tests/doc_Mt-works.sh: Do it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
+2021-02-11  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        [ms]: Demote definition of \[yogh] special character escape from
        unconditional availability to be defined only if the output
        device defines it or if .AM macro is called to enable support
diff --git a/tmac/tests/doc_Mt-works.sh b/tmac/tests/doc_Mt-works.sh
new file mode 100755
index 0000000..a5c1563
--- /dev/null
+++ b/tmac/tests/doc_Mt-works.sh
@@ -0,0 +1,47 @@
+#!/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"
+
+set -e
+
+# Regression-test Savannah #60025.
+#
+# Ensure .Mt renders correctly.
+
+DOCUMENT=\
+'.Dd 2021-02-10
+.Dt mandoc 1
+.Os groff test suite
+.Sh Authors
+.An -nosplit
+The
+.Nm mandoc
+utility was written by
+.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
+and is maintained by
+.An Ingo Schwarze Aq Mt schwarze@openbsd.org .'
+
+echo "$DOCUMENT" | "$groff" -Tascii -P-cbou -mdoc \
+    | grep -Fq 'written by Kristaps Dzonsons <kristaps@bsd.lv> and'
+
+echo "$DOCUMENT" | "$groff" -Tascii -P-cbou -mdoc \
+    | grep -Fq 'is maintained by Ingo Schwarze <schwarze@openbsd.org>.'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 86204d4..c4d0ed5 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -179,6 +179,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/doc_Mt-works.sh \
   tmac/tests/s_IP_respects_inter-sentence_space_in_tags.sh \
   tmac/tests/s_R-handles-its-arguments.sh \
   tmac/tests/s_TC-works-with-percent-in-custom-titles.sh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]