diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2020-01-19 16:16:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2020-01-19 16:16:34 +0000 |
commit | 9e6818d894d08819fc71166b7eba6abe1beea1f4 (patch) | |
tree | bef5db8a26e735618ae4932acbbec076e78be07c /regress/usr.bin/mandoc/mdoc | |
parent | 39f1a5e4108a9531d4d76a42073c1de35909412b (diff) |
Align to the new, sane behaviour of the groff_mdoc(7) .Dd macro:
without an argument, use the empty string, and always concatenate
all arguments, no matter their number.
This allows reducing the number of arguments of mandoc_normdate()
and some other simplifications, at the same time polishing some
error messages by adding the name of the macro in question.
Diffstat (limited to 'regress/usr.bin/mandoc/mdoc')
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/Makefile | 16 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/badarg.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/dupe.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/long.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/manarg.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/noarg.out_ascii | 9 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/noarg.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/noarg.out_markdown | 11 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Dd/order.out_lint | 2 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Os/dupe.out_lint | 4 |
10 files changed, 32 insertions, 20 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Dd/Makefile b/regress/usr.bin/mandoc/mdoc/Dd/Makefile index e31b2730bc8..9c48fd4ecfa 100644 --- a/regress/usr.bin/mandoc/mdoc/Dd/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Dd/Makefile @@ -1,20 +1,12 @@ -# $OpenBSD: Makefile,v 1.5 2020/01/08 10:17:15 schwarze Exp $ +# $OpenBSD: Makefile,v 1.6 2020/01/19 16:16:33 schwarze Exp $ REGRESS_TARGETS = badarg dupe late long manarg noarg order LINT_TARGETS = badarg dupe late long manarg noarg order -# noarg output contains the date when the file is formatted +# groff-1.22.4 prints footer fields of excessive length on top of +# each other rather than breaking the output line. -SKIP_ASCII ?= noarg -SKIP_MARKDOWN ?= noarg - -# If groff finds exactly three arguments, it assumes they are month, -# day and year without further checking. If there are no arguments, -# groff uses the string "Epoch". Otherwise, it silently falls back -# to today's date. -# That is not at all sane behaviour, we are not going to imitate it. - -SKIP_GROFF = badarg long manarg noarg +SKIP_GROFF = long # Autodetection fails for late .Dd, so specify -mdoc explicitly. diff --git a/regress/usr.bin/mandoc/mdoc/Dd/badarg.out_lint b/regress/usr.bin/mandoc/mdoc/Dd/badarg.out_lint index f463d7758b3..70b82a40f26 100644 --- a/regress/usr.bin/mandoc/mdoc/Dd/badarg.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Dd/badarg.out_lint @@ -1,2 +1,2 @@ -mandoc: badarg.in:2:2: WARNING: cannot parse date, using it verbatim: bad date +mandoc: badarg.in:2:5: WARNING: cannot parse date, using it verbatim: Dd bad date mandoc: badarg.in:2:5: STYLE: Mdocdate missing: Dd bad date (OpenBSD) diff --git a/regress/usr.bin/mandoc/mdoc/Dd/dupe.out_lint b/regress/usr.bin/mandoc/mdoc/Dd/dupe.out_lint index 72ccde415ea..8cb4ba96ccf 100644 --- a/regress/usr.bin/mandoc/mdoc/Dd/dupe.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Dd/dupe.out_lint @@ -1,3 +1,3 @@ -mandoc: dupe.in:2:5: STYLE: Mdocdate missing: Dd August (OpenBSD) +mandoc: dupe.in:2:5: STYLE: Mdocdate missing: Dd August 1, 2014 (OpenBSD) mandoc: dupe.in:5:2: ERROR: duplicate prologue macro: Dd mandoc: dupe.in:11:2: ERROR: duplicate prologue macro: Dd diff --git a/regress/usr.bin/mandoc/mdoc/Dd/long.out_lint b/regress/usr.bin/mandoc/mdoc/Dd/long.out_lint index a189560da64..11597144c55 100644 --- a/regress/usr.bin/mandoc/mdoc/Dd/long.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Dd/long.out_lint @@ -1,2 +1,2 @@ -mandoc: long.in:2:2: WARNING: cannot parse date, using it verbatim: 1234567890123456789012345678901234567890123456789012345678901234567890123456789 +mandoc: long.in:2:5: WARNING: cannot parse date, using it verbatim: Dd 1234567890123456789012345678901234567890123456789012345678901234567890123456789 mandoc: long.in:2:5: STYLE: Mdocdate missing: Dd 1234567890123456789012345678901234567890123456789012345678901234567890123456789 (OpenBSD) diff --git a/regress/usr.bin/mandoc/mdoc/Dd/manarg.out_lint b/regress/usr.bin/mandoc/mdoc/Dd/manarg.out_lint index a8f48f44a42..9fe5e21efe6 100644 --- a/regress/usr.bin/mandoc/mdoc/Dd/manarg.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Dd/manarg.out_lint @@ -1,2 +1,2 @@ -mandoc: manarg.in:2:2: STYLE: legacy man(7) date format: Dd 2014-08-07 +mandoc: manarg.in:2:5: STYLE: legacy man(7) date format: Dd 2014-08-07 mandoc: manarg.in:2:5: STYLE: Mdocdate missing: Dd 2014-08-07 (OpenBSD) diff --git a/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_ascii b/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_ascii new file mode 100644 index 00000000000..e9206d098cf --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_ascii @@ -0,0 +1,9 @@ +DD-NOARG(1) General Commands Manual DD-NOARG(1) + +NNAAMMEE + DDdd--nnooaarrgg - date macro without an argument + +DDEESSCCRRIIPPTTIIOONN + some text + +OpenBSD OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_lint b/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_lint index e6ccd352c12..7202e12d5a7 100644 --- a/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_lint @@ -1 +1 @@ -mandoc: noarg.in:2:2: WARNING: missing date, using today's date +mandoc: noarg.in:2:2: WARNING: missing date, using "": Dd diff --git a/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_markdown b/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_markdown new file mode 100644 index 00000000000..b5af6385ea8 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Dd/noarg.out_markdown @@ -0,0 +1,11 @@ +DD-NOARG(1) - General Commands Manual + +# NAME + +**Dd-noarg** - date macro without an argument + +# DESCRIPTION + +some text + +OpenBSD - diff --git a/regress/usr.bin/mandoc/mdoc/Dd/order.out_lint b/regress/usr.bin/mandoc/mdoc/Dd/order.out_lint index 4eb9d3bdf32..6cecfa13e49 100644 --- a/regress/usr.bin/mandoc/mdoc/Dd/order.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Dd/order.out_lint @@ -1,2 +1,2 @@ mandoc: order.in:3:2: WARNING: prologue macros out of order: Dd after Dt -mandoc: order.in:3:5: STYLE: Mdocdate missing: Dd August (OpenBSD) +mandoc: order.in:3:5: STYLE: Mdocdate missing: Dd August 5, 2014 (OpenBSD) diff --git a/regress/usr.bin/mandoc/mdoc/Os/dupe.out_lint b/regress/usr.bin/mandoc/mdoc/Os/dupe.out_lint index 63b9dfd2fc6..5cdd9ee5e51 100644 --- a/regress/usr.bin/mandoc/mdoc/Os/dupe.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Os/dupe.out_lint @@ -1,9 +1,9 @@ mandoc: dupe.in:3:5: STYLE: operating system explicitly specified: Os NetBSD (NetBSD) -mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate: (NetBSD) +mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate: January 19 2020 $ (NetBSD) mandoc: dupe.in:4:2: WARNING: prologue macros out of order: Dt after Os mandoc: dupe.in:5:2: ERROR: duplicate prologue macro: Os mandoc: dupe.in:5:5: STYLE: operating system explicitly specified: Os FreeBSD (NetBSD) -mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate: (NetBSD) +mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate: January 19 2020 $ (NetBSD) mandoc: dupe.in:11:2: ERROR: duplicate prologue macro: Os mandoc: dupe.in:11:5: STYLE: operating system explicitly specified: Os OpenBSD (NetBSD) mandoc: dupe.in: STYLE: RCS id missing: (NetBSD) |