gbranden pushed a commit to branch master
in repository groff.

commit bb79987ac3a733f0f36ea29f02eb9a7c5b37ceea
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Jul 18 05:17:51 2026 -0500

    [ms]: Regression-test Savannah #68537.
    
    * tmac/tests/s_automatic-footnote-number-works-in-table.sh: Do it.
    
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                                          |  8 +++
 .../s_automatic-footnote-number-works-in-table.sh  | 57 ++++++++++++++++++++++
 tmac/tmac.am                                       |  1 +
 3 files changed, 66 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 744077e87..f210bebef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-07-18  G. Branden Robinson <[email protected]>
+
+       [ms]: Regression-test Savannah #68537.
+
+       * tmac/tests/s_automatic-footnote-number-works-in-table.sh: Do
+       it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2026-07-17  G. Branden Robinson <[email protected]>
 
        * src/utils/grog/grog.pl: Add undocumented debugging mode.  New
diff --git a/tmac/tests/s_automatic-footnote-number-works-in-table.sh 
b/tmac/tests/s_automatic-footnote-number-works-in-table.sh
new file mode 100755
index 000000000..797868599
--- /dev/null
+++ b/tmac/tests/s_automatic-footnote-number-works-in-table.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# Copyright 2026 G. Branden Robinson
+#
+# This file is part of groff, the GNU roff typesetting system.
+#
+# 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"
+
+fail=
+
+wail () {
+    echo "...FAILED" >&2
+    fail=YES
+}
+
+# Automatically generated numeric footnote marks, obtained with the ms
+# string `\*[*]` (or `\**`) should work even in tbl(1) tables.
+
+input='.
+.LP
+This is my
+.I ms
+document.
+.TS
+L.
+foo\**
+.TE
+.FS
+Bar.
+.FE
+.'
+
+output=$(printf '%s\n' "$input" | "$groff" -t -m s -T ascii 2>&1)
+echo "$output"
+
+echo "checking number of footnote mark in table" >&2
+echo "$output" | grep -Fq 'foo[1]' || wail
+
+echo "checking number of footnote mark at page foot" >&2
+echo "$output" | grep -Fq '[1] Bar.' || wail
+
+test -z "$fail"
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index dc342422f..fbd7c2a4e 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -252,6 +252,7 @@ tmac_TESTS = \
   tmac/tests/s_TC-works-with-percent-in-custom-titles.sh \
   tmac/tests/s_XA-literal-no-argument-suppresses-leader.sh \
   tmac/tests/s_XA-reduces-line-length.sh \
+  tmac/tests/s_automatic-footnote-number-works-in-table.sh \
   tmac/tests/s_can-start-document-with-DS-call.sh \
   tmac/tests/s_honor-MINGW-when-two-columns.sh \
   tmac/tests/s_honor-page-break-after-display.sh \

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

Reply via email to