groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/08: Add regression test for Savannah #59246.


From: G. Branden Robinson
Subject: [groff] 02/08: Add regression test for Savannah #59246.
Date: Sun, 11 Oct 2020 04:17:31 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit c22725f99808af59dc127b07c69ff151800b1e10
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 11 02:58:56 2020 +1100

    Add regression test for Savannah #59246.
    
    * tmac/tests/andoc-clear-doc-traps.sh: Add regression test for Savannah
      #59246.
    
    * tmac/tmac.an: Run test.
---
 ChangeLog                           |  6 +++++
 tmac/tests/andoc-clear-doc-traps.sh | 47 +++++++++++++++++++++++++++++++++++++
 tmac/tmac.am                        |  1 +
 3 files changed, 54 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 7f01f62..698d260 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-10-11  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/tests/andoc-clear-doc-traps.sh: Add regression test for
+       Savannah #59246.
+       * tmac/tmac.an: Run test.
+
 2020-10-10  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/tbl/table.cpp (table::init_output): In the release
diff --git a/tmac/tests/andoc-clear-doc-traps.sh 
b/tmac/tests/andoc-clear-doc-traps.sh
new file mode 100755
index 0000000..9ae1929
--- /dev/null
+++ b/tmac/tests/andoc-clear-doc-traps.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright (C) 2020 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 #59246.
+#
+# andoc should remove mdoc(7) traps before rendering a man(7) page.
+# Continuous rendering has to be _off_ to catch this.
+
+EXAMPLE=\
+'.Dd October 11, 2020
+.Dt mdoc\-test 7
+.Os
+.Sh Name
+.Nm mdoc\-test
+.Nd lay mine
+.Sh Description
+Just testing.
+.TH man-test 7 2020-10-11
+.SH Name
+man-test \- drive sheep across minefield
+.SH Description
+\[lq]doc-footer\[rq] should definitely not be sprung by this document.'
+
+! printf "%s\n" "$EXAMPLE" \
+    | "$groff" -Tascii -P-cbou -mandoc -rcR=0 \
+    | grep -E '^BSD +October 11, 2020 +3$'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 3c9ea5d..4666573 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -171,6 +171,7 @@ tmac_TESTS = \
   tmac/tests/an-old_TS_do_not_keep_tables_when_cR_set.sh \
   tmac/tests/an-old_X_register_works.sh \
   tmac/tests/an-old_avoid_two-font_denial_of_service.sh \
+  tmac/tests/andoc-clear-doc-traps.sh \
   tmac/tests/doc-accept-mixed-case-section-headings.sh \
   tmac/tests/doc-smoke-test.sh
 TESTS += $(tmac_TESTS)



reply via email to

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