aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/mdoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-04-28 16:25:11 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-04-28 16:25:11 +0000
commit882c99984a5b562bef7d6cb4685a04fba62a7852 (patch)
tree806d72afda8a901a2508650bc8709273fc406040 /regress/mdoc
parentd51f0eb00a1f1de1dcc22dfa0a16ffbd2d0a623a (diff)
downloadmandoc-882c99984a5b562bef7d6cb4685a04fba62a7852.tar.gz
mandoc-882c99984a5b562bef7d6cb4685a04fba62a7852.tar.zst
mandoc-882c99984a5b562bef7d6cb4685a04fba62a7852.zip
Delete .Pp right before the first .Sh and right before any .Ss,
and warn about it; mdoclint(1) does so, and it makes sense.
Diffstat (limited to 'regress/mdoc')
-rw-r--r--regress/mdoc/Sh/Makefile13
-rw-r--r--regress/mdoc/Sh/first.out_ascii6
-rw-r--r--regress/mdoc/Sh/parbefore.in9
-rw-r--r--regress/mdoc/Sh/parbefore.out_ascii9
-rw-r--r--regress/mdoc/Sh/parbefore.out_lint1
-rw-r--r--regress/mdoc/Sh/parbefore.out_markdown11
-rw-r--r--regress/mdoc/Sh/parborder.in21
-rw-r--r--regress/mdoc/Sh/parborder.out_ascii18
-rw-r--r--regress/mdoc/Sh/parborder.out_lint7
-rw-r--r--regress/mdoc/Sh/parborder.out_markdown23
10 files changed, 114 insertions, 4 deletions
diff --git a/regress/mdoc/Sh/Makefile b/regress/mdoc/Sh/Makefile
index a1db1161..9610ec4c 100644
--- a/regress/mdoc/Sh/Makefile
+++ b/regress/mdoc/Sh/Makefile
@@ -1,11 +1,16 @@
# $OpenBSD: Makefile,v 1.7 2017/01/08 00:10:22 schwarze Exp $
REGRESS_TARGETS = badNAME before empty emptyNAME first nohead order
-REGRESS_TARGETS += orderNAME punctNAME subbefore
+REGRESS_TARGETS += orderNAME parbefore parborder punctNAME subbefore
LINT_TARGETS = badNAME before empty emptyNAME first nohead order
-LINT_TARGETS += orderNAME punctNAME subbefore
+LINT_TARGETS += orderNAME parbefore parborder punctNAME subbefore
-SKIP_GROFF = subbefore first empty
-SKIP_ASCII = first
+# groff-1.22.3 defects:
+# - .Pp before .Sh NAME causes a blank line before the header line
+# - .Ss before .Sh NAME puts the subsection header before the header line
+# - missing .Sh NAME causes loss of the header and footer lines
+# - .Sh DESCRIPTION Xo aborts the parser
+
+SKIP_GROFF = parbefore subbefore first empty
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sh/first.out_ascii b/regress/mdoc/Sh/first.out_ascii
new file mode 100644
index 00000000..7d2234eb
--- /dev/null
+++ b/regress/mdoc/Sh/first.out_ascii
@@ -0,0 +1,6 @@
+SH-FIRST(1) General Commands Manual SH-FIRST(1)
+
+DDEESSCCRRIIPPTTIIOONN
+ The first section is not a NAME section.
+
+OpenBSD July 1, 2014 OpenBSD
diff --git a/regress/mdoc/Sh/parbefore.in b/regress/mdoc/Sh/parbefore.in
new file mode 100644
index 00000000..880f3c41
--- /dev/null
+++ b/regress/mdoc/Sh/parbefore.in
@@ -0,0 +1,9 @@
+.Dd April 28, 2017
+.Dt SH-PARBEFORE 1
+.Os OpenBSD
+.Pp
+.Sh NAME
+.Nm Sh-parbefore
+.Nd paragraph macro before the first section header
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Sh/parbefore.out_ascii b/regress/mdoc/Sh/parbefore.out_ascii
new file mode 100644
index 00000000..e92ae81c
--- /dev/null
+++ b/regress/mdoc/Sh/parbefore.out_ascii
@@ -0,0 +1,9 @@
+SH-PARBEFORE(1) General Commands Manual SH-PARBEFORE(1)
+
+NNAAMMEE
+ SShh--ppaarrbbeeffoorree - paragraph macro before the first section header
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD April 28, 2017 OpenBSD
diff --git a/regress/mdoc/Sh/parbefore.out_lint b/regress/mdoc/Sh/parbefore.out_lint
new file mode 100644
index 00000000..fcb61942
--- /dev/null
+++ b/regress/mdoc/Sh/parbefore.out_lint
@@ -0,0 +1 @@
+mandoc: parbefore.in:4:2: WARNING: skipping paragraph macro: Pp before Sh
diff --git a/regress/mdoc/Sh/parbefore.out_markdown b/regress/mdoc/Sh/parbefore.out_markdown
new file mode 100644
index 00000000..50f77895
--- /dev/null
+++ b/regress/mdoc/Sh/parbefore.out_markdown
@@ -0,0 +1,11 @@
+SH-PARBEFORE(1) - General Commands Manual
+
+# NAME
+
+**Sh-parbefore** - paragraph macro before the first section header
+
+# DESCRIPTION
+
+some text
+
+OpenBSD - April 28, 2017
diff --git a/regress/mdoc/Sh/parborder.in b/regress/mdoc/Sh/parborder.in
new file mode 100644
index 00000000..a909a0cf
--- /dev/null
+++ b/regress/mdoc/Sh/parborder.in
@@ -0,0 +1,21 @@
+.Dd April 28, 2017
+.Dt SH-PARBORDER 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sh-parborder
+.Nd paragraph macros at the beginning and end of sections
+.Sh DESCRIPTION
+.Pp
+descriptive text
+.Pp
+.Sh EXAMPLES
+.Pp
+example text
+.Pp
+.Ss Subsection
+.Pp
+subsection text
+.Pp
+.Ss Another subsection
+more subsection text
+.Pp
diff --git a/regress/mdoc/Sh/parborder.out_ascii b/regress/mdoc/Sh/parborder.out_ascii
new file mode 100644
index 00000000..9c8d04b2
--- /dev/null
+++ b/regress/mdoc/Sh/parborder.out_ascii
@@ -0,0 +1,18 @@
+SH-PARBORDER(1) General Commands Manual SH-PARBORDER(1)
+
+NNAAMMEE
+ SShh--ppaarrbboorrddeerr - paragraph macros at the beginning and end of sections
+
+DDEESSCCRRIIPPTTIIOONN
+ descriptive text
+
+EEXXAAMMPPLLEESS
+ example text
+
+ SSuubbsseeccttiioonn
+ subsection text
+
+ AAnnootthheerr ssuubbsseeccttiioonn
+ more subsection text
+
+OpenBSD April 28, 2017 OpenBSD
diff --git a/regress/mdoc/Sh/parborder.out_lint b/regress/mdoc/Sh/parborder.out_lint
new file mode 100644
index 00000000..cd6c5c23
--- /dev/null
+++ b/regress/mdoc/Sh/parborder.out_lint
@@ -0,0 +1,7 @@
+mandoc: parborder.in:8:2: WARNING: skipping paragraph macro: Pp after Sh
+mandoc: parborder.in:10:2: WARNING: skipping paragraph macro: Pp at the end of Sh
+mandoc: parborder.in:12:2: WARNING: skipping paragraph macro: Pp after Sh
+mandoc: parborder.in:16:2: WARNING: skipping paragraph macro: Pp after Ss
+mandoc: parborder.in:18:2: WARNING: skipping paragraph macro: Pp at the end of Ss
+mandoc: parborder.in:14:2: WARNING: skipping paragraph macro: Pp before Ss
+mandoc: parborder.in:21:2: WARNING: skipping paragraph macro: Pp at the end of Ss
diff --git a/regress/mdoc/Sh/parborder.out_markdown b/regress/mdoc/Sh/parborder.out_markdown
new file mode 100644
index 00000000..8595760b
--- /dev/null
+++ b/regress/mdoc/Sh/parborder.out_markdown
@@ -0,0 +1,23 @@
+SH-PARBORDER(1) - General Commands Manual
+
+# NAME
+
+**Sh-parborder** - paragraph macros at the beginning and end of sections
+
+# DESCRIPTION
+
+descriptive text
+
+# EXAMPLES
+
+example text
+
+## Subsection
+
+subsection text
+
+## Another subsection
+
+more subsection text
+
+OpenBSD - April 28, 2017