gbranden pushed a commit to branch master
in repository groff.

commit c6e7772b1c4cea4e61ae22d8099b05c76ed0ee5a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Feb 18 13:38:31 2026 -0600

    [mm]: Add regression test for Savannah #68065.
    
    Marked list (`ML`) macro calls were not treating an explicitly empty
    second argument (text indentation amount) as implying the computed
    default.  This matters when a third argument, the presence of which
    suppresses vertical spacing before each list item, is desired.
    
    * tests/ML-accepts-empty-second-argument.sh: Do it.
    
    * mm.am (mm_TESTS): Run test.
    
    Test fails at this commit.
---
 contrib/mm/ChangeLog                               | 12 ++++++
 contrib/mm/mm.am                                   |  1 +
 .../mm/tests/ML-accepts-empty-second-argument.sh   | 48 ++++++++++++++++++++++
 3 files changed, 61 insertions(+)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index dc80f82a7..e58d9c2ac 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,15 @@
+2026-02-18  G. Branden Robinson <[email protected]>
+
+       Add regression test for Savannah #68065.  Marked list (`ML`)
+       macro calls were not treating an explicitly empty second
+       argument (text indentation amount) as implying the computed
+       default.  This matters when a third argument, the presence of
+       which suppresses vertical spacing before each list item, is
+       desired.
+
+       * tests/ML-accepts-empty-second-argument.sh: Do it.
+       * mm.am (mm_TESTS): Run test.
+
 2026-02-18  G. Branden Robinson <[email protected]>
 
        * m.tmac (ML): Refactor to ease further bug fixing.  Call the
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index 6c347588d..57284e17f 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -72,6 +72,7 @@ mm_TESTS = \
   contrib/mm/tests/LT-SP-AU-without-AT-works.sh \
   contrib/mm/tests/LT-SP-multi-word-LO-SJ-works.sh \
   contrib/mm/tests/LT-should-space-after-inside-address.sh \
+  contrib/mm/tests/ML-accepts-empty-second-argument.sh \
   contrib/mm/tests/ML-marks-work.sh \
   contrib/mm/tests/MT-1-reports-all-TM-numbers.sh \
   contrib/mm/tests/MT-5-includes-AT-in-SG.sh \
diff --git a/contrib/mm/tests/ML-accepts-empty-second-argument.sh 
b/contrib/mm/tests/ML-accepts-empty-second-argument.sh
new file mode 100755
index 000000000..452621491
--- /dev/null
+++ b/contrib/mm/tests/ML-accepts-empty-second-argument.sh
@@ -0,0 +1,48 @@
+#!/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"
+
+# Regression-test Savannah #68065.  The `ML` macro should accept an
+# explicitly empty second argument (text indentation amount).
+
+input='.
+.P
+This is an
+.I mm
+document using an
+.B ML
+marked list that harmlessly specifies an empty second argument to the
+.B ML
+call.
+.ML # ""
+.LI
+alpha
+.LI
+beta
+.LI
+gamma
+.LE
+'
+
+output=$(echo "$input" | "$groff" -mm -Tascii -P -cbou)
+echo "$output"
+echo "$output" | grep -q '# *alpha'
+
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:

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

Reply via email to