From bd2f6a06733eea2ad93cad281b0030dc124343ad Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 10:43:59 -1000 Subject: Cover the rest of the man macros --- tests/extensions/test-about-render.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests/extensions') diff --git a/tests/extensions/test-about-render.lua b/tests/extensions/test-about-render.lua index d5d2d2e..fd57d4e 100644 --- a/tests/extensions/test-about-render.lua +++ b/tests/extensions/test-about-render.lua @@ -532,6 +532,31 @@ out = render("page.1", ".TH title 1\nbody") h.excludes("the title macro renders nothing itself", out, "title 1") h.contains("the body after it renders", out, "

body

") +out = render("page.1", ".IP 1. 4\nFirst.") +h.contains("a number leads its item", out, "

1. \nFirst.

") + +out = render("page.1", "a\n.PP\nb\n.LP\nc\n.P\nd\n.HP\ne\n.RS\nf\n.RE\ng") +h.contains("each paragraph macro starts a paragraph", out, + "

a

b

c

d

e

f

g

") + +out = render("page.1", ".I word") +h.contains("the italic macro renders emphasis", out, "

word

") + +out = render("page.1", ".RB a b\n.RI c d\n.BI e f\n.IB g h") +h.contains("every alternating macro switches its fonts", out, + "

ab\ncd\nef\ngh

") + +out = render("page.1", ".XY some words") +h.contains("an unknown macro's arguments are drawn as text", out, "

some words

") + +out = render("page.1", ".ig\nhidden\n..\n.am x\nhidden\n..\n.de1 y\nhidden\n..\n.y gone\nshown") +h.equals("every kind of definition is skipped, and so are its uses", out, + "

shown

") + +out = render("page.1", ".SH \n & text") +h.contains("markup in a man heading is escaped", out, "

<b>

") +h.contains("markup in man text is escaped", out, "

<b> & text

") + -- A parse that fails falls back to escaped plain text, and an emit that -- fails part way still closes the wrapper, so neither ends the request in -- an error. These load a broken copy of the script, so they come last. -- cgit 2.12.1