gbranden pushed a commit to branch master
in repository groff.
commit 5e3aa09a81b35f0d5c81a18f4d03bf3e2481cad5
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Feb 18 14:54:08 2026 -0600
[mm]: Enhance "lists-indent-correctly.sh" test.
* contrib/mm/tests/lists-indent-correctly.sh: Add test for quantity of
diagnostic message lines produced by input. We expect exactly one.
Also wrangle the standard error stream so as to dump all such
diagnostics _after_ the (voluminous) formatted output, where they're
harder to miss.
Test fails at this commit.
---
contrib/mm/ChangeLog | 8 ++++++++
contrib/mm/tests/lists-indent-correctly.sh | 11 +++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 7191fd238..6ef5ca558 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,11 @@
+2026-02-18 G. Branden Robinson <[email protected]>
+
+ * tests/lists-indent-correctly.sh: Add test for quantity of
+ diagnostic message lines produced by input. We expect exactly
+ one. Also wrangle the standard error stream so as to dump all
+ such diagnostics _after_ the (voluminous) formatted output,
+ where they're harder to miss.
+
2026-02-18 G. Branden Robinson <[email protected]>
* m.tmac: Fix truncated diagnostic messages caused by macro
diff --git a/contrib/mm/tests/lists-indent-correctly.sh
b/contrib/mm/tests/lists-indent-correctly.sh
index 88fd3ce27..e0057d934 100755
--- a/contrib/mm/tests/lists-indent-correctly.sh
+++ b/contrib/mm/tests/lists-indent-correctly.sh
@@ -224,7 +224,8 @@ o21 o22 o23 o24 o25 o26 o27 o28 o29 o30
# *[1] o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16
# o17 o18 o19 o20 o21 o22 o23 o24 o25 o26 o27 o28 o29 o30
-output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou)
+output=$(printf "%s\n" "$input" \
+ | "$groff" -mm -Tascii -P-cbou 2> /dev/null)
echo "$output"
echo "checking indentation of AL list, first line" >&2
@@ -317,6 +318,12 @@ echo "$output" | grep -Eq "^ {7}\*\[1] o1" || wail
echo "checking indentation of padless prefixed RL list, second line" >&2
echo "$output" | grep -Eq "^ {12}o17" || wail
+error=$(printf "%s\n" "$input" | "$groff" -z -mm -Tascii -P-cbou 2>&1)
+echo "$error"
+
+echo "checking that input produced only 1 diagnostic message" >&2
+test $(echo "$error" | wc -l) -eq 1 || wail
+
test -z "$fail"
-# vim:set ai et sw=4 ts=4 tw=72:
+# vim:set autoindent expandtab shiftwidth=4 tabstop=4 textwidth=72:
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit