summaryrefslogtreecommitdiffstats
path: root/regress/mdoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-01-19 16:44:50 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-01-19 16:44:50 +0000
commit997afdc8d9bfb322c69f12820e5299a5cbca4fba (patch)
tree458f1731d8143930bf5485c03d1d76303963ca81 /regress/mdoc
parente7053cbde7464907196871161ebc3a69546a11ab (diff)
downloadmandoc-997afdc8d9bfb322c69f12820e5299a5cbca4fba.tar.gz
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/mdoc')
-rw-r--r--regress/mdoc/Dd/Makefile16
-rw-r--r--regress/mdoc/Dd/badarg.out_lint2
-rw-r--r--regress/mdoc/Dd/dupe.out_lint2
-rw-r--r--regress/mdoc/Dd/long.out_lint2
-rw-r--r--regress/mdoc/Dd/manarg.out_lint2
-rw-r--r--regress/mdoc/Dd/noarg.out_ascii9
-rw-r--r--regress/mdoc/Dd/noarg.out_lint2
-rw-r--r--regress/mdoc/Dd/noarg.out_markdown11
-rw-r--r--regress/mdoc/Dd/order.out_lint2
-rw-r--r--regress/mdoc/Os/dupe.in2
-rw-r--r--regress/mdoc/Os/dupe.out_ascii2
-rw-r--r--regress/mdoc/Os/dupe.out_lint4
-rw-r--r--regress/mdoc/Os/dupe.out_markdown2
13 files changed, 35 insertions, 23 deletions
diff --git a/regress/mdoc/Dd/Makefile b/regress/mdoc/Dd/Makefile
index e31b2730..9c48fd4e 100644
--- a/regress/mdoc/Dd/Makefile
+++ b/regress/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/mdoc/Dd/badarg.out_lint b/regress/mdoc/Dd/badarg.out_lint
index f463d775..70b82a40 100644
--- a/regress/mdoc/Dd/badarg.out_lint
+++ b/regress/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/mdoc/Dd/dupe.out_lint b/regress/mdoc/Dd/dupe.out_lint
index 72ccde41..8cb4ba96 100644
--- a/regress/mdoc/Dd/dupe.out_lint
+++ b/regress/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/mdoc/Dd/long.out_lint b/regress/mdoc/Dd/long.out_lint
index a189560d..11597144 100644
--- a/regress/mdoc/Dd/long.out_lint
+++ b/regress/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/mdoc/Dd/manarg.out_lint b/regress/mdoc/Dd/manarg.out_lint
index a8f48f44..9fe5e21e 100644
--- a/regress/mdoc/Dd/manarg.out_lint
+++ b/regress/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/mdoc/Dd/noarg.out_ascii b/regress/mdoc/Dd/noarg.out_ascii
new file mode 100644
index 00000000..e9206d09
--- /dev/null
+++ b/regress/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/mdoc/Dd/noarg.out_lint b/regress/mdoc/Dd/noarg.out_lint
index e6ccd352..7202e12d 100644
--- a/regress/mdoc/Dd/noarg.out_lint
+++ b/regress/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/mdoc/Dd/noarg.out_markdown b/regress/mdoc/Dd/noarg.out_markdown
new file mode 100644
index 00000000..b5af6385
--- /dev/null
+++ b/regress/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/mdoc/Dd/order.out_lint b/regress/mdoc/Dd/order.out_lint
index 4eb9d3bd..6cecfa13 100644
--- a/regress/mdoc/Dd/order.out_lint
+++ b/regress/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/mdoc/Os/dupe.in b/regress/mdoc/Os/dupe.in
index df38d04e..6608d63f 100644
--- a/regress/mdoc/Os/dupe.in
+++ b/regress/mdoc/Os/dupe.in
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dupe.in,v 1.2 2017/07/04 14:53:26 schwarze Exp $
+.\" $OpenBSD: dupe.in,v 1.3 2020/01/19 16:36:47 schwarze Exp $
.Dd $Mdocdate$
.Os NetBSD
.Dt OS-DUPE 1
diff --git a/regress/mdoc/Os/dupe.out_ascii b/regress/mdoc/Os/dupe.out_ascii
index c120c4e1..c3dc72fa 100644
--- a/regress/mdoc/Os/dupe.out_ascii
+++ b/regress/mdoc/Os/dupe.out_ascii
@@ -6,4 +6,4 @@ NNAAMMEE
DDEESSCCRRIIPPTTIIOONN
initial text final text
-OpenBSD July 4, 2017 OpenBSD
+OpenBSD January 19, 2020 OpenBSD
diff --git a/regress/mdoc/Os/dupe.out_lint b/regress/mdoc/Os/dupe.out_lint
index 63b9dfd2..13ec7fe5 100644
--- a/regress/mdoc/Os/dupe.out_lint
+++ b/regress/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$ (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$ (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)
diff --git a/regress/mdoc/Os/dupe.out_markdown b/regress/mdoc/Os/dupe.out_markdown
index 8186cb3d..b5930051 100644
--- a/regress/mdoc/Os/dupe.out_markdown
+++ b/regress/mdoc/Os/dupe.out_markdown
@@ -9,4 +9,4 @@ OS-DUPE(1) - General Commands Manual
initial text
final text
-OpenBSD - July 4, 2017
+OpenBSD - January 19, 2020