summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-11-26 19:22:45 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-11-26 19:22:45 +0000
commitc188868858f419ec39f16c9714d8890b3381cd26 (patch)
treef150c998185aca96a5e9524ce600a97ebe8b5300 /regress/usr.bin
parent35b8c30a6f0433fcbf29d035097c44d0fb8cac09 (diff)
The .Sm macro accepts at most one argument;
fixing an assertion failure found by jsg@ with afl.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sm/Makefile6
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sm/twoarg.in21
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sm/twoarg.out_ascii12
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sm/twoarg.out_lint1
4 files changed, 37 insertions, 3 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Sm/Makefile b/regress/usr.bin/mandoc/mdoc/Sm/Makefile
index 3c84d66c66e..197b1d7424f 100644
--- a/regress/usr.bin/mandoc/mdoc/Sm/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Sm/Makefile
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile,v 1.6 2014/07/05 12:33:54 schwarze Exp $
+# $OpenBSD: Makefile,v 1.7 2014/11/26 19:22:44 schwarze Exp $
-REGRESS_TARGETS = noarg badarg scope spacing-No spacing-Op
-LINT_TARGETS = badarg
+REGRESS_TARGETS = noarg badarg scope spacing-No spacing-Op twoarg
+LINT_TARGETS = badarg twoarg
SKIP_TMAN ?= scope
diff --git a/regress/usr.bin/mandoc/mdoc/Sm/twoarg.in b/regress/usr.bin/mandoc/mdoc/Sm/twoarg.in
new file mode 100644
index 00000000000..8e7b51d7c40
--- /dev/null
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Sm/twoarg.out_ascii b/regress/usr.bin/mandoc/mdoc/Sm/twoarg.out_ascii
new file mode 100644
index 00000000000..b8276c2f963
--- /dev/null
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Sm/twoarg.out_lint b/regress/usr.bin/mandoc/mdoc/Sm/twoarg.out_lint
new file mode 100644
index 00000000000..581a5500baa
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Sm/twoarg.out_lint
@@ -0,0 +1 @@
+mandoc: twoarg.in:16:5: WARNING: invalid Boolean argument: Sm bad