groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 02/02: tmac/tests/doc_Xr-works.sh: Check inline Pf, Ns.


From: G. Branden Robinson
Subject: [groff] 02/02: tmac/tests/doc_Xr-works.sh: Check inline Pf, Ns.
Date: Sun, 25 Feb 2024 16:38:09 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit eafbf76e9877f6cae1dae151f898053536f7dbbf
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Feb 25 15:30:58 2024 -0600

    tmac/tests/doc_Xr-works.sh: Check inline Pf, Ns.
    
    * tmac/tests/doc_Xr-works.sh: Add checks of inline `Pf` and `Ns` call
      behavior after `Xr`.
---
 ChangeLog                  |  5 +++++
 tmac/tests/doc_Xr-works.sh | 21 +++++++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 80215aa97..2b0cc126c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-02-25  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/tests/doc_Xr-works.sh: Add checks of inline `Pf` and `Ns`
+       call behavior after `Xr`.
+
 2024-02-25  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/tests/doc_heading-font-remapping-works.sh: Dump output of
diff --git a/tmac/tests/doc_Xr-works.sh b/tmac/tests/doc_Xr-works.sh
index 26520cf42..d10225d40 100755
--- a/tmac/tests/doc_Xr-works.sh
+++ b/tmac/tests/doc_Xr-works.sh
@@ -34,7 +34,7 @@ input='.Dd 2024-02-22
 .Sh Name
 .Nm foo
 .Nd frobnicate a bar
-.Sh Description.
+.Sh Description
 Degenerate macro call here.
 .Xr
 .Pp
@@ -54,7 +54,16 @@ The
 .Xr groff_diff ,
 and
 .Xr roff
-pages in section 7 are also illuminating.'
+pages in section 7 are also illuminating.
+.Pp
+You could also read about
+.Xr groff Xr mdoc .
+.Pp
+Or
+about
+.Xr groff Pf - Xr man
+and
+.Xr groff Ns - Ns Xr ms .'
 
 output=$(echo "$input" | "$groff" -mdoc -Tascii -P-cbou 2>/dev/null)
 error=$(echo "$input" | "$groff" -mdoc -Tascii -P-cbou 2>&1 >/dev/null)
@@ -81,6 +90,14 @@ echo "checking that prefixed Xr macro call works" >&2
 echo "$output" \
     | grep -Fq '(groff_font(5) is also worth a look.)' || wail
 
+# We don't expect an inline Pf call to prevent a word break before it.
+echo "checking that inline Pf after Xr macro call works" >&2
+echo "$output" | grep -Fq 'read about groff mdoc' || wail
+
+# But we do expect Ns to do so.
+echo "checking that inline Ns after Xr macro call works" >&2
+echo "$output" | grep -Fq 'Or about groff -man and groff-ms.' || wail
+
 test -z "$fail"
 
 # vim:set ai et sw=4 ts=4 tw=72:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]