diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-11-27 16:20:29 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-11-27 16:20:29 +0000 |
commit | cfd4d3ad863deab48b1605425c7ce30b540c8e08 (patch) | |
tree | 295668c4e505bfdebd5713db5f683619bc78592d /regress/usr.bin/mandoc | |
parent | ec339eb60cef5a539e6bbb6c5ddad6f5e39f99c7 (diff) |
Fix the obsolete .Db (toggle debug mode) macro to ignore its arguments
and not trigger an assertion when there is more than one argument;
the latter found by jsg@ with afl.
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Db/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Db/args.in | 14 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Db/args.out_ascii | 9 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Db/args.out_lint | 3 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Makefile | 4 |
5 files changed, 34 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Db/Makefile b/regress/usr.bin/mandoc/mdoc/Db/Makefile new file mode 100644 index 00000000000..c37822ff284 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Db/Makefile @@ -0,0 +1,6 @@ +# $OpenBSD: Makefile,v 1.1 2014/11/27 16:20:27 schwarze Exp $ + +REGRESS_TARGETS = args +LINT_TARGETS = args + +.include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/mdoc/Db/args.in b/regress/usr.bin/mandoc/mdoc/Db/args.in new file mode 100644 index 00000000000..b40d7b0c20c --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Db/args.in @@ -0,0 +1,14 @@ +.Dd November 27, 2014 +.Dt DB-ARGS 1 +.Os OpenBSD +.Sh NAME +.Nm Db-args +.Nd obsolete debug macro +.Sh DESCRIPTION +no args +.Db +one arg +.Db on +two args +.Db foo bar +end of text diff --git a/regress/usr.bin/mandoc/mdoc/Db/args.out_ascii b/regress/usr.bin/mandoc/mdoc/Db/args.out_ascii new file mode 100644 index 00000000000..909b91ba18e --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Db/args.out_ascii @@ -0,0 +1,9 @@ +DB-ARGS(1) General Commands Manual DB-ARGS(1) + +NNAAMMEE + DDbb--aarrggss - obsolete debug macro + +DDEESSCCRRIIPPTTIIOONN + no args one arg two args end of text + +OpenBSD November 27, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Db/args.out_lint b/regress/usr.bin/mandoc/mdoc/Db/args.out_lint new file mode 100644 index 00000000000..e0eb44aebe4 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Db/args.out_lint @@ -0,0 +1,3 @@ +mandoc: args.in:9:2: WARNING: obsolete macro: Db +mandoc: args.in:11:2: WARNING: obsolete macro: Db +mandoc: args.in:13:2: WARNING: obsolete macro: Db diff --git a/regress/usr.bin/mandoc/mdoc/Makefile b/regress/usr.bin/mandoc/mdoc/Makefile index d918d28bb5c..6006c7da574 100644 --- a/regress/usr.bin/mandoc/mdoc/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.29 2014/08/14 02:00:52 schwarze Exp $ +# $OpenBSD: Makefile,v 1.30 2014/11/27 16:20:27 schwarze Exp $ SUBDIR = Ad An Ap Aq Ar At Bd Bf Bk Bl Brq Bx Cd Cm -SUBDIR += D1 Dd Dl Dq Dt Dv Em Eo Er Ev Ex Fd Fl Fo Ft Ic In Lb Li Lk +SUBDIR += D1 Db Dd Dl Dq Dt Dv Em Eo Er Ev Ex Fd Fl Fo Ft Ic In Lb Li Lk SUBDIR += Ms Mt Nd Nm No Ns Oo Op Os Ox Pa Pf Pp Qq Rs Rv SUBDIR += Sh Sm Sq St Sx Sy Tn Ux Va Vt Xr blank |