summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc/roff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-07-06 19:08:58 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-07-06 19:08:58 +0000
commita9844262036e028323f7d11f70991b9a54447ec4 (patch)
treed20ae2fc8759280ad3aecc86197d981efcfff5ce /regress/usr.bin/mandoc/roff
parent656c11bd9c6a0d01822385b9ea5acafa9ba53171 (diff)
Clean up messages related to plain text and to escape sequences.
* Mention invalid escape sequences and string names, and fallbacks. * Hierarchical naming.
Diffstat (limited to 'regress/usr.bin/mandoc/roff')
-rw-r--r--regress/usr.bin/mandoc/roff/args/Makefile3
-rw-r--r--regress/usr.bin/mandoc/roff/args/man.out_lint8
-rw-r--r--regress/usr.bin/mandoc/roff/args/mdoc.out_lint12
-rw-r--r--regress/usr.bin/mandoc/roff/args/roff.out_lint11
-rw-r--r--regress/usr.bin/mandoc/roff/esc/B.in4
-rw-r--r--regress/usr.bin/mandoc/roff/esc/B.out_ascii3
-rw-r--r--regress/usr.bin/mandoc/roff/esc/B.out_lint1
-rw-r--r--regress/usr.bin/mandoc/roff/esc/Makefile3
-rw-r--r--regress/usr.bin/mandoc/roff/esc/h.in2
-rw-r--r--regress/usr.bin/mandoc/roff/esc/h.out_ascii1
-rw-r--r--regress/usr.bin/mandoc/roff/esc/h.out_lint1
-rw-r--r--regress/usr.bin/mandoc/roff/esc/w.in2
-rw-r--r--regress/usr.bin/mandoc/roff/esc/w.out_ascii1
-rw-r--r--regress/usr.bin/mandoc/roff/esc/w.out_lint1
-rw-r--r--regress/usr.bin/mandoc/roff/nr/Makefile3
-rw-r--r--regress/usr.bin/mandoc/roff/nr/escname.in2
-rw-r--r--regress/usr.bin/mandoc/roff/nr/escname.out_ascii2
-rw-r--r--regress/usr.bin/mandoc/roff/nr/escname.out_lint4
-rw-r--r--regress/usr.bin/mandoc/roff/string/Makefile3
-rw-r--r--regress/usr.bin/mandoc/roff/string/name.in2
-rw-r--r--regress/usr.bin/mandoc/roff/string/name.out_ascii1
-rw-r--r--regress/usr.bin/mandoc/roff/string/name.out_lint17
22 files changed, 81 insertions, 6 deletions
diff --git a/regress/usr.bin/mandoc/roff/args/Makefile b/regress/usr.bin/mandoc/roff/args/Makefile
index 7b3bb514513..3d756c97ee6 100644
--- a/regress/usr.bin/mandoc/roff/args/Makefile
+++ b/regress/usr.bin/mandoc/roff/args/Makefile
@@ -1,5 +1,6 @@
-# $OpenBSD: Makefile,v 1.3 2013/12/15 23:56:21 schwarze Exp $
+# $OpenBSD: Makefile,v 1.4 2014/07/06 19:08:57 schwarze Exp $
REGRESS_TARGETS = roff man mdoc
+LINT_TARGETS = roff man mdoc
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/roff/args/man.out_lint b/regress/usr.bin/mandoc/roff/args/man.out_lint
new file mode 100644
index 00000000000..2ae0fd4e199
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/args/man.out_lint
@@ -0,0 +1,8 @@
+mandoc: man.in:34:13: WARNING: whitespace at end of input line
+mandoc: man.in:38:14: WARNING: whitespace at end of input line
+mandoc: man.in:42:15: WARNING: whitespace at end of input line
+mandoc: man.in:82:25: WARNING: whitespace at end of input line
+mandoc: man.in:86:26: WARNING: whitespace at end of input line
+mandoc: man.in:90:27: WARNING: whitespace at end of input line
+mandoc: man.in:98:5: WARNING: unterminated quoted argument
+mandoc: man.in:99:9: WARNING: unterminated quoted argument
diff --git a/regress/usr.bin/mandoc/roff/args/mdoc.out_lint b/regress/usr.bin/mandoc/roff/args/mdoc.out_lint
new file mode 100644
index 00000000000..affe49b4c4f
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/args/mdoc.out_lint
@@ -0,0 +1,12 @@
+mandoc: mdoc.in:37:13: WARNING: whitespace at end of input line
+mandoc: mdoc.in:41:14: WARNING: whitespace at end of input line
+mandoc: mdoc.in:45:15: WARNING: whitespace at end of input line
+mandoc: mdoc.in:85:25: WARNING: whitespace at end of input line
+mandoc: mdoc.in:89:26: WARNING: whitespace at end of input line
+mandoc: mdoc.in:93:27: WARNING: whitespace at end of input line
+mandoc: mdoc.in:101:9: WARNING: unterminated quoted argument
+mandoc: mdoc.in:102:13: WARNING: unterminated quoted argument
+mandoc: mdoc.in:106:10: WARNING: unterminated quoted argument
+mandoc: mdoc.in:107:14: WARNING: unterminated quoted argument
+mandoc: mdoc.in:111:11: WARNING: unterminated quoted argument
+mandoc: mdoc.in:112:15: WARNING: unterminated quoted argument
diff --git a/regress/usr.bin/mandoc/roff/args/roff.out_lint b/regress/usr.bin/mandoc/roff/args/roff.out_lint
new file mode 100644
index 00000000000..0a57316606a
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/args/roff.out_lint
@@ -0,0 +1,11 @@
+mandoc: roff.in:24:15: WARNING: whitespace at end of input line
+mandoc: roff.in:26:16: WARNING: whitespace at end of input line
+mandoc: roff.in:28:17: WARNING: whitespace at end of input line
+mandoc: roff.in:48:27: WARNING: whitespace at end of input line
+mandoc: roff.in:50:28: WARNING: whitespace at end of input line
+mandoc: roff.in:52:29: WARNING: whitespace at end of input line
+mandoc: roff.in:57:11: WARNING: unterminated quoted argument
+mandoc: roff.in:60:11: WARNING: unterminated quoted argument
+mandoc: roff.in:60:16: WARNING: whitespace at end of input line
+mandoc: roff.in:63:11: WARNING: unterminated quoted argument
+mandoc: roff.in:63:17: WARNING: whitespace at end of input line
diff --git a/regress/usr.bin/mandoc/roff/esc/B.in b/regress/usr.bin/mandoc/roff/esc/B.in
index 84b0f9f157c..97ac39c5830 100644
--- a/regress/usr.bin/mandoc/roff/esc/B.in
+++ b/regress/usr.bin/mandoc/roff/esc/B.in
@@ -1,4 +1,4 @@
-.Dd April 8, 2014
+.Dd July 6, 2014
.Dt ESC-B 1
.Os OpenBSD
.Sh NAME
@@ -32,3 +32,5 @@ parentheses containing number: \B'(42)'
complex expression: \B'3+(3*(5==5*2)*4)+(3*5)/2'
.br
other delimiter: \Bx1+1x
+.br
+no closing delimiter: \B'1+1
diff --git a/regress/usr.bin/mandoc/roff/esc/B.out_ascii b/regress/usr.bin/mandoc/roff/esc/B.out_ascii
index 6ea3246655d..66869e4d16f 100644
--- a/regress/usr.bin/mandoc/roff/esc/B.out_ascii
+++ b/regress/usr.bin/mandoc/roff/esc/B.out_ascii
@@ -18,5 +18,6 @@ DDEESSCCRRIIPPTTIIOONN
parentheses containing number: 1
complex expression: 1
other delimiter: 1
+ no closing delimiter: 0
-OpenBSD April 8, 2014 OpenBSD
+OpenBSD July 6, 2014 OpenBSD
diff --git a/regress/usr.bin/mandoc/roff/esc/B.out_lint b/regress/usr.bin/mandoc/roff/esc/B.out_lint
new file mode 100644
index 00000000000..6159b1c5db7
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/B.out_lint
@@ -0,0 +1 @@
+mandoc: B.in:36:23: WARNING: invalid escape sequence: \B'1+1
diff --git a/regress/usr.bin/mandoc/roff/esc/Makefile b/regress/usr.bin/mandoc/roff/esc/Makefile
index 4fb16774431..83c06b21ae0 100644
--- a/regress/usr.bin/mandoc/roff/esc/Makefile
+++ b/regress/usr.bin/mandoc/roff/esc/Makefile
@@ -1,6 +1,7 @@
-# $OpenBSD: Makefile,v 1.4 2014/04/08 01:36:50 schwarze Exp $
+# $OpenBSD: Makefile,v 1.5 2014/07/06 19:08:57 schwarze Exp $
REGRESS_TARGETS = one two multi B c f h w z ignore
+LINT_TARGETS = B h w
# Postprocessing to remove "character backspace" sequences
# unless they are foolowed by the same character again.
diff --git a/regress/usr.bin/mandoc/roff/esc/h.in b/regress/usr.bin/mandoc/roff/esc/h.in
index bb86e700330..31fbb4e2940 100644
--- a/regress/usr.bin/mandoc/roff/esc/h.in
+++ b/regress/usr.bin/mandoc/roff/esc/h.in
@@ -14,3 +14,5 @@ escape at the end: >\h'0+\w'\&''<
escape at the beginning: >\h'\w'\&'+0'<
.br
escape in the middle: >\h'0+\w'\&'+0'<
+.br
+invalid delimiter: >\h-<
diff --git a/regress/usr.bin/mandoc/roff/esc/h.out_ascii b/regress/usr.bin/mandoc/roff/esc/h.out_ascii
index 9021dc8ffea..b841ed8a3e7 100644
--- a/regress/usr.bin/mandoc/roff/esc/h.out_ascii
+++ b/regress/usr.bin/mandoc/roff/esc/h.out_ascii
@@ -9,5 +9,6 @@ DDEESSCCRRIIPPTTIIOONN
escape at the end: ><
escape at the beginning: ><
escape in the middle: ><
+ invalid delimiter: ><
OpenBSD May 28, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/roff/esc/h.out_lint b/regress/usr.bin/mandoc/roff/esc/h.out_lint
new file mode 100644
index 00000000000..6d591e38e3c
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/h.out_lint
@@ -0,0 +1 @@
+mandoc: h.in:18:21: WARNING: invalid escape sequence: \h-
diff --git a/regress/usr.bin/mandoc/roff/esc/w.in b/regress/usr.bin/mandoc/roff/esc/w.in
index bd93623e464..4a9e79f80cf 100644
--- a/regress/usr.bin/mandoc/roff/esc/w.in
+++ b/regress/usr.bin/mandoc/roff/esc/w.in
@@ -12,3 +12,5 @@ character: \w'n'
blank: \w' '
.br
text: \w'text'
+.br
+unterminated: \w'foo
diff --git a/regress/usr.bin/mandoc/roff/esc/w.out_ascii b/regress/usr.bin/mandoc/roff/esc/w.out_ascii
index 4b11f621f51..42513a65471 100644
--- a/regress/usr.bin/mandoc/roff/esc/w.out_ascii
+++ b/regress/usr.bin/mandoc/roff/esc/w.out_ascii
@@ -8,5 +8,6 @@ DDEESSCCRRIIPPTTIIOONN
character: 24
blank: 24
text: 96
+ unterminated: 72
OpenBSD April 8, 2014 OpenBSD
diff --git a/regress/usr.bin/mandoc/roff/esc/w.out_lint b/regress/usr.bin/mandoc/roff/esc/w.out_lint
new file mode 100644
index 00000000000..a1b917224e2
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/w.out_lint
@@ -0,0 +1 @@
+mandoc: w.in:16:15: WARNING: invalid escape sequence: \w'foo
diff --git a/regress/usr.bin/mandoc/roff/nr/Makefile b/regress/usr.bin/mandoc/roff/nr/Makefile
index a7bc4115a14..fd5e2eb0723 100644
--- a/regress/usr.bin/mandoc/roff/nr/Makefile
+++ b/regress/usr.bin/mandoc/roff/nr/Makefile
@@ -1,5 +1,6 @@
-# $OpenBSD: Makefile,v 1.6 2014/06/29 22:12:54 schwarze Exp $
+# $OpenBSD: Makefile,v 1.7 2014/07/06 19:08:57 schwarze Exp $
REGRESS_TARGETS = argc eval escname int predef rr
+LINT_TARGETS = escname
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/roff/nr/escname.in b/regress/usr.bin/mandoc/roff/nr/escname.in
index 712b1d78d33..20454568ba3 100644
--- a/regress/usr.bin/mandoc/roff/nr/escname.in
+++ b/regress/usr.bin/mandoc/roff/nr/escname.in
@@ -13,3 +13,5 @@ nr-escname \- escape sequences in register names
.PP
.rr first\\second
\n[first] \n[second] \n[first\\second]
+.PP
+incomplete: \n[second
diff --git a/regress/usr.bin/mandoc/roff/nr/escname.out_ascii b/regress/usr.bin/mandoc/roff/nr/escname.out_ascii
index facc3fd1fda..c4d5433a566 100644
--- a/regress/usr.bin/mandoc/roff/nr/escname.out_ascii
+++ b/regress/usr.bin/mandoc/roff/nr/escname.out_ascii
@@ -12,6 +12,8 @@ DDEESSCCRRIIPPTTIIOONN
0 2 0
+ incomplete:
+
OpenBSD June 29, 2014 NR-ESCNAME(1)
diff --git a/regress/usr.bin/mandoc/roff/nr/escname.out_lint b/regress/usr.bin/mandoc/roff/nr/escname.out_lint
new file mode 100644
index 00000000000..cd9227aece6
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/nr/escname.out_lint
@@ -0,0 +1,4 @@
+mandoc: escname.in:8:5: ERROR: escaped character not allowed in a name
+mandoc: escname.in:11:5: ERROR: escaped character not allowed in a name
+mandoc: escname.in:17:13: WARNING: invalid escape sequence: \n[second
+mandoc: escname.in:17:12: WARNING: whitespace at end of input line
diff --git a/regress/usr.bin/mandoc/roff/string/Makefile b/regress/usr.bin/mandoc/roff/string/Makefile
index ac058a55bde..d2cd125ba44 100644
--- a/regress/usr.bin/mandoc/roff/string/Makefile
+++ b/regress/usr.bin/mandoc/roff/string/Makefile
@@ -1,6 +1,7 @@
-# $OpenBSD: Makefile,v 1.5 2011/11/17 16:28:46 schwarze Exp $
+# $OpenBSD: Makefile,v 1.6 2014/07/06 19:08:57 schwarze Exp $
REGRESS_TARGETS=escape infinite zerolength name
+LINT_TARGETS = name
# The infinite test fails badly with groff-1.20.1:
# It fails to print the following text.
diff --git a/regress/usr.bin/mandoc/roff/string/name.in b/regress/usr.bin/mandoc/roff/string/name.in
index 9dbfc75812d..a2a524a489a 100644
--- a/regress/usr.bin/mandoc/roff/string/name.in
+++ b/regress/usr.bin/mandoc/roff/string/name.in
@@ -12,6 +12,8 @@
.ds bl\ e value of bl\e e
norm: \*[norm]
.br
+norm without closing brace: \*[norm
+.br
quot: \*[quot]
.br
"quot": \*["quot"]
diff --git a/regress/usr.bin/mandoc/roff/string/name.out_ascii b/regress/usr.bin/mandoc/roff/string/name.out_ascii
index c21ea71f925..3a6f5ebc8c3 100644
--- a/regress/usr.bin/mandoc/roff/string/name.out_ascii
+++ b/regress/usr.bin/mandoc/roff/string/name.out_ascii
@@ -5,6 +5,7 @@ NNAAMMEE
DDEESSCCRRIIPPTTIIOONN
norm: value of norm
+ norm without closing brace:
quot:
"quot": value of "quot"
bs\\e: value of bs\\e
diff --git a/regress/usr.bin/mandoc/roff/string/name.out_lint b/regress/usr.bin/mandoc/roff/string/name.out_lint
new file mode 100644
index 00000000000..0d9b3c2d0c7
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/string/name.out_lint
@@ -0,0 +1,17 @@
+mandoc: name.in:10:5: ERROR: escaped character not allowed in a name
+mandoc: name.in:12:5: ERROR: escaped character not allowed in a name
+mandoc: name.in:15:29: WARNING: invalid escape sequence: \*[norm
+mandoc: name.in:15:29: WARNING: undefined string, using "": norm
+mandoc: name.in:15:28: WARNING: whitespace at end of input line
+mandoc: name.in:17:7: WARNING: undefined string, using "": quot
+mandoc: name.in:17:6: WARNING: whitespace at end of input line
+mandoc: name.in:25:6: WARNING: undefined string, using "": bse
+mandoc: name.in:25:5: WARNING: whitespace at end of input line
+mandoc: name.in:27:5: WARNING: undefined string, using "": bs
+mandoc: name.in:27:4: WARNING: whitespace at end of input line
+mandoc: name.in:31:7: WARNING: undefined string, using "": bl e
+mandoc: name.in:31:6: WARNING: whitespace at end of input line
+mandoc: name.in:33:6: WARNING: undefined string, using "": ble
+mandoc: name.in:33:5: WARNING: whitespace at end of input line
+mandoc: name.in:35:5: WARNING: undefined string, using "": bl
+mandoc: name.in:35:4: WARNING: whitespace at end of input line