summaryrefslogtreecommitdiffstats
path: root/regress/mdoc/Nd
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-08 03:02:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-08 03:02:13 +0000
commit4c0770c1ecd159a77561d8e0364385f4bb758650 (patch)
tree5c2d5820b093c1c08b6047ff110e9b055083a5ea /regress/mdoc/Nd
parentd16e7f2cf346476e177ce672851b0b957aebbe5d (diff)
downloadmandoc-4c0770c1ecd159a77561d8e0364385f4bb758650.tar.gz
Finally port the OpenBSD regression suite.
Both kristaps@ and wiz@ repeated asked for this, literally for years.
Diffstat (limited to 'regress/mdoc/Nd')
-rw-r--r--regress/mdoc/Nd/Makefile6
-rw-r--r--regress/mdoc/Nd/broken.in22
-rw-r--r--regress/mdoc/Nd/broken.out_ascii17
-rw-r--r--regress/mdoc/Nd/broken.out_lint6
-rw-r--r--regress/mdoc/Nd/hyph.in11
-rw-r--r--regress/mdoc/Nd/hyph.out_ascii10
-rw-r--r--regress/mdoc/Nd/noarg.in8
-rw-r--r--regress/mdoc/Nd/noarg.out_ascii9
-rw-r--r--regress/mdoc/Nd/noarg.out_lint1
-rw-r--r--regress/mdoc/Nd/par.in15
-rw-r--r--regress/mdoc/Nd/par.out_ascii13
11 files changed, 118 insertions, 0 deletions
diff --git a/regress/mdoc/Nd/Makefile b/regress/mdoc/Nd/Makefile
new file mode 100644
index 00000000..d67804c4
--- /dev/null
+++ b/regress/mdoc/Nd/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.5 2015/02/11 13:37:31 schwarze Exp $
+
+REGRESS_TARGETS = broken hyph noarg par
+LINT_TARGETS = broken noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Nd/broken.in b/regress/mdoc/Nd/broken.in
new file mode 100644
index 00000000..e61804ac
--- /dev/null
+++ b/regress/mdoc/Nd/broken.in
@@ -0,0 +1,22 @@
+.Dd February 11, 2015
+.Dt ND-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Oo
+.Nm Nd-broken
+.Nd description lines ended
+.Oc
+by explicit blocks
+.Sh DESCRIPTION
+Start nested lists:
+.Bl -tag -width Ds
+.Bl -tag -width Ds
+.It inner tag
+inner text
+.Nd inner description
+.El
+back to outer list
+.It outer tag
+outer text
+.El
+end of file
diff --git a/regress/mdoc/Nd/broken.out_ascii b/regress/mdoc/Nd/broken.out_ascii
new file mode 100644
index 00000000..5752f975
--- /dev/null
+++ b/regress/mdoc/Nd/broken.out_ascii
@@ -0,0 +1,17 @@
+ND-BROKEN(1) General Commands Manual ND-BROKEN(1)
+
+NNAAMMEE
+ [NNdd--bbrrookkeenn - description lines ended] by explicit blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ Start nested lists:
+
+ inner tag
+ inner text - inner description
+ back to outer list
+
+ outer tag
+ outer text
+ end of file
+
+OpenBSD February 11, 2015 OpenBSD
diff --git a/regress/mdoc/Nd/broken.out_lint b/regress/mdoc/Nd/broken.out_lint
new file mode 100644
index 00000000..2fc6732b
--- /dev/null
+++ b/regress/mdoc/Nd/broken.out_lint
@@ -0,0 +1,6 @@
+mandoc: broken.in:5:2: WARNING: bad NAME section content: Oo
+mandoc: broken.in:9:1: WARNING: bad NAME section content: text
+mandoc: broken.in:4:2: WARNING: NAME section without Nm before Nd
+mandoc: broken.in:4:2: WARNING: NAME section without description
+mandoc: broken.in:13:2: WARNING: moving content out of list: Bl
+mandoc: broken.in:18:1: WARNING: moving content out of list: text
diff --git a/regress/mdoc/Nd/hyph.in b/regress/mdoc/Nd/hyph.in
new file mode 100644
index 00000000..7922835d
--- /dev/null
+++ b/regress/mdoc/Nd/hyph.in
@@ -0,0 +1,11 @@
+.Dd October 5, 2013
+.Dt ND-HYPH 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nd-hyph
+.Nd when there is already a hyphen within the the word, \
+line-breaking is permitted at that place
+.Sh DESCRIPTION
+Even in the document description line in the
+.Sx NAME
+section.
diff --git a/regress/mdoc/Nd/hyph.out_ascii b/regress/mdoc/Nd/hyph.out_ascii
new file mode 100644
index 00000000..8388b664
--- /dev/null
+++ b/regress/mdoc/Nd/hyph.out_ascii
@@ -0,0 +1,10 @@
+ND-HYPH(1) General Commands Manual ND-HYPH(1)
+
+NNAAMMEE
+ NNdd--hhyypphh - when there is already a hyphen within the the word, line-
+ breaking is permitted at that place
+
+DDEESSCCRRIIPPTTIIOONN
+ Even in the document description line in the _N_A_M_E section.
+
+OpenBSD October 5, 2013 OpenBSD
diff --git a/regress/mdoc/Nd/noarg.in b/regress/mdoc/Nd/noarg.in
new file mode 100644
index 00000000..1c4b619a
--- /dev/null
+++ b/regress/mdoc/Nd/noarg.in
@@ -0,0 +1,8 @@
+.Dd January 2, 2011
+.Dt ND-ARG0 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nd-arg0
+.Nd
+.Sh DESCRIPTION
+empty description line
diff --git a/regress/mdoc/Nd/noarg.out_ascii b/regress/mdoc/Nd/noarg.out_ascii
new file mode 100644
index 00000000..fc78701f
--- /dev/null
+++ b/regress/mdoc/Nd/noarg.out_ascii
@@ -0,0 +1,9 @@
+ND-ARG0(1) General Commands Manual ND-ARG0(1)
+
+NNAAMMEE
+ NNdd--aarrgg00 -
+
+DDEESSCCRRIIPPTTIIOONN
+ empty description line
+
+OpenBSD January 2, 2011 OpenBSD
diff --git a/regress/mdoc/Nd/noarg.out_lint b/regress/mdoc/Nd/noarg.out_lint
new file mode 100644
index 00000000..04e1d91f
--- /dev/null
+++ b/regress/mdoc/Nd/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:6:2: WARNING: missing description line, using "": Nd
diff --git a/regress/mdoc/Nd/par.in b/regress/mdoc/Nd/par.in
new file mode 100644
index 00000000..b056f754
--- /dev/null
+++ b/regress/mdoc/Nd/par.in
@@ -0,0 +1,15 @@
+.Dd February 3, 2015
+.Dt ND-PAR 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nd-par
+.Nd paragraph macro
+after one-line description
+.Pp
+Usually, there shouldn't be additional text in the NAME section.
+.Sh DESCRIPTION
+The text belongs here.
+.Nd stray
+description macro
+.Pp
+Back to normal state.
diff --git a/regress/mdoc/Nd/par.out_ascii b/regress/mdoc/Nd/par.out_ascii
new file mode 100644
index 00000000..c87847b8
--- /dev/null
+++ b/regress/mdoc/Nd/par.out_ascii
@@ -0,0 +1,13 @@
+ND-PAR(1) General Commands Manual ND-PAR(1)
+
+NNAAMMEE
+ NNdd--ppaarr - paragraph macro after one-line description
+
+ Usually, there shouldn't be additional text in the NAME section.
+
+DDEESSCCRRIIPPTTIIOONN
+ The text belongs here. - stray description macro
+
+ Back to normal state.
+
+OpenBSD February 3, 2015 OpenBSD