summaryrefslogtreecommitdiffstats
path: root/regress/mdoc/Bk
diff options
context:
space:
mode:
Diffstat (limited to 'regress/mdoc/Bk')
-rw-r--r--regress/mdoc/Bk/Makefile8
-rw-r--r--regress/mdoc/Bk/badarg.in56
-rw-r--r--regress/mdoc/Bk/badarg.out_ascii25
-rw-r--r--regress/mdoc/Bk/badarg.out_lint6
-rw-r--r--regress/mdoc/Bk/break.in53
-rw-r--r--regress/mdoc/Bk/break.out_ascii30
-rw-r--r--regress/mdoc/Bk/broken.in11
-rw-r--r--regress/mdoc/Bk/broken.out_ascii12
-rw-r--r--regress/mdoc/Bk/broken.out_lint2
-rw-r--r--regress/mdoc/Bk/inputlines.in73
-rw-r--r--regress/mdoc/Bk/inputlines.out_ascii37
-rw-r--r--regress/mdoc/Bk/lines.in88
-rw-r--r--regress/mdoc/Bk/lines.out_ascii84
-rw-r--r--regress/mdoc/Bk/synopsis.in32
-rw-r--r--regress/mdoc/Bk/synopsis.out_ascii27
15 files changed, 544 insertions, 0 deletions
diff --git a/regress/mdoc/Bk/Makefile b/regress/mdoc/Bk/Makefile
new file mode 100644
index 00000000..cc3f2a7f
--- /dev/null
+++ b/regress/mdoc/Bk/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.7 2015/02/07 16:39:44 schwarze Exp $
+
+REGRESS_TARGETS = badarg break broken inputlines lines synopsis
+LINT_TARGETS = badarg broken
+
+SKIP_TMAN ?= badarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Bk/badarg.in b/regress/mdoc/Bk/badarg.in
new file mode 100644
index 00000000..c3338e70
--- /dev/null
+++ b/regress/mdoc/Bk/badarg.in
@@ -0,0 +1,56 @@
+.Dd June 30, 2010
+.Dt BK-BADARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-badarg
+.Nd bad arguments after Bk
+.Sh SYNOPSIS
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -badarg
+.Op o Ar a
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -lines
+.Op o Ar a
+.Ek tail argument
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -line
+.Op o Ar a
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk
+.Op o Ar a
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -words -murks bogus
+.Op o Ar a
+.Ek
+.Sh DESCRIPTION
+Here is an empty keep:
+.Bk -words
+.Ek
+End of test document.
diff --git a/regress/mdoc/Bk/badarg.out_ascii b/regress/mdoc/Bk/badarg.out_ascii
new file mode 100644
index 00000000..9303d3f0
--- /dev/null
+++ b/regress/mdoc/Bk/badarg.out_ascii
@@ -0,0 +1,25 @@
+BK-BADARG(1) General Commands Manual BK-BADARG(1)
+
+NNAAMMEE
+ BBkk--bbaaddaarrgg - bad arguments after Bk
+
+SSYYNNOOPPSSIISS
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+DDEESSCCRRIIPPTTIIOONN
+ Here is an empty keep: End of test document.
+
+OpenBSD June 30, 2010 OpenBSD
diff --git a/regress/mdoc/Bk/badarg.out_lint b/regress/mdoc/Bk/badarg.out_lint
new file mode 100644
index 00000000..16918ae5
--- /dev/null
+++ b/regress/mdoc/Bk/badarg.out_lint
@@ -0,0 +1,6 @@
+mandoc: badarg.in:13:5: ERROR: skipping excess arguments: Bk ... -badarg
+mandoc: badarg.in:22:5: ERROR: skipping excess arguments: Bk ... -lines
+mandoc: badarg.in:24:2: ERROR: skipping all arguments: Ek tail argument
+mandoc: badarg.in:31:5: ERROR: skipping excess arguments: Bk ... -line
+mandoc: badarg.in:49:12: ERROR: skipping excess arguments: Bk ... -murks
+mandoc: badarg.in:54:2: WARNING: empty block: Bk
diff --git a/regress/mdoc/Bk/break.in b/regress/mdoc/Bk/break.in
new file mode 100644
index 00000000..e7124b55
--- /dev/null
+++ b/regress/mdoc/Bk/break.in
@@ -0,0 +1,53 @@
+.Dd $Mdocdate$
+.Dt BK-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-break
+.Nd handling of word keeps
+.Sh DESCRIPTION
+Even though it is called a word keep,
+.Bk -words
+it will not keep words together in free-form text.
+.Ek
+However, even the noop macro
+.Bk -words
+.No is sufficient to let the keep take effect .
+.Ek
+Even text generated in pre-handlers must be kept together with
+the text following it:
+.Bk -words
+.Xr one 1 No and Xr two 2
+.Ek
+should be on the same line.
+.Pp
+Including the whole output line into the keep is not required,
+including just the macros to be kept together is sufficient:
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -words
+.Op o Ar a
+.Ek
+.Pp
+.Bk -words
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Op o Ar a
+.Ek
+.Pp
+Even text printed without spacing must be kept together
+with the text following it:
+.Pp
+.Bk -words
+.Fn xxxxxxxxxxxxxxxxxxxx "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Pp
+.Fo xxxxxxxxxxxxxxxxxxxx
+.Fa "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Fc
+.Ek
diff --git a/regress/mdoc/Bk/break.out_ascii b/regress/mdoc/Bk/break.out_ascii
new file mode 100644
index 00000000..d39d64dc
--- /dev/null
+++ b/regress/mdoc/Bk/break.out_ascii
@@ -0,0 +1,30 @@
+BK-BREAK(1) General Commands Manual BK-BREAK(1)
+
+NNAAMMEE
+ BBkk--bbrreeaakk - handling of word keeps
+
+DDEESSCCRRIIPPTTIIOONN
+ Even though it is called a word keep, it will not keep words together in
+ free-form text. However, even the noop macro
+ is sufficient to let the keep take effect. Even text generated in pre-
+ handlers must be kept together with the text following it:
+ one(1) and two(2) should be on the same line.
+
+ Including the whole output line into the keep is not required, including
+ just the macros to be kept together is sufficient:
+
+ BBkk--bbrreeaakk _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbrreeaakk _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ Even text printed without spacing must be kept together with the text
+ following it:
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x
+ _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x, _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x)
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x, _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x)
+
+OpenBSD December 25, 2013 OpenBSD
diff --git a/regress/mdoc/Bk/broken.in b/regress/mdoc/Bk/broken.in
new file mode 100644
index 00000000..baa2651a
--- /dev/null
+++ b/regress/mdoc/Bk/broken.in
@@ -0,0 +1,11 @@
+.Dd February 7, 2015
+.Dt BK-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-broken
+.Nd word keep broken by another block
+.Sh DESCRIPTION
+before keep
+.Bk -words
+.Sh CAVEATS
+next section
diff --git a/regress/mdoc/Bk/broken.out_ascii b/regress/mdoc/Bk/broken.out_ascii
new file mode 100644
index 00000000..4b7eea7a
--- /dev/null
+++ b/regress/mdoc/Bk/broken.out_ascii
@@ -0,0 +1,12 @@
+BK-BROKEN(1) General Commands Manual BK-BROKEN(1)
+
+NNAAMMEE
+ BBkk--bbrrookkeenn - word keep broken by another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before keep
+
+CCAAVVEEAATTSS
+ next section
+
+OpenBSD February 7, 2015 OpenBSD
diff --git a/regress/mdoc/Bk/broken.out_lint b/regress/mdoc/Bk/broken.out_lint
new file mode 100644
index 00000000..a6596506
--- /dev/null
+++ b/regress/mdoc/Bk/broken.out_lint
@@ -0,0 +1,2 @@
+mandoc: broken.in:10:2: ERROR: inserting missing end of block: Sh breaks Bk
+mandoc: broken.in:9:2: WARNING: empty block: Bk
diff --git a/regress/mdoc/Bk/inputlines.in b/regress/mdoc/Bk/inputlines.in
new file mode 100644
index 00000000..50db65fb
--- /dev/null
+++ b/regress/mdoc/Bk/inputlines.in
@@ -0,0 +1,73 @@
+.Dd December 24, 2010
+.Dt BK-INPUTLINES 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-inputlines
+.Nd effect of input lines breaks on word keeps
+.Sh SYNOPSIS
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a Oc Oo No b Oc Oc Pq one line
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo
+.Oo No a Oc Oo No b Oc Oc Pq "break after first Oo"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo
+.No a Oc Oo b Oc Oc Pq "break after second Oo"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a
+.Oc Oo No b Oc Oc Pq "break before first Oc"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a Oc
+.Oo No b Oc Oc Pq "break after first Oc"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a Oc Oo
+.No b Oc Oc Pq "break after third Oo"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a No b Oc
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a
+.No b Oc
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a Oc No b
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a Oc
+.No b
+.Ek
diff --git a/regress/mdoc/Bk/inputlines.out_ascii b/regress/mdoc/Bk/inputlines.out_ascii
new file mode 100644
index 00000000..448872f6
--- /dev/null
+++ b/regress/mdoc/Bk/inputlines.out_ascii
@@ -0,0 +1,37 @@
+BK-INPUTLINES(1) General Commands Manual BK-INPUTLINES(1)
+
+NNAAMMEE
+ BBkk--iinnppuuttlliinneess - effect of input lines breaks on word keeps
+
+SSYYNNOOPPSSIISS
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (one line)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break after first Oo)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break after second Oo)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break before first Oc)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x [[a]
+ [b]] (break after first Oc)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break after third Oo)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [a b]
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x [a
+ b]
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [a] b
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x [a]
+ b
+
+OpenBSD December 24, 2010 OpenBSD
diff --git a/regress/mdoc/Bk/lines.in b/regress/mdoc/Bk/lines.in
new file mode 100644
index 00000000..4533242c
--- /dev/null
+++ b/regress/mdoc/Bk/lines.in
@@ -0,0 +1,88 @@
+.Dd April 12, 2010
+.Dt BK-LINES 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-lines
+.Nd handling of line keeps
+.Sh DESCRIPTION
+.Bd -literal
+1
+2
+3
+4
+5
+6
+7
+8
+9
+11
+12
+13
+14
+15
+16
+17
+18
+19
+21
+22
+23
+24
+25
+26
+27
+28
+29
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+.Ed
+.Ss with keep
+.Bk -lines
+.Bd -literal
+1
+2
+3
+4
+5
+6
+7
+8
+9
+11
+12
+13
+14
+15
+16
+17
+18
+19
+21
+22
+23
+24
+25
+26
+27
+28
+29
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+.Ed
+.Ek
diff --git a/regress/mdoc/Bk/lines.out_ascii b/regress/mdoc/Bk/lines.out_ascii
new file mode 100644
index 00000000..544804e4
--- /dev/null
+++ b/regress/mdoc/Bk/lines.out_ascii
@@ -0,0 +1,84 @@
+BK-LINES(1) General Commands Manual BK-LINES(1)
+
+NNAAMMEE
+ BBkk--lliinneess - handling of line keeps
+
+DDEESSCCRRIIPPTTIIOONN
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+
+ wwiitthh kkeeeepp
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+
+OpenBSD April 12, 2010 OpenBSD
diff --git a/regress/mdoc/Bk/synopsis.in b/regress/mdoc/Bk/synopsis.in
new file mode 100644
index 00000000..077e49cf
--- /dev/null
+++ b/regress/mdoc/Bk/synopsis.in
@@ -0,0 +1,32 @@
+.Dd $Mdocdate$
+.Dt BK-SYNOPSIS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-synopsis
+.Nd automatic keeps in the synopsis
+.Sh SYNOPSIS
+In the synopsis, almost all macros do not show
+.No the word keep effect they would get in a \&Bk block.
+.Pp
+.Fn xxxxxxxxxxxxxxxxxxxx "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Fo xxxxxxxxxxxxxxxxxxxx
+.Fa "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Fc
+.Pp
+Only \&Nm, used as a block macro, does:
+.Pp
+.Nm ksh
+.Op Fl +abCefhiklmnpruvXx
+.Op Fl +o Ar option
+.Op Fl c Ar string \*(Ba Fl s \*(Ba Ar file Op Ar argument ...
+.Bk -words
+.Ek
+.Nm ksh
+.Op Fl +abCefhiklmnpruvXx
+.Op Fl +o Ar option
+.Op Fl c Ar string \*(Ba Fl s \*(Ba Ar file Op Ar argument ...
+.Sh DESCRIPTION
+.Nm ksh
+.Op Fl +abCefhiklmnpruvXx
+.Op Fl +o Ar option
+.Op Fl c Ar string \*(Ba Fl s \*(Ba Ar file Op Ar argument ...
diff --git a/regress/mdoc/Bk/synopsis.out_ascii b/regress/mdoc/Bk/synopsis.out_ascii
new file mode 100644
index 00000000..5ace7489
--- /dev/null
+++ b/regress/mdoc/Bk/synopsis.out_ascii
@@ -0,0 +1,27 @@
+BK-SYNOPSIS(1) General Commands Manual BK-SYNOPSIS(1)
+
+NNAAMMEE
+ BBkk--ssyynnooppssiiss - automatic keeps in the synopsis
+
+SSYYNNOOPPSSIISS
+ In the synopsis, almost all macros do not show the word keep effect they
+ would get in a Bk block.
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x,
+ _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x);
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x,
+ _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x);
+
+ Only Nm, used as a block macro, does:
+
+ kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n]
+ [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t _._._.]]
+ kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n]
+ [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t _._._.]]
+
+DDEESSCCRRIIPPTTIIOONN
+ kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n] [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t
+ _._._.]]
+
+OpenBSD December 25, 2013 OpenBSD