gbranden pushed a commit to branch master
in repository groff.

commit 02ca900b9aa62e41bede7489edeff57e1e5495b5
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Feb 16 18:48:33 2026 -0600

    [mm]: Regression-test Savannah #68052.
    
    Add regression test for Savannah #68052.  Nested marked lists (`ML`)
    were using incorrect item marks after popping a nesting level with `LE`.
    
    * contrib/mm/tests/marks-in-nested-ML-lists-are-correct.sh: Do it.
    * contrib/mm/mm.am (mm_TESTS): Run test.
    
    Test fails at this commit.
---
 contrib/mm/ChangeLog                               |  9 +++
 contrib/mm/mm.am                                   |  1 +
 .../tests/marks-in-nested-ML-lists-are-correct.sh  | 83 ++++++++++++++++++++++
 3 files changed, 93 insertions(+)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 8336966e5..a02bca119 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,12 @@
+2026-02-16  G. Branden Robinson <[email protected]>
+
+       Add regression test for Savannah #68052.  Nested marked lists
+       {`ML`} were using incorrect item marks after popping a nesting
+       level with `LE`.
+
+       * tests/marks-in-nested-ML-lists-are-correct.sh: Do it.
+       * mm.am (mm_TESTS): Run test.
+
 2026-01-29  G. Branden Robinson <[email protected]>
 
        * tests/Captc-translates.sh: Rename this...
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index d7daa096d..6c347588d 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -86,6 +86,7 @@ mm_TESTS = \
   contrib/mm/tests/letter-with-bottom-block-works.sh \
   contrib/mm/tests/letters-format-correctly.sh \
   contrib/mm/tests/lists-indent-correctly.sh \
+  contrib/mm/tests/marks-in-nested-ML-lists-are-correct.sh \
   contrib/mm/tests/memoranda-format-correctly.sh \
   contrib/mm/tests/ms-cover-sheet-robust-to-missing-AF.sh \
   contrib/mm/tests/mse_has-sufficient-footnote-space.sh \
diff --git a/contrib/mm/tests/marks-in-nested-ML-lists-are-correct.sh 
b/contrib/mm/tests/marks-in-nested-ML-lists-are-correct.sh
new file mode 100755
index 000000000..5992255b8
--- /dev/null
+++ b/contrib/mm/tests/marks-in-nested-ML-lists-are-correct.sh
@@ -0,0 +1,83 @@
+#!/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
+}
+
+# Regression-test Savannah #68052.  Nesting `ML` lists should restore
+# the correct list item marks as un-nesting occurs.  This input is based
+# on a reproducer by Alexis Hildebrandt.
+
+input='.SA 0
+.P
+This is an
+.I mm
+document with nested
+.B ML
+marked lists.
+.ML !
+.LI
+one
+.ML #
+.LI
+two
+.ML $
+.LI
+three
+.LE
+.LI
+four
+.LE
+.LI
+five
+.LE'
+
+output=$(echo "$input" | "$groff" -mm -Tascii -P -cbou)
+echo "$output"
+
+echo "checking mark on first item" >&2
+echo "$output" \
+    | grep -qx ' *! one' || wail
+
+echo "checking mark on second item" >&2
+echo "$output" \
+    | grep -qx ' *# two' || wail
+
+echo "checking mark on third item" >&2
+echo "$output" \
+    | grep -qx ' *$ three' || wail
+
+echo "checking mark on fourth item" >&2
+echo "$output" \
+    | grep -qx ' *# four' || wail
+
+echo "checking mark on fifth item" >&2
+echo "$output" \
+    | grep -qx ' *! five' || wail
+
+test -z "$fail"
+
+# 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