gbranden pushed a commit to branch master
in repository groff.

commit 4d4a9e4d9af087908bac9df5b5d617f0a983864e
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Sat Aug 2 05:35:15 2025 -0500

    [man,mdoc]: Regression-test Savannah #67385.
    
    * tmac/tests/an_degenerate-input-uses-sane-page-length.sh:
    * tmac/tests/doc_degenerate-input-uses-sane-page-length.sh: Add tests.
    
    * tmac/tmac.am (tmac_TESTS): Run tests.
    
    The mdoc test fails at this commit.
---
 ChangeLog                                          |  7 +++++
 .../an_degenerate-input-uses-sane-page-length.sh   | 32 ++++++++++++++++++++++
 .../doc_degenerate-input-uses-sane-page-length.sh  | 32 ++++++++++++++++++++++
 tmac/tmac.am                                       |  2 ++
 4 files changed, 73 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 929a1cc5b..7dd4d0f50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-08-02  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       * tmac/tests/an_degenerate-input-uses-sane-page-length.sh:
+       * tmac/tests/doc_degenerate-input-uses-sane-page-length.sh: Add
+       tests.
+       * tmac/tmac.am (tmac_TESTS): Run tests.
+
 2025-08-02  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        * font/devpdf/util/BuildFoundries.pl (RunAfmtodit): Run
diff --git a/tmac/tests/an_degenerate-input-uses-sane-page-length.sh 
b/tmac/tests/an_degenerate-input-uses-sane-page-length.sh
new file mode 100755
index 000000000..0886936fa
--- /dev/null
+++ b/tmac/tests/an_degenerate-input-uses-sane-page-length.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (C) 2025 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"
+
+input='.
+.P
+This is my paragraph.
+.'
+
+output=$(echo "$input" | "$groff" -rcR=1 -man -T ascii -P -cbou)
+echo "$output"
+
+test $(echo "$output" | wc -l) -eq 1
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tests/doc_degenerate-input-uses-sane-page-length.sh 
b/tmac/tests/doc_degenerate-input-uses-sane-page-length.sh
new file mode 100755
index 000000000..3db563abe
--- /dev/null
+++ b/tmac/tests/doc_degenerate-input-uses-sane-page-length.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (C) 2025 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"
+
+input='.
+.Pp
+This is my paragraph.
+.'
+
+output=$(echo "$input" | "$groff" -rcR=1 -mdoc -T ascii -P -cbou)
+echo "$output"
+
+test $(echo "$output" | wc -l) -eq 4 # _not_ 1342177; future: 1
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 3b72ea7a5..ed86a27e1 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -167,6 +167,7 @@ tmac_TESTS = \
   tmac/tests/an_adjustment-mode-restoration-works.sh \
   tmac/tests/an_avoid-two-font-denial-of-service.sh \
   tmac/tests/an_degenerate-documents-work.sh \
+  tmac/tests/an_degenerate-input-uses-sane-page-length.sh \
   tmac/tests/an_do-not-abbreviate-escape-using-TH-arguments.sh \
   tmac/tests/an_font-remapping-does-not-affect-titles.sh \
   tmac/tests/an_handle-degenerate-input-quietly.sh \
@@ -203,6 +204,7 @@ tmac_TESTS = \
   tmac/tests/doc_Xr-works.sh \
   tmac/tests/doc_accept-mixed-case-section-headings.sh \
   tmac/tests/doc_adjustment-mode-restoration-works.sh \
+  tmac/tests/doc_degenerate-input-uses-sane-page-length.sh \
   tmac/tests/doc_do-not-loop-infinitely-when-shortening-headers.sh \
   tmac/tests/doc_heading-font-remapping-works.sh \
   tmac/tests/doc_hyphenation-mode-restoration-works.sh \

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to