summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-02-06 11:54:04 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-02-06 11:54:04 +0000
commit513d61612cd2743c0b98df35615841dd0607dd64 (patch)
treea21fd4d0dcbb7143ac786c7b395292d26922cc73 /regress/usr.bin
parent5a5228fc691c39abe6b6b60967ca19d02f530c37 (diff)
better error reporting regarding .OP .RS .UR .TH arguments
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/mandoc/man/Makefile4
-rw-r--r--regress/usr.bin/mandoc/man/OP/Makefile6
-rw-r--r--regress/usr.bin/mandoc/man/OP/args.in13
-rw-r--r--regress/usr.bin/mandoc/man/OP/args.out_ascii14
-rw-r--r--regress/usr.bin/mandoc/man/OP/args.out_lint2
-rw-r--r--regress/usr.bin/mandoc/man/RS/REarg.in2
-rw-r--r--regress/usr.bin/mandoc/man/RS/REarg.out_lint1
-rw-r--r--regress/usr.bin/mandoc/man/TH/Makefile4
-rw-r--r--regress/usr.bin/mandoc/man/TH/sixargs.out_lint1
-rw-r--r--regress/usr.bin/mandoc/man/UR/Makefile13
-rw-r--r--regress/usr.bin/mandoc/man/UR/args.out_lint5
11 files changed, 54 insertions, 11 deletions
diff --git a/regress/usr.bin/mandoc/man/Makefile b/regress/usr.bin/mandoc/man/Makefile
index b9c7885e100..ded1f279889 100644
--- a/regress/usr.bin/mandoc/man/Makefile
+++ b/regress/usr.bin/mandoc/man/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.15 2014/08/14 02:00:52 schwarze Exp $
+# $OpenBSD: Makefile,v 1.16 2015/02/06 11:54:03 schwarze Exp $
-SUBDIR = B BI EX HP IP PD PP RS SH TH TP TS UR nf blank
+SUBDIR = B BI EX HP IP OP PD PP RS SH TH TP TS UR nf blank
.include "../Makefile.sub"
.include <bsd.subdir.mk>
diff --git a/regress/usr.bin/mandoc/man/OP/Makefile b/regress/usr.bin/mandoc/man/OP/Makefile
new file mode 100644
index 00000000000..fa4f7e9ce6a
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/OP/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2015/02/06 11:54:03 schwarze Exp $
+
+REGRESS_TARGETS = args
+LINT_TARGETS = args
+
+.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/man/OP/args.in b/regress/usr.bin/mandoc/man/OP/args.in
new file mode 100644
index 00000000000..3fed8337082
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/OP/args.in
@@ -0,0 +1,13 @@
+.TH OP-ARGS 1 "February 6, 2015" OpenBSD
+.SH NAME
+OP-args \- argument handling of the man-ext OP macro
+.SH DESCRIPTION
+no argument:
+.OP
+one argument:
+.OP \-f
+two arguments:
+.OP \-f arg
+three arguments:
+.OP \-f arg bogus
+final text
diff --git a/regress/usr.bin/mandoc/man/OP/args.out_ascii b/regress/usr.bin/mandoc/man/OP/args.out_ascii
new file mode 100644
index 00000000000..ca3e3c036a2
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/OP/args.out_ascii
@@ -0,0 +1,14 @@
+OP-ARGS(1) General Commands Manual OP-ARGS(1)
+
+
+
+NNAAMMEE
+ OP-args - argument handling of the man-ext OP macro
+
+DDEESSCCRRIIPPTTIIOONN
+ no argument: [] one argument: [--ff] two arguments: [--ff _a_r_g] three
+ arguments: [--ff _a_r_g] final text
+
+
+
+OpenBSD February 6, 2015 OP-ARGS(1)
diff --git a/regress/usr.bin/mandoc/man/OP/args.out_lint b/regress/usr.bin/mandoc/man/OP/args.out_lint
new file mode 100644
index 00000000000..c468d9d0f9a
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/OP/args.out_lint
@@ -0,0 +1,2 @@
+mandoc: args.in:6:2: WARNING: missing option string, using "": OP
+mandoc: args.in:12:13: ERROR: skipping excess arguments: OP ... bogus
diff --git a/regress/usr.bin/mandoc/man/RS/REarg.in b/regress/usr.bin/mandoc/man/RS/REarg.in
index c023439c21c..05eadd8eca7 100644
--- a/regress/usr.bin/mandoc/man/RS/REarg.in
+++ b/regress/usr.bin/mandoc/man/RS/REarg.in
@@ -3,7 +3,7 @@
RS-REarg \- arguments to the RE macro
.SH DESCRIPTION
level 1
-.RS 4n
+.RS 4n 2i
level 2
.RS 2n
level 3
diff --git a/regress/usr.bin/mandoc/man/RS/REarg.out_lint b/regress/usr.bin/mandoc/man/RS/REarg.out_lint
index a10e4b18051..3b516d9622f 100644
--- a/regress/usr.bin/mandoc/man/RS/REarg.out_lint
+++ b/regress/usr.bin/mandoc/man/RS/REarg.out_lint
@@ -1,3 +1,4 @@
+mandoc: REarg.in:6:8: ERROR: skipping excess arguments: RS ... 2i
mandoc: REarg.in:10:6: ERROR: skipping excess arguments: RE ... a
mandoc: REarg.in:12:6: ERROR: skipping excess arguments: RE ... b
mandoc: REarg.in:18:6: ERROR: skipping excess arguments: RE ... c
diff --git a/regress/usr.bin/mandoc/man/TH/Makefile b/regress/usr.bin/mandoc/man/TH/Makefile
index 3079a99cd72..b1647349682 100644
--- a/regress/usr.bin/mandoc/man/TH/Makefile
+++ b/regress/usr.bin/mandoc/man/TH/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.8 2014/11/21 01:52:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.9 2015/02/06 11:54:03 schwarze Exp $
REGRESS_TARGETS = noTH noarg onearg twoargs sixargs case longtit longvol
REGRESS_TARGETS += emptydate onlyyear isodate mdocdate baddate longdate
REGRESS_TARGETS += nobody
-LINT_TARGETS = noTH noarg onearg twoargs case
+LINT_TARGETS = noTH noarg onearg twoargs sixargs case
LINT_TARGETS += emptydate baddate longdate nobody
SKIP_GROFF = noTH longtit longvol longdate
diff --git a/regress/usr.bin/mandoc/man/TH/sixargs.out_lint b/regress/usr.bin/mandoc/man/TH/sixargs.out_lint
new file mode 100644
index 00000000000..9ac7a838396
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/TH/sixargs.out_lint
@@ -0,0 +1 @@
+mandoc: sixargs.in:1:53: ERROR: skipping excess arguments: TH ... SIX
diff --git a/regress/usr.bin/mandoc/man/UR/Makefile b/regress/usr.bin/mandoc/man/UR/Makefile
index d7ebab005c0..11cafcdf145 100644
--- a/regress/usr.bin/mandoc/man/UR/Makefile
+++ b/regress/usr.bin/mandoc/man/UR/Makefile
@@ -1,11 +1,12 @@
-# $OpenBSD: Makefile,v 1.2 2014/07/07 21:35:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2015/02/06 11:54:03 schwarze Exp $
-REGRESS_TARGETS = args noUE
-LINT_TARGETS = noUE
+REGRESS_TARGETS = args noUE
+LINT_TARGETS = args noUE
-# groff-1.22.2 defect:
-# - without .UE, .UR does not print the URI.
+# groff-1.22.3 defects:
+# - Without .UE, .UR does not print the URI.
+# - But .UE prints <> even without .UR.
-SKIP_GROFF = noUE
+SKIP_GROFF = noUE
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/man/UR/args.out_lint b/regress/usr.bin/mandoc/man/UR/args.out_lint
new file mode 100644
index 00000000000..63b94f1a28c
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/UR/args.out_lint
@@ -0,0 +1,5 @@
+mandoc: args.in:12:2: WARNING: empty block: UR
+mandoc: args.in:16:2: WARNING: missing resource identifier, using "": UR
+mandoc: args.in:21:11: ERROR: skipping excess arguments: UR ... second
+mandoc: args.in:26:11: ERROR: skipping excess arguments: UR ... second
+mandoc: args.in:26:2: WARNING: empty block: UR