gbranden pushed a commit to branch master
in repository groff.

commit aab74ead30a3356252011314a2af1642e36653ad
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jun 20 11:59:06 2024 -0500

    [groff]: Add regression test for latent troff bug.
    
    Add regression test for latent bug: surprising "grout" produced when
    using "html" output device and a memory management bug is fixed.
    
    * src/roff/groff/tests/html-does-not-fumble-tagged-paragraph.sh: Do it.
    * src/roff/groff/groff.am (groff_TESTS): Run test.
---
 ChangeLog                                          | 10 +++++
 src/roff/groff/groff.am                            |  1 +
 .../tests/html-does-not-fumble-tagged-paragraph.sh | 48 ++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 005aa4fcb..44fc57bbd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-06-20  G. Branden Robinson <[email protected]>
+
+       Add regression test for latent bug: surprising "grout" produced
+       when using "html" output device and a memory management bug is
+       fixed.
+
+       * src/roff/groff/tests/html-does-not-fumble-tagged-paragraph.sh:
+       Do it.
+       * src/roff/groff/groff.am (groff_TESTS): Run test.
+
 2024-06-10  G. Branden Robinson <[email protected]>
 
        * src/utils/grog/grog.pl (do_line): Recognize new `pline`
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 0ce7601eb..7e9ebe212 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -65,6 +65,7 @@ groff_TESTS = \
   src/roff/groff/tests/fp_should_not_traverse_directories.sh \
   src/roff/groff/tests/handle_special_input_code_points.sh \
   src/roff/groff/tests/hla-request-works.sh \
+  src/roff/groff/tests/html-does-not-fumble-tagged-paragraph.sh \
   src/roff/groff/tests/html_works_with_grn_and_eqn.sh \
   src/roff/groff/tests/initialization_is_quiet.sh \
   src/roff/groff/tests/localization_works.sh \
diff --git a/src/roff/groff/tests/html-does-not-fumble-tagged-paragraph.sh 
b/src/roff/groff/tests/html-does-not-fumble-tagged-paragraph.sh
new file mode 100755
index 000000000..f826844fa
--- /dev/null
+++ b/src/roff/groff/tests/html-does-not-fumble-tagged-paragraph.sh
@@ -0,0 +1,48 @@
+#!/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"
+
+# A paragraph tag should typeset on one line if it's shorter than the
+# line length.
+
+input='.TH foo 1 2024-06-19 "groff test suite"
+.SH Name
+foo \- frobnicate a bar
+.SH Description
+.PP
+A character definition can be removed with the
+.B rchar
+request.
+.
+.
+.TP
+.BI .chop\~ name
+Remove the last character from the macro,
+string,
+or diversion
+.IR name .'
+
+output=$(echo "$input" | "$groff" -man -T html -Z)
+echo "$output"
+
+echo "$output" | grep -qx 't *\.chop'
+
+# vim:set autoindent expandtab shiftwidth=2 tabstop=2 textwidth=72:

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to