gbranden pushed a commit to branch master
in repository groff.

commit 3b5626f5ef53810451d0874d918f86581d964bbb
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Jul 20 12:00:19 2024 -0500

    [grog]: Regression-test Savannah #66006.
    
    * src/utils/grog/tests/avoid-man-fakeout.sh: Do it.
    * src/utils/grog/grog.am (grog_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                 |  7 +++++
 src/utils/grog/grog.am                    |  1 +
 src/utils/grog/tests/avoid-man-fakeout.sh | 43 +++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index b53aed0e5..2d41dea84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-07-20  G. Branden Robinson <[email protected]>
+
+       Regression-test Savannah #66006.
+
+       * src/utils/grog/tests/avoid-man-fakeout.sh: Do it.
+       * src/utils/grog/grog.am (grog_TESTS): Run test.
+
 2024-07-20  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (is_char_usable_as_delimiter): Reject
diff --git a/src/utils/grog/grog.am b/src/utils/grog/grog.am
index 2c3fcf05e..84616c04c 100644
--- a/src/utils/grog/grog.am
+++ b/src/utils/grog/grog.am
@@ -35,6 +35,7 @@ grog: $(grog_srcdir)/grog.pl $(SH_DEPS_SED_SCRIPT)
 
 grog_TESTS = \
   src/utils/grog/tests/PF-does-not-start-pic-region.sh \
+  src/utils/grog/tests/avoid-man-fakeout.sh \
   src/utils/grog/tests/avoid-refer-fakeout.sh \
   src/utils/grog/tests/detect-chem.sh \
   src/utils/grog/tests/preserve-groff-options.sh \
diff --git a/src/utils/grog/tests/avoid-man-fakeout.sh 
b/src/utils/grog/tests/avoid-man-fakeout.sh
new file mode 100755
index 000000000..5fa7171ae
--- /dev/null
+++ b/src/utils/grog/tests/avoid-man-fakeout.sh
@@ -0,0 +1,43 @@
+#!/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/>.
+#
+
+grog="${abs_top_builddir:-.}/grog"
+
+# Regression-test Savannah #66006.
+#
+# Don't confuse input that uses `TH` inside tbl(1) regions for man(7)
+# documents.
+
+input='.
+.TS
+tab(@)
+L L.
+Heading 1@Heading 2
+.TH
+datum 1@datum 2
+datum 3@datum 4
+.TE
+.'
+
+output=$(echo "$input" | "$grog")
+echo "$output"
+echo "$output" | grep -Fqx 'groff -t -'
+
+# vim:set ai et sw=4 ts=4 tw=72:

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

Reply via email to