aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/mdoc/Op
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
commitd9f0f81c846a8405c29870e4a8379e5e79d1cad3 (patch)
treec07efd74ac58650949dc67576001a720e688319f /regress/mdoc/Op
parentcdbb1fca07752eb230e5219c22e9e65075c85b82 (diff)
downloadmandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.tar.gz
mandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.tar.zst
mandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.zip
Finally port the OpenBSD regression suite.
Both kristaps@ and wiz@ repeated asked for this, literally for years.
Diffstat (limited to 'regress/mdoc/Op')
-rw-r--r--regress/mdoc/Op/Makefile9
-rw-r--r--regress/mdoc/Op/break.in29
-rw-r--r--regress/mdoc/Op/break.out_lint3
-rw-r--r--regress/mdoc/Op/broken.in24
-rw-r--r--regress/mdoc/Op/broken.out_ascii11
-rw-r--r--regress/mdoc/Op/broken.out_lint2
-rw-r--r--regress/mdoc/Op/punct.in31
-rw-r--r--regress/mdoc/Op/punct.out_ascii17
8 files changed, 126 insertions, 0 deletions
diff --git a/regress/mdoc/Op/Makefile b/regress/mdoc/Op/Makefile
new file mode 100644
index 00000000..ab934a4e
--- /dev/null
+++ b/regress/mdoc/Op/Makefile
@@ -0,0 +1,9 @@
+# $OpenBSD: Makefile,v 1.3 2014/07/02 11:42:56 schwarze Exp $
+
+REGRESS_TARGETS = break broken punct
+LINT_TARGETS = break broken
+
+SKIP_GROFF = break
+SKIP_ASCII = break
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Op/break.in b/regress/mdoc/Op/break.in
new file mode 100644
index 00000000..5ca7ffe2
--- /dev/null
+++ b/regress/mdoc/Op/break.in
@@ -0,0 +1,29 @@
+.Dd July 2, 2014
+.Dt OP-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Op-break
+.Nd partial explicit block broken by partial implicit block
+.Sh DESCRIPTION
+before both
+.Op inside first Do inside both
+inside second
+.Dc
+after both
+.Pp
+0
+.Op 1 Op 12 Do 123
+3
+.Dc
+0
+.\" The following does not work yet:
+.ig
+.Pp
+0
+.Op 1 Op 12 Do 123 Do 1234
+34
+.Dc
+4
+.Dc
+0
+..
diff --git a/regress/mdoc/Op/break.out_lint b/regress/mdoc/Op/break.out_lint
new file mode 100644
index 00000000..49c0fd12
--- /dev/null
+++ b/regress/mdoc/Op/break.out_lint
@@ -0,0 +1,3 @@
+mandoc: break.in:9:2: WARNING: blocks badly nested: Op breaks Do
+mandoc: break.in:15:7: WARNING: blocks badly nested: Op breaks Do
+mandoc: break.in:15:2: WARNING: blocks badly nested: Op breaks Do
diff --git a/regress/mdoc/Op/broken.in b/regress/mdoc/Op/broken.in
new file mode 100644
index 00000000..43574317
--- /dev/null
+++ b/regress/mdoc/Op/broken.in
@@ -0,0 +1,24 @@
+.Dd July 2, 2014
+.Dt OP-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Op-broken
+.Nd partial implicit block broken by partial explicit block
+.Sh DESCRIPTION
+before both
+.Do inside first
+.Op inside both Dc inside second
+after both
+.Pp
+0
+.Do 1
+.Op 12 Op 123 Dc 23
+0
+.\" The following does not work yet, see mdoc_macro.c rev. 1.47.
+.ig
+.Pp
+0
+.Do 1 Do 12
+.Op 123 Op 1234 Dc 134 Dc 34
+0
+..
diff --git a/regress/mdoc/Op/broken.out_ascii b/regress/mdoc/Op/broken.out_ascii
new file mode 100644
index 00000000..f9641277
--- /dev/null
+++ b/regress/mdoc/Op/broken.out_ascii
@@ -0,0 +1,11 @@
+OP-BROKEN(1) General Commands Manual OP-BROKEN(1)
+
+NNAAMMEE
+ OOpp--bbrrookkeenn - partial implicit block broken by partial explicit block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both ``inside first [inside both'' inside second] after both
+
+ 0 ``1 [12 [123'' 23]] 0
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Op/broken.out_lint b/regress/mdoc/Op/broken.out_lint
new file mode 100644
index 00000000..f82e1bda
--- /dev/null
+++ b/regress/mdoc/Op/broken.out_lint
@@ -0,0 +1,2 @@
+mandoc: broken.in:10:17: WARNING: blocks badly nested: Do breaks Op
+mandoc: broken.in:15:15: WARNING: blocks badly nested: Do breaks Op
diff --git a/regress/mdoc/Op/punct.in b/regress/mdoc/Op/punct.in
new file mode 100644
index 00000000..02a25c9c
--- /dev/null
+++ b/regress/mdoc/Op/punct.in
@@ -0,0 +1,31 @@
+.Dd June 24, 2011
+.Dt OP-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Op-punct
+.Nd punctuation handling by the Op macro
+.Sh DESCRIPTION
+at the beginning:
+.Op ( z
+.Op | z
+.Op . z
+.Pp
+in the middle:
+.Op a ( z
+.Op a | z
+.Op a . z
+.Pp
+at the end:
+.Op a (
+.Op a |
+.Op a .
+.Pp
+punctuation only:
+.Op (
+.Op |
+.Op .
+.Pp
+more than one:
+.Op ( (
+.Op | |
+.Op . .
diff --git a/regress/mdoc/Op/punct.out_ascii b/regress/mdoc/Op/punct.out_ascii
new file mode 100644
index 00000000..53251b52
--- /dev/null
+++ b/regress/mdoc/Op/punct.out_ascii
@@ -0,0 +1,17 @@
+OP-PUNCT(1) General Commands Manual OP-PUNCT(1)
+
+NNAAMMEE
+ OOpp--ppuunncctt - punctuation handling by the Op macro
+
+DDEESSCCRRIIPPTTIIOONN
+ at the beginning: ([z] [| z] [. z]
+
+ in the middle: [a (z] [a | z] [a. z]
+
+ at the end: [a (] [a |] [a].
+
+ punctuation only: ([] [|] [].
+
+ more than one: (([] [| |] []..
+
+OpenBSD June 24, 2011 OpenBSD