aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/mdoc/Sm
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/Sm
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/Sm')
-rw-r--r--regress/mdoc/Sm/Makefile8
-rw-r--r--regress/mdoc/Sm/badarg.in14
-rw-r--r--regress/mdoc/Sm/badarg.out_ascii9
-rw-r--r--regress/mdoc/Sm/badarg.out_lint2
-rw-r--r--regress/mdoc/Sm/noarg.in20
-rw-r--r--regress/mdoc/Sm/noarg.out_ascii11
-rw-r--r--regress/mdoc/Sm/scope.in30
-rw-r--r--regress/mdoc/Sm/scope.out_ascii17
-rw-r--r--regress/mdoc/Sm/spacing-No.in60
-rw-r--r--regress/mdoc/Sm/spacing-No.out_ascii26
-rw-r--r--regress/mdoc/Sm/spacing-Op.in63
-rw-r--r--regress/mdoc/Sm/spacing-Op.out_ascii28
-rw-r--r--regress/mdoc/Sm/twoarg.in21
-rw-r--r--regress/mdoc/Sm/twoarg.out_ascii12
-rw-r--r--regress/mdoc/Sm/twoarg.out_lint1
15 files changed, 322 insertions, 0 deletions
diff --git a/regress/mdoc/Sm/Makefile b/regress/mdoc/Sm/Makefile
new file mode 100644
index 00000000..197b1d74
--- /dev/null
+++ b/regress/mdoc/Sm/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.7 2014/11/26 19:22:44 schwarze Exp $
+
+REGRESS_TARGETS = noarg badarg scope spacing-No spacing-Op twoarg
+LINT_TARGETS = badarg twoarg
+
+SKIP_TMAN ?= scope
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sm/badarg.in b/regress/mdoc/Sm/badarg.in
new file mode 100644
index 00000000..8684965e
--- /dev/null
+++ b/regress/mdoc/Sm/badarg.in
@@ -0,0 +1,14 @@
+.Dd July 3, 2014
+.Dt SM-BADARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-badarg
+.Nd spacing macro with invalid arguments
+.Sh DESCRIPTION
+.Fl f Ar on
+.Sm off
+.Fl f Ar off
+.Sm bad
+.Fl f Ar bad Pq on
+.Sm bad
+.Fl f Ar bad Pq off
diff --git a/regress/mdoc/Sm/badarg.out_ascii b/regress/mdoc/Sm/badarg.out_ascii
new file mode 100644
index 00000000..6b65fb9a
--- /dev/null
+++ b/regress/mdoc/Sm/badarg.out_ascii
@@ -0,0 +1,9 @@
+SM-BADARG(1) General Commands Manual SM-BADARG(1)
+
+NNAAMMEE
+ SSmm--bbaaddaarrgg - spacing macro with invalid arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ --ff _o_n --ff_o_f_f bad --ff _b_a_d (on) bad--ff_b_a_d(off)
+
+OpenBSD July 3, 2014 OpenBSD
diff --git a/regress/mdoc/Sm/badarg.out_lint b/regress/mdoc/Sm/badarg.out_lint
new file mode 100644
index 00000000..54644f34
--- /dev/null
+++ b/regress/mdoc/Sm/badarg.out_lint
@@ -0,0 +1,2 @@
+mandoc: badarg.in:11:5: WARNING: invalid Boolean argument: Sm bad
+mandoc: badarg.in:13:5: WARNING: invalid Boolean argument: Sm bad
diff --git a/regress/mdoc/Sm/noarg.in b/regress/mdoc/Sm/noarg.in
new file mode 100644
index 00000000..bb777430
--- /dev/null
+++ b/regress/mdoc/Sm/noarg.in
@@ -0,0 +1,20 @@
+.Dd July 2, 2014
+.Dt SM-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-noarg
+.Nd spacing macro without arguments
+.Sh DESCRIPTION
+.Fl f Ar on
+.Sm off
+.Fl f Ar off
+.Sm
+.Fl f Ar toggle Pq now on
+.Sm on
+.Fl f Ar on
+.Sm
+.Fl f Ar toggle Pq now off
+.Pp
+.Sm on
+.Fl f Ar on
+on a new line
diff --git a/regress/mdoc/Sm/noarg.out_ascii b/regress/mdoc/Sm/noarg.out_ascii
new file mode 100644
index 00000000..ea0f2fc6
--- /dev/null
+++ b/regress/mdoc/Sm/noarg.out_ascii
@@ -0,0 +1,11 @@
+SM-NOARG(1) General Commands Manual SM-NOARG(1)
+
+NNAAMMEE
+ SSmm--nnooaarrgg - spacing macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ --ff _o_n --ff_o_f_f --ff _t_o_g_g_l_e (now on) --ff _o_n --ff_t_o_g_g_l_e(nowoff)
+
+ --ff _o_n on a new line
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Sm/scope.in b/regress/mdoc/Sm/scope.in
new file mode 100644
index 00000000..76ce050b
--- /dev/null
+++ b/regress/mdoc/Sm/scope.in
@@ -0,0 +1,30 @@
+.Dd January 2, 2010
+.Dt SM-SCOPE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-scope
+.Nd scope of the spacing macro
+.Sh DESCRIPTION
+Using an abbreviated example from the
+.Xr ksh 1
+manual.
+.Pp
+Modifiers can be applied to the
+.Pf ${ Ns Ar name Ns }
+form of parameter substitution:
+.Bl -tag -width Ds
+.Sm off
+.It ${ Ar name No :- Ar word No }
+.Sm on
+If
+.Ar name
+is set and not
+.Dv NULL ,
+it is substituted; otherwise,
+.Ar word
+is substituted.
+.El
+.Pp
+In the above modifiers, the
+.Ql \&:
+can be omitted, ...
diff --git a/regress/mdoc/Sm/scope.out_ascii b/regress/mdoc/Sm/scope.out_ascii
new file mode 100644
index 00000000..8a735d1c
--- /dev/null
+++ b/regress/mdoc/Sm/scope.out_ascii
@@ -0,0 +1,17 @@
+SM-SCOPE(1) General Commands Manual SM-SCOPE(1)
+
+NNAAMMEE
+ SSmm--ssccooppee - scope of the spacing macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Using an abbreviated example from the ksh(1) manual.
+
+ Modifiers can be applied to the ${_n_a_m_e} form of parameter substitution:
+
+ ${_n_a_m_e:-_w_o_r_d}
+ If _n_a_m_e is set and not NULL, it is substituted; otherwise, _w_o_r_d
+ is substituted.
+
+ In the above modifiers, the `:' can be omitted, ...
+
+OpenBSD January 2, 2010 OpenBSD
diff --git a/regress/mdoc/Sm/spacing-No.in b/regress/mdoc/Sm/spacing-No.in
new file mode 100644
index 00000000..35b6b10b
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-No.in
@@ -0,0 +1,60 @@
+.Dd July 4, 2010
+.Dt SM-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-spacing
+.Nd basic tests of spacing mode
+.Sh SYNOPSIS
+.Nm mandoc
+.Sm off
+.Fl T Ar mode
+.Sm on
+.Ar
+.Sh DESCRIPTION
+text1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+text2 text3
+.Sm on
+.No macro4
+.Pp
+text1
+.Sm off
+.No macro2 macro3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+.No macro2 No macro3
+.Sm on
+.No macro4
+.Pp
+.No macro1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+.No macro1
+.Sm off
+text2 text3
+.Sm on
+.No macro4
+.Pp
+.No macro1
+.Sm off
+.No macro2 No macro3
+.Sm on
+text4
+.Pp
+.No macro1
+.Sm off
+.No macro2 No macro3
+.Sm on
+.No macro4
diff --git a/regress/mdoc/Sm/spacing-No.out_ascii b/regress/mdoc/Sm/spacing-No.out_ascii
new file mode 100644
index 00000000..d303e3cf
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-No.out_ascii
@@ -0,0 +1,26 @@
+SM-SPACING(1) General Commands Manual SM-SPACING(1)
+
+NNAAMMEE
+ SSmm--ssppaacciinngg - basic tests of spacing mode
+
+SSYYNNOOPPSSIISS
+ mmaannddoocc --TT_m_o_d_e _f_i_l_e _._._.
+
+DDEESSCCRRIIPPTTIIOONN
+ text1 text2 text3 text4
+
+ text1 text2 text3 macro4
+
+ text1 macro2macro3 text4
+
+ text1 macro2macro3 macro4
+
+ macro1 text2 text3 text4
+
+ macro1 text2 text3 macro4
+
+ macro1 macro2macro3 text4
+
+ macro1 macro2macro3 macro4
+
+OpenBSD July 4, 2010 OpenBSD
diff --git a/regress/mdoc/Sm/spacing-Op.in b/regress/mdoc/Sm/spacing-Op.in
new file mode 100644
index 00000000..9d3716a4
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-Op.in
@@ -0,0 +1,63 @@
+.Dd July 4, 2010
+.Dt SM-SPACING-OP 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-spacing-Op
+.Nd spacing mode, demonstrated using the .Op macro
+.Sh SYNOPSIS
+.Nm mandoc
+.Sm off
+.Fl T Ar mode
+.Sm on
+.Ar
+.Sh DESCRIPTION
+text1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+text2 text3
+.Sm on
+.Op macro4
+.Pp
+text1
+.Sm off
+.Op macro2 macro3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+.Op macro2 Op macro3
+.Sm on
+.Op macro4
+.Pp
+.Op macro1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+.Op macro1
+.Sm off
+text2 text3
+.Sm on
+.Op macro4
+.Pp
+.Op macro1
+.Sm off
+.Op macro2 Op macro3
+.Sm on
+text4
+.Pp
+.Op macro1
+.Sm off
+.Op macro2 Op macro3
+.Sm on
+.Op macro4
+.Pp
+.Sm on
+.Op macro1
diff --git a/regress/mdoc/Sm/spacing-Op.out_ascii b/regress/mdoc/Sm/spacing-Op.out_ascii
new file mode 100644
index 00000000..c5338dce
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-Op.out_ascii
@@ -0,0 +1,28 @@
+SM-SPACING-OP(1) General Commands Manual SM-SPACING-OP(1)
+
+NNAAMMEE
+ SSmm--ssppaacciinngg--OOpp - spacing mode, demonstrated using the .Op macro
+
+SSYYNNOOPPSSIISS
+ mmaannddoocc --TT_m_o_d_e _f_i_l_e _._._.
+
+DDEESSCCRRIIPPTTIIOONN
+ text1 text2 text3 text4
+
+ text1 text2 text3 [macro4]
+
+ text1 [macro2macro3] text4
+
+ text1 [macro2[macro3]] [macro4]
+
+ [macro1] text2 text3 text4
+
+ [macro1] text2 text3 [macro4]
+
+ [macro1] [macro2[macro3]] text4
+
+ [macro1] [macro2[macro3]] [macro4]
+
+ [macro1]
+
+OpenBSD July 4, 2010 OpenBSD
diff --git a/regress/mdoc/Sm/twoarg.in b/regress/mdoc/Sm/twoarg.in
new file mode 100644
index 00000000..8e7b51d7
--- /dev/null
+++ b/regress/mdoc/Sm/twoarg.in
@@ -0,0 +1,21 @@
+.Dd November 26, 2014
+.Dt SM-TWOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-twoarg
+.Nd spacing macro with multiple arguments
+.Sh DESCRIPTION
+.Sy default :
+.Fl f Ar on
+.br
+.Sy off two :
+.Sm off two
+.Fl f Ar off
+.br
+.Sy bad two :
+.Sm bad two
+.Fl f Ar off
+.br
+.Sy on two :
+.Sm on two
+.Fl f Ar on
diff --git a/regress/mdoc/Sm/twoarg.out_ascii b/regress/mdoc/Sm/twoarg.out_ascii
new file mode 100644
index 00000000..b8276c2f
--- /dev/null
+++ b/regress/mdoc/Sm/twoarg.out_ascii
@@ -0,0 +1,12 @@
+SM-TWOARG(1) General Commands Manual SM-TWOARG(1)
+
+NNAAMMEE
+ SSmm--ttwwooaarrgg - spacing macro with multiple arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ ddeeffaauulltt: --ff _o_n
+ ooffff ttwwoo: two--ff_o_f_f
+ bbaaddttwwoo: bad two --ff _o_f_f
+ oonn ttwwoo: two --ff _o_n
+
+OpenBSD November 26, 2014 OpenBSD
diff --git a/regress/mdoc/Sm/twoarg.out_lint b/regress/mdoc/Sm/twoarg.out_lint
new file mode 100644
index 00000000..581a5500
--- /dev/null
+++ b/regress/mdoc/Sm/twoarg.out_lint
@@ -0,0 +1 @@
+mandoc: twoarg.in:16:5: WARNING: invalid Boolean argument: Sm bad