aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress
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
commit66e8f935f05d1018898cee9e0c4ad713fc6b8673 (patch)
tree0e589a7384a81e59e9bb291c205fd9582ad8fd84 /regress
parent8e1caa4a243aa8682d2c7d4fb644be63c055bb5d (diff)
downloadmandoc-66e8f935f05d1018898cee9e0c4ad713fc6b8673.tar.gz
mandoc-66e8f935f05d1018898cee9e0c4ad713fc6b8673.tar.zst
mandoc-66e8f935f05d1018898cee9e0c4ad713fc6b8673.zip
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')
-rw-r--r--regress/man/TH/baddate.out_lint2
-rw-r--r--regress/man/TH/emptydate.out_lint2
-rw-r--r--regress/man/TH/longdate.out_lint2
-rw-r--r--regress/man/TH/noTH.out_lint2
-rw-r--r--regress/man/TH/noarg.out_lint2
-rw-r--r--regress/man/TH/onearg.out_lint2
-rw-r--r--regress/man/TH/twoargs.out_lint2
-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.in4
-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
20 files changed, 43 insertions, 31 deletions
diff --git a/regress/man/TH/baddate.out_lint b/regress/man/TH/baddate.out_lint
index 6785463d..eed40c28 100644
--- a/regress/man/TH/baddate.out_lint
+++ b/regress/man/TH/baddate.out_lint
@@ -1 +1 @@
-mandoc: baddate.in:2:18: WARNING: cannot parse date, using it verbatim: three bad words
+mandoc: baddate.in:2:18: WARNING: cannot parse date, using it verbatim: TH three bad words
diff --git a/regress/man/TH/emptydate.out_lint b/regress/man/TH/emptydate.out_lint
index dba0e545..15f4f171 100644
--- a/regress/man/TH/emptydate.out_lint
+++ b/regress/man/TH/emptydate.out_lint
@@ -1 +1 @@
-mandoc: emptydate.in:2:20: WARNING: missing date, using today's date: TH
+mandoc: emptydate.in:2:20: WARNING: missing date, using "": TH
diff --git a/regress/man/TH/longdate.out_lint b/regress/man/TH/longdate.out_lint
index 3006dad3..45d0ef0b 100644
--- a/regress/man/TH/longdate.out_lint
+++ b/regress/man/TH/longdate.out_lint
@@ -1 +1 @@
-mandoc: longdate.in:2:19: WARNING: cannot parse date, using it verbatim: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012
+mandoc: longdate.in:2:19: WARNING: cannot parse date, using it verbatim: TH 1234567890123456789012345678901234567890123456789012345678901234567890123456789012
diff --git a/regress/man/TH/noTH.out_lint b/regress/man/TH/noTH.out_lint
index 01b7b045..407308cb 100644
--- a/regress/man/TH/noTH.out_lint
+++ b/regress/man/TH/noTH.out_lint
@@ -1,2 +1,2 @@
mandoc: noTH.in: WARNING: missing manual title, using ""
-mandoc: noTH.in: WARNING: missing date, using today's date
+mandoc: noTH.in: WARNING: missing date, using ""
diff --git a/regress/man/TH/noarg.out_lint b/regress/man/TH/noarg.out_lint
index f4273215..fb994099 100644
--- a/regress/man/TH/noarg.out_lint
+++ b/regress/man/TH/noarg.out_lint
@@ -1,3 +1,3 @@
mandoc: noarg.in:2:2: WARNING: missing manual title, using "": TH
mandoc: noarg.in:2:2: WARNING: missing manual section, using "": TH
-mandoc: noarg.in:2:2: WARNING: missing date, using today's date: TH
+mandoc: noarg.in:2:2: WARNING: missing date, using "": TH
diff --git a/regress/man/TH/onearg.out_lint b/regress/man/TH/onearg.out_lint
index 65062684..e86ec4e2 100644
--- a/regress/man/TH/onearg.out_lint
+++ b/regress/man/TH/onearg.out_lint
@@ -1,2 +1,2 @@
mandoc: onearg.in:2:2: WARNING: missing manual section, using "": TH TH-ONEARG
-mandoc: onearg.in:2:2: WARNING: missing date, using today's date: TH
+mandoc: onearg.in:2:2: WARNING: missing date, using "": TH
diff --git a/regress/man/TH/twoargs.out_lint b/regress/man/TH/twoargs.out_lint
index 3cd469f5..0211ddfa 100644
--- a/regress/man/TH/twoargs.out_lint
+++ b/regress/man/TH/twoargs.out_lint
@@ -1,2 +1,2 @@
mandoc: twoargs.in:2:2: WARNING: missing manual section, using "": TH TH-TWOARGS
-mandoc: twoargs.in:2:2: WARNING: missing date, using today's date: TH
+mandoc: twoargs.in:2:2: WARNING: missing date, using "": TH
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 495a1132..ae0884b4 100644
--- a/regress/mdoc/Os/dupe.in
+++ b/regress/mdoc/Os/dupe.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: dupe.in,v 1.2 2017/07/04 14:53:26 schwarze Exp $
-.Dd $Mdocdate: July 4 2017 $
+.\" $OpenBSD: dupe.in,v 1.3 2020/01/19 16:36:47 schwarze Exp $
+.Dd $Mdocdate: January 19 2020 $
.Os NetBSD
.Dt OS-DUPE 1
.Os FreeBSD
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..5cdd9ee5 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: 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)
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