From 8fafc196c8a9cc24f726d752dbc29056f844100b Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 6 Feb 2015 03:31:12 +0000 Subject: better handle .Fo and .Fd without argument better handle .Fo with more than one argument --- regress/usr.bin/mandoc/mdoc/Fd/Makefile | 8 ++++---- regress/usr.bin/mandoc/mdoc/Fd/empty.in | 14 ++++++++++++++ regress/usr.bin/mandoc/mdoc/Fd/empty.out_ascii | 13 +++++++++++++ regress/usr.bin/mandoc/mdoc/Fd/empty.out_lint | 2 ++ regress/usr.bin/mandoc/mdoc/Fo/Makefile | 13 ++++++++----- regress/usr.bin/mandoc/mdoc/Fo/noarg.in | 2 +- regress/usr.bin/mandoc/mdoc/Fo/noarg.out_lint | 5 +---- regress/usr.bin/mandoc/mdoc/Fo/nohead.in | 13 +++++++++++++ regress/usr.bin/mandoc/mdoc/Fo/nohead.out_ascii | 9 +++++++++ regress/usr.bin/mandoc/mdoc/Fo/nohead.out_lint | 1 + 10 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 regress/usr.bin/mandoc/mdoc/Fd/empty.in create mode 100644 regress/usr.bin/mandoc/mdoc/Fd/empty.out_ascii create mode 100644 regress/usr.bin/mandoc/mdoc/Fd/empty.out_lint create mode 100644 regress/usr.bin/mandoc/mdoc/Fo/nohead.in create mode 100644 regress/usr.bin/mandoc/mdoc/Fo/nohead.out_ascii create mode 100644 regress/usr.bin/mandoc/mdoc/Fo/nohead.out_lint (limited to 'regress') diff --git a/regress/usr.bin/mandoc/mdoc/Fd/Makefile b/regress/usr.bin/mandoc/mdoc/Fd/Makefile index 18ce23ac96d..7cd78c65b86 100644 --- a/regress/usr.bin/mandoc/mdoc/Fd/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Fd/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.2 2012/11/18 00:05:28 schwarze Exp $ +# $OpenBSD: Makefile,v 1.3 2015/02/06 03:31:11 schwarze Exp $ -REGRESS_TARGETS = break font eos - -SKIP_TMAN = eos +REGRESS_TARGETS = break empty eos font +LINT_TARGETS = empty +SKIP_TMAN = eos .include diff --git a/regress/usr.bin/mandoc/mdoc/Fd/empty.in b/regress/usr.bin/mandoc/mdoc/Fd/empty.in new file mode 100644 index 00000000000..5951316dd29 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fd/empty.in @@ -0,0 +1,14 @@ +.Dd February 5, 2015 +.Dt FD-EMPTY 1 +.Os OpenBSD +.Sh NAME +.Nm Fd-empty +.Nd empty preprocessor directive macros +.Sh SYNOPSIS +.In sys/types.h +.Fd +.In stdlib.h +.Sh DESCRIPTION +leading text +.Fd +trailing text diff --git a/regress/usr.bin/mandoc/mdoc/Fd/empty.out_ascii b/regress/usr.bin/mandoc/mdoc/Fd/empty.out_ascii new file mode 100644 index 00000000000..d525b4822eb --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fd/empty.out_ascii @@ -0,0 +1,13 @@ +FD-EMPTY(1) General Commands Manual FD-EMPTY(1) + +NNAAMMEE + FFdd--eemmppttyy - empty preprocessor directive macros + +SSYYNNOOPPSSIISS + ##iinncclluuddee <> + ##iinncclluuddee <> + +DDEESSCCRRIIPPTTIIOONN + leading text trailing text + +OpenBSD February 5, 2015 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Fd/empty.out_lint b/regress/usr.bin/mandoc/mdoc/Fd/empty.out_lint new file mode 100644 index 00000000000..15f762702f1 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fd/empty.out_lint @@ -0,0 +1,2 @@ +mandoc: empty.in:9:2: WARNING: skipping empty macro: Fd +mandoc: empty.in:13:2: WARNING: skipping empty macro: Fd diff --git a/regress/usr.bin/mandoc/mdoc/Fo/Makefile b/regress/usr.bin/mandoc/mdoc/Fo/Makefile index 6a3c6bb5fa9..ec044d6faea 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Fo/Makefile @@ -1,11 +1,14 @@ -# $OpenBSD: Makefile,v 1.11 2014/11/20 00:30:34 schwarze Exp $ +# $OpenBSD: Makefile,v 1.12 2015/02/06 03:31:11 schwarze Exp $ -REGRESS_TARGETS = basic break eos font noarg obsolete punct section warn -LINT_TARGETS = noarg obsolete warn +REGRESS_TARGETS = basic break eos font noarg nohead +REGRESS_TARGETS += obsolete punct section warn +LINT_TARGETS = noarg nohead obsolete warn -# groff does not handle .nr nS +# groff-1.22.3 defects: +# - .Fo without an argument prints unbalanced parentheses +# - .nr nS is ignored -SKIP_GROFF ?= section +SKIP_GROFF = noarg section SKIP_TMAN = eos diff --git a/regress/usr.bin/mandoc/mdoc/Fo/noarg.in b/regress/usr.bin/mandoc/mdoc/Fo/noarg.in index fca1cd4a9d3..24eab0045bf 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/noarg.in +++ b/regress/usr.bin/mandoc/mdoc/Fo/noarg.in @@ -9,7 +9,7 @@ with arguments: .Ft int .Fn abs "int i" .Ft long -.Fo labs +.Fo labs bogus .Fa "long i" .Fc void function arguments: diff --git a/regress/usr.bin/mandoc/mdoc/Fo/noarg.out_lint b/regress/usr.bin/mandoc/mdoc/Fo/noarg.out_lint index 6c15847c0bd..e1947009774 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/noarg.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Fo/noarg.out_lint @@ -1,13 +1,10 @@ -mandoc: noarg.in:19:2: WARNING: argument count wrong: want more than 0 children (have 0) +mandoc: noarg.in:12:10: ERROR: skipping excess arguments: Fo ... bogus mandoc: noarg.in:23:2: WARNING: skipping empty macro: Fa -mandoc: noarg.in:22:2: WARNING: argument count wrong: want more than 0 children (have 0) mandoc: noarg.in:27:2: WARNING: skipping empty macro: Fn mandoc: noarg.in:29:2: WARNING: skipping empty macro: Ft mandoc: noarg.in:32:2: WARNING: skipping empty macro: Ft mandoc: noarg.in:34:2: WARNING: skipping empty macro: Ft -mandoc: noarg.in:35:2: WARNING: argument count wrong: want more than 0 children (have 0) mandoc: noarg.in:37:2: WARNING: skipping empty macro: Ft mandoc: noarg.in:39:2: WARNING: skipping empty macro: Fa -mandoc: noarg.in:38:2: WARNING: argument count wrong: want more than 0 children (have 0) mandoc: noarg.in:42:2: WARNING: skipping empty macro: Ft mandoc: noarg.in:43:2: WARNING: skipping empty macro: Fn diff --git a/regress/usr.bin/mandoc/mdoc/Fo/nohead.in b/regress/usr.bin/mandoc/mdoc/Fo/nohead.in new file mode 100644 index 00000000000..c41b5e6e049 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fo/nohead.in @@ -0,0 +1,13 @@ +.Dd February 5, 2015 +.Dt FO-NOHEAD 1 +.Os OpenBSD +.Sh NAME +.Nm Fo-nohead +.Nd function block macro without head argument +.Sh DESCRIPTION +initial text +.Ft int +.Fo +.Fa int +.Fc +final text diff --git a/regress/usr.bin/mandoc/mdoc/Fo/nohead.out_ascii b/regress/usr.bin/mandoc/mdoc/Fo/nohead.out_ascii new file mode 100644 index 00000000000..c1ad57d7094 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fo/nohead.out_ascii @@ -0,0 +1,9 @@ +FO-NOHEAD(1) General Commands Manual FO-NOHEAD(1) + +NNAAMMEE + FFoo--nnoohheeaadd - function block macro without head argument + +DDEESSCCRRIIPPTTIIOONN + initial text _i_n_t(_i_n_t) final text + +OpenBSD February 5, 2015 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Fo/nohead.out_lint b/regress/usr.bin/mandoc/mdoc/Fo/nohead.out_lint new file mode 100644 index 00000000000..aa0d5242483 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fo/nohead.out_lint @@ -0,0 +1 @@ +mandoc: nohead.in:10:2: WARNING: missing function name, using "": Fo -- cgit v1.2.3