From 4cda312e06fb58e99f0128b8055cac564db0eda6 Mon Sep 17 00:00:00 2001 From: schwarze Date: Sat, 21 Sep 2024 11:56:36 +0000 Subject: [PATCH] Check that .In is callable and parsed. Triggered by a documentation patch from Evan Silberman . I'm not testing yet whether the same applies in the SYNOPSIS section because there are multiple parsing and formatting differences with groff in that section. --- regress/usr.bin/mandoc/mdoc/In/Makefile | 4 ++-- regress/usr.bin/mandoc/mdoc/In/parse.in | 13 +++++++++++++ regress/usr.bin/mandoc/mdoc/In/parse.out_ascii | 9 +++++++++ regress/usr.bin/mandoc/mdoc/In/parse.out_markdown | 15 +++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 regress/usr.bin/mandoc/mdoc/In/parse.in create mode 100644 regress/usr.bin/mandoc/mdoc/In/parse.out_ascii create mode 100644 regress/usr.bin/mandoc/mdoc/In/parse.out_markdown diff --git a/regress/usr.bin/mandoc/mdoc/In/Makefile b/regress/usr.bin/mandoc/mdoc/In/Makefile index 3bb3b791c77..9148e5f33c3 100644 --- a/regress/usr.bin/mandoc/mdoc/In/Makefile +++ b/regress/usr.bin/mandoc/mdoc/In/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.9 2017/03/08 22:53:35 schwarze Exp $ +# $OpenBSD: Makefile,v 1.10 2024/09/21 11:56:36 schwarze Exp $ -REGRESS_TARGETS = break eos font noarg +REGRESS_TARGETS = break eos font noarg parse LINT_TARGETS = noarg .include diff --git a/regress/usr.bin/mandoc/mdoc/In/parse.in b/regress/usr.bin/mandoc/mdoc/In/parse.in new file mode 100644 index 00000000000..79473a20ede --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/In/parse.in @@ -0,0 +1,13 @@ +.\" $OpenBSD: parse.in,v 1.1 2024/09/21 11:56:36 schwarze Exp $ +.Dd $Mdocdate: September 21 2024 $ +.Dt IN-PARSE 2 +.Os +.Sh NAME +.Nm In-parse +.Nd parsing of include file macros +.Sh DESCRIPTION +first line +.Sy parent In arg1 arg2 Sy child +middle line +.In ( arg ) +last line diff --git a/regress/usr.bin/mandoc/mdoc/In/parse.out_ascii b/regress/usr.bin/mandoc/mdoc/In/parse.out_ascii new file mode 100644 index 00000000000..ed05775d6ae --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/In/parse.out_ascii @@ -0,0 +1,9 @@ +IN-PARSE(2) System Calls Manual IN-PARSE(2) + +NNAAMMEE + IInn--ppaarrssee - parsing of include file macros + +DDEESSCCRRIIPPTTIIOONN + first line ppaarreenntt <_a_r_g_1> arg2 cchhiilldd middle line (<_a_r_g>) last line + +OpenBSD September 21, 2024 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/In/parse.out_markdown b/regress/usr.bin/mandoc/mdoc/In/parse.out_markdown new file mode 100644 index 00000000000..d4ff689217b --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/In/parse.out_markdown @@ -0,0 +1,15 @@ +IN-PARSE(2) - System Calls Manual + +# NAME + +**In-parse** - parsing of include file macros + +# DESCRIPTION + +first line +**parent** <*arg1*> arg2 **child** +middle line +(<*arg*>) +last line + +OpenBSD - September 21, 2024 -- 2.20.1