gbranden pushed a commit to branch master
in repository groff.

commit 69773ac2280704a0da30a8d40da2095c3f79e7de
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed May 13 03:35:10 2026 -0500

    tmac/tests/an_MR-works.sh: Validate more behavior.
    
    * tmac/tests/an_MR-works.sh: Validate behavior of macro when given only
      one argument.
    
    Prompted by GitHub user avih in <https://github.com/gwsw/less/pull/770>.
    
    ANNOUNCE: Acknowledge Avi Halachmi.
---
 ANNOUNCE                  |  1 +
 ChangeLog                 |  8 ++++++++
 tmac/tests/an_MR-works.sh | 24 ++++++++++++++++++++++++
 3 files changed, 33 insertions(+)

diff --git a/ANNOUNCE b/ANNOUNCE
index ea329cc67..ff61dae71 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -209,6 +209,7 @@ of this release.
 
 Alex Colomar
 Alexis Hildebrandt
+Avi Halachmi
 Bob Friesenhahn
 Bruno Haible
 Dave Kemper
diff --git a/ChangeLog b/ChangeLog
index 6cd517b3b..035155cea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-05-13  G. Branden Robinson <[email protected]>
+
+       * tmac/tests/an_MR-works.sh: Validate behavior of macro when
+       given only one argument.
+
+       Prompted by GitHub user avih in
+       <https://github.com/gwsw/less/pull/770>.
+
 2026-05-13  G. Branden Robinson <[email protected]>
 
        * tmac/tests/an_MR-works.sh: Future-proof test against more
diff --git a/tmac/tests/an_MR-works.sh b/tmac/tests/an_MR-works.sh
index 1b24b786f..4fdf87424 100755
--- a/tmac/tests/an_MR-works.sh
+++ b/tmac/tests/an_MR-works.sh
@@ -44,6 +44,9 @@ foo \- a command with a very short name
 .SH Description
 The real work is done by
 .MR bar 1 .
+It gets the job done best,
+.MR baz
+none.
 .'
 
 output=$(printf '%s\n' "$input" | "$groff" -Tascii -rU1 -man -Z | nl)
@@ -58,6 +61,15 @@ echo "$output"
 #   96  V280
 #   97  H912
 #   98  x X tty: link
+# ...
+#   111  tbest,
+#   112  wf2
+#   113  h24
+#   114  tbaz
+#   115  wf1
+#   116  h24
+#   117  tnone.
+
 
 echo "checking for opening 'link' device extension command" >&2
 echo "$output" | grep -Eq '91[[:space:]]+x X tty: link man:bar\(1\)$' \
@@ -79,6 +91,15 @@ echo "checking for closing 'link' device extension command" 
>&2
 echo "$output" | grep -Eq '98[[:space:]]+x X tty: link$' \
     || wail
 
+echo "checking for correct man page topic font style when MR given" \
+    "only one argument" >&2
+
+echo "$output" \
+    | grep -Eq '112[[:space:]]+(w[[:space:]]*)f[[:space:]]*2' \
+    || wail
+echo "$output" | grep -Eq '114[[:space:]]+t[[:space:]]*baz' \
+    || wail
+
 output=$(echo "$input" | "$groff" -man -Thtml)
 echo "$output"
 
@@ -86,6 +107,9 @@ echo "checking for correctly formatted man URI in HTML 
output" >&2
 echo "$output" | grep -Fq '<a href="man:bar(1)"><i>bar</i>(1)</a>.' \
     || wail
 
+echo "checking for correctly formatted lone MR macro argument" >&2
+echo "$output" | grep -Fq 'best, <i>baz</i> none.' || wail
+
 test -z "$fail"
 
 # 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