summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-15 19:30:21 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-12-15 19:30:21 +0000
commit3962ec0010304a43d14512a8b79da75485655694 (patch)
treed05b34a3a0c349eea038e76ce0f88596e149de67 /regress
parent41d43cda283dfff21b7d5685cb433805d215733e (diff)
Several improvements to escape sequence handling.
* Add the missing special character \_ (underscore). * Partial implementations of \a (leader character) and \E (uninterpreted escape character). * Parse and ignore \r (reverse line feed). * Add a WARNING message about undefined escape sequences. * Add an UNSUPP message about unsupported escape sequences. * Mark \! and \? (transparent throughput) and \O (suppress output) as unsupported. * Treat the various variants of zero-width spaces as one-byte escape sequences rather than as special characters, to avoid defining bogus forms with square brackets. * For special characters with one-byte names, do not define bogus forms with square brackets, except for \[-], which is valid. * In the form with square brackets, undefined special characters do not fall back to printing the name verbatim, not even for one-byte names. * Starting a special character name with a blank is an error. * Undefined escape sequences never abort formatting of the input string, not even in HTML output mode. * Document the newly handled escapes, and a few that were missing. * Regression tests for most of the above.
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/mandoc/char/accent/Makefile3
-rw-r--r--regress/usr.bin/mandoc/char/accent/nocombine.in14
-rw-r--r--regress/usr.bin/mandoc/char/accent/nocombine.out_ascii6
-rw-r--r--regress/usr.bin/mandoc/char/accent/nocombine.out_lint2
-rw-r--r--regress/usr.bin/mandoc/char/accent/nocombine.out_utf86
-rw-r--r--regress/usr.bin/mandoc/char/space/Makefile5
-rw-r--r--regress/usr.bin/mandoc/char/space/esct-man.in16
-rw-r--r--regress/usr.bin/mandoc/char/space/esct-man.out_ascii6
-rw-r--r--regress/usr.bin/mandoc/char/space/esct-man.out_lint10
-rw-r--r--regress/usr.bin/mandoc/char/space/invalid.in15
-rw-r--r--regress/usr.bin/mandoc/char/space/invalid.out_ascii21
-rw-r--r--regress/usr.bin/mandoc/char/space/invalid.out_lint9
-rw-r--r--regress/usr.bin/mandoc/roff/esc/Makefile7
-rw-r--r--regress/usr.bin/mandoc/roff/esc/O.in15
-rw-r--r--regress/usr.bin/mandoc/roff/esc/O.out_ascii21
-rw-r--r--regress/usr.bin/mandoc/roff/esc/O.out_lint5
-rw-r--r--regress/usr.bin/mandoc/roff/esc/ignore.in20
-rw-r--r--regress/usr.bin/mandoc/roff/esc/ignore.out_ascii19
-rw-r--r--regress/usr.bin/mandoc/roff/esc/ignore.out_lint5
-rw-r--r--regress/usr.bin/mandoc/roff/esc/invalid.in28
-rw-r--r--regress/usr.bin/mandoc/roff/esc/invalid.out_ascii34
-rw-r--r--regress/usr.bin/mandoc/roff/esc/invalid.out_lint43
-rw-r--r--regress/usr.bin/mandoc/roff/esc/one.in20
-rw-r--r--regress/usr.bin/mandoc/roff/esc/one.out_ascii18
-rw-r--r--regress/usr.bin/mandoc/roff/esc/unsupp.in8
-rw-r--r--regress/usr.bin/mandoc/roff/esc/unsupp.out_ascii14
-rw-r--r--regress/usr.bin/mandoc/roff/esc/unsupp.out_lint5
27 files changed, 310 insertions, 65 deletions
diff --git a/regress/usr.bin/mandoc/char/accent/Makefile b/regress/usr.bin/mandoc/char/accent/Makefile
index 4bc149a7b1b..247adaa0fd6 100644
--- a/regress/usr.bin/mandoc/char/accent/Makefile
+++ b/regress/usr.bin/mandoc/char/accent/Makefile
@@ -1,7 +1,8 @@
-# $OpenBSD: Makefile,v 1.1 2014/03/08 18:00:59 schwarze Exp $
+# $OpenBSD: Makefile,v 1.2 2018/12/15 19:30:19 schwarze Exp $
REGRESS_TARGETS = nocombine utf8only combine
SKIP_ASCII = utf8only combine
UTF8_TARGETS = nocombine utf8only combine
+LINT_TARGETS = nocombine
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/char/accent/nocombine.in b/regress/usr.bin/mandoc/char/accent/nocombine.in
index a81d446b5ab..61f2dac4f1c 100644
--- a/regress/usr.bin/mandoc/char/accent/nocombine.in
+++ b/regress/usr.bin/mandoc/char/accent/nocombine.in
@@ -1,17 +1,17 @@
-.\" $OpenBSD: nocombine.in,v 1.2 2017/07/04 14:53:23 schwarze Exp $
-.TH CHAR-ACCENT-NOCOMBINE 1 "March 8, 2014"
+.\" $OpenBSD: nocombine.in,v 1.3 2018/12/15 19:30:19 schwarze Exp $
+.TH CHAR-ACCENT-NOCOMBINE 1 "December 15, 2018"
.SH NAME
\fBchar-accent-nocombine\fR - non-combining accents
.SH DESCRIPTION
bare acute accent: e'e
.br
-escaped acute accent: e\'e
+escaped acute accent: e\'e\[']e
.br
acute accent sequence: e\(aae
.br
bare grave accent: e`e
.br
-escaped grave accent: e\`e
+escaped grave accent: e\`e\[`]e
.br
acute grave sequence: e\(gae
.br
@@ -20,15 +20,15 @@ hungarian umlaut: e\(a"e
.\" XXX This is ridiculous.
.\" XXX groff prints the macron as an underscore in the previous line.
.\" macron: e\(a-e
-.br
+.\" .br
.\" XXX groff doesn't have a dot in ASCII mode, only in UTF-8 mode.
.\" dotted: e\(a.e
-.br
+.\" .br
circumflex: e\(a^e
.br
.\" XXX groff uses a backspace for this one in ASCII mode.
.\" breve: e\(abe
-.br
+.\" .br
cedilla: e\(ace
.br
dieresis: e\(ade
diff --git a/regress/usr.bin/mandoc/char/accent/nocombine.out_ascii b/regress/usr.bin/mandoc/char/accent/nocombine.out_ascii
index bc1cce1549f..0f18ac4a023 100644
--- a/regress/usr.bin/mandoc/char/accent/nocombine.out_ascii
+++ b/regress/usr.bin/mandoc/char/accent/nocombine.out_ascii
@@ -7,10 +7,10 @@ NNAAMMEE
DDEESSCCRRIIPPTTIIOONN
bare acute accent: e'e
- escaped acute accent: e'e
+ escaped acute accent: e'ee
acute accent sequence: e'e
bare grave accent: e`e
- escaped grave accent: e`e
+ escaped grave accent: e`ee
acute grave sequence: e`e
hungarian umlaut: e"e
circumflex: e^e
@@ -25,4 +25,4 @@ DDEESSCCRRIIPPTTIIOONN
-OpenBSD March 8, 2014 CHAR-ACCENT-NOCOMBINE(1)
+OpenBSD December 15, 2018 CHAR-ACCENT-NOCOMBINE(1)
diff --git a/regress/usr.bin/mandoc/char/accent/nocombine.out_lint b/regress/usr.bin/mandoc/char/accent/nocombine.out_lint
new file mode 100644
index 00000000000..c9de4162307
--- /dev/null
+++ b/regress/usr.bin/mandoc/char/accent/nocombine.out_lint
@@ -0,0 +1,2 @@
+mandoc: nocombine.in:8:27: WARNING: invalid escape sequence: \[']
+mandoc: nocombine.in:14:27: WARNING: invalid escape sequence: \[`]
diff --git a/regress/usr.bin/mandoc/char/accent/nocombine.out_utf8 b/regress/usr.bin/mandoc/char/accent/nocombine.out_utf8
index 3aa441a276d..497bf6fd8c2 100644
--- a/regress/usr.bin/mandoc/char/accent/nocombine.out_utf8
+++ b/regress/usr.bin/mandoc/char/accent/nocombine.out_utf8
@@ -7,10 +7,10 @@ NNAAMMEE
DDEESSCCRRIIPPTTIIOONN
bare acute accent: e'e
- escaped acute accent: e´e
+ escaped acute accent: e´ee
acute accent sequence: e´e
bare grave accent: e`e
- escaped grave accent: e`e
+ escaped grave accent: e`ee
acute grave sequence: e`e
hungarian umlaut: e˝e
circumflex: e^e
@@ -25,4 +25,4 @@ DDEESSCCRRIIPPTTIIOONN
-OpenBSD March 8, 2014 CHAR-ACCENT-NOCOMBINE(1)
+OpenBSD December 15, 2018 CHAR-ACCENT-NOCOMBINE(1)
diff --git a/regress/usr.bin/mandoc/char/space/Makefile b/regress/usr.bin/mandoc/char/space/Makefile
index b6095de3df2..1e6ce54e2c9 100644
--- a/regress/usr.bin/mandoc/char/space/Makefile
+++ b/regress/usr.bin/mandoc/char/space/Makefile
@@ -1,13 +1,14 @@
-# $OpenBSD: Makefile,v 1.12 2016/12/07 23:27:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.13 2018/12/15 19:30:19 schwarze Exp $
REGRESS_TARGETS = leading-mdoc leading-man multiple trailing-mdoc zerowidth
REGRESS_TARGETS += eos eos-man break nobreak
REGRESS_TARGETS += tab tab-man esct-mdoc esct-man
+REGRESS_TARGETS += invalid
UTF8_TARGETS = zerowidth
HTML_TARGETS = zerowidth
-LINT_TARGETS = trailing-mdoc tab tab-man esct-mdoc esct-man
+LINT_TARGETS = trailing-mdoc tab tab-man esct-mdoc esct-man invalid
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/char/space/esct-man.in b/regress/usr.bin/mandoc/char/space/esct-man.in
index e7afeefef0f..524155f0e6b 100644
--- a/regress/usr.bin/mandoc/char/space/esct-man.in
+++ b/regress/usr.bin/mandoc/char/space/esct-man.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: esct-man.in,v 1.2 2017/07/04 14:53:23 schwarze Exp $
-.TH SPACE-ESCT-MAN 1 2013-06-20
+.\" $OpenBSD: esct-man.in,v 1.3 2018/12/15 19:30:19 schwarze Exp $
+.TH SPACE-ESCT-MAN 1 "December 15, 2018"
.SH NAME
SPACE-T-MAN \- the t escape sequence in pages with man macros
.SH DESCRIPTION
@@ -9,10 +9,14 @@ single tab
.br
single\tescape-t
.br
+single\aescape-a
+.br
double tab
.br
double\t\tescape-t
.br
+double\a\aescape-a
+.br
\tThis line starts with escape-t and comes close to the right margin.
\tThe next line starts with escape-t as well.
.sp
@@ -20,8 +24,10 @@ In a literal display:
.nf
single tab
single\tescape-t
+single\aescape-a
double tab
double\t\tescape-t
+double\a\aescape-a
.fi
.sp
After the IP macro:
@@ -29,7 +35,13 @@ After the IP macro:
text
.IP single\tescape-t 3n
text
+.\" XXX not implemented
+.\" .IP single\aescape-a 3n
+.\" text
.PP
After font macros:
.br
.B single\ttab
+.\" XXX not implemented
+.\" .br
+.\" .B single\aleader
diff --git a/regress/usr.bin/mandoc/char/space/esct-man.out_ascii b/regress/usr.bin/mandoc/char/space/esct-man.out_ascii
index 29fbabeaeaf..3056cc72dde 100644
--- a/regress/usr.bin/mandoc/char/space/esct-man.out_ascii
+++ b/regress/usr.bin/mandoc/char/space/esct-man.out_ascii
@@ -9,16 +9,20 @@ DDEESSCCRRIIPPTTIIOONN
In plain text:
single tab
singleescape-t
+ singleescape-a
double tab
doubleescape-t
+ doubleescape-a
This line starts with escape-t and comes close to the right margin.
The next line starts with escape-t as well.
In a literal display:
single tab
singleescape-t
+ singleescape-a
double tab
doubleescape-t
+ doubleescape-a
After the IP macro:
@@ -33,4 +37,4 @@ DDEESSCCRRIIPPTTIIOONN
-OpenBSD 2013-06-20 SPACE-ESCT-MAN(1)
+OpenBSD December 15, 2018 SPACE-ESCT-MAN(1)
diff --git a/regress/usr.bin/mandoc/char/space/esct-man.out_lint b/regress/usr.bin/mandoc/char/space/esct-man.out_lint
index c625b3a3ddd..2fa8ba9c410 100644
--- a/regress/usr.bin/mandoc/char/space/esct-man.out_lint
+++ b/regress/usr.bin/mandoc/char/space/esct-man.out_lint
@@ -1,6 +1,6 @@
mandoc: esct-man.in:8:7: WARNING: tab in filled text
-mandoc: esct-man.in:12:7: WARNING: tab in filled text
-mandoc: esct-man.in:12:8: WARNING: tab in filled text
-mandoc: esct-man.in:28:11: WARNING: tab in filled text
-mandoc: esct-man.in:30:11: WARNING: tab in filled text
-mandoc: esct-man.in:35:10: WARNING: tab in filled text
+mandoc: esct-man.in:14:7: WARNING: tab in filled text
+mandoc: esct-man.in:14:8: WARNING: tab in filled text
+mandoc: esct-man.in:34:11: WARNING: tab in filled text
+mandoc: esct-man.in:36:11: WARNING: tab in filled text
+mandoc: esct-man.in:44:10: WARNING: tab in filled text
diff --git a/regress/usr.bin/mandoc/char/space/invalid.in b/regress/usr.bin/mandoc/char/space/invalid.in
new file mode 100644
index 00000000000..0c97d03fae5
--- /dev/null
+++ b/regress/usr.bin/mandoc/char/space/invalid.in
@@ -0,0 +1,15 @@
+.\" $OpenBSD: invalid.in,v 1.1 2018/12/15 19:30:20 schwarze Exp $
+.TH SPACE-INVALID 1 "December 15, 2018"
+.SH NAME
+SPACE-INVALID \- invalid whitespace escape sequences
+.SH DESCRIPTION
+.nf
+blank: a\[hy]b\[ hy]c
+percent: a\%b\[%]c
+ampersand: a\&b\[&]c
+colon: a\:b\[:]c
+caret: a\^b\[^]c
+underline: a\_b\[_]c
+pipe: a\|b\[|]c
+tilde: a\~b\[~]c
+digit-width: a\0b\[0]c
diff --git a/regress/usr.bin/mandoc/char/space/invalid.out_ascii b/regress/usr.bin/mandoc/char/space/invalid.out_ascii
new file mode 100644
index 00000000000..bf3b5a16df1
--- /dev/null
+++ b/regress/usr.bin/mandoc/char/space/invalid.out_ascii
@@ -0,0 +1,21 @@
+SPACE-INVALID(1) General Commands Manual SPACE-INVALID(1)
+
+
+
+NNAAMMEE
+ SPACE-INVALID - invalid whitespace escape sequences
+
+DDEESSCCRRIIPPTTIIOONN
+ blank: a-bhy]c
+ percent: abc
+ ampersand: abc
+ colon: abc
+ caret: abc
+ underline: a_bc
+ pipe: abc
+ tilde: a bc
+ digit-width: a bc
+
+
+
+OpenBSD December 15, 2018 SPACE-INVALID(1)
diff --git a/regress/usr.bin/mandoc/char/space/invalid.out_lint b/regress/usr.bin/mandoc/char/space/invalid.out_lint
new file mode 100644
index 00000000000..c05ef38f1f6
--- /dev/null
+++ b/regress/usr.bin/mandoc/char/space/invalid.out_lint
@@ -0,0 +1,9 @@
+mandoc: invalid.in:7:15: WARNING: invalid escape sequence: \[
+mandoc: invalid.in:8:14: WARNING: invalid escape sequence: \[%]
+mandoc: invalid.in:9:16: WARNING: invalid escape sequence: \[&]
+mandoc: invalid.in:10:12: WARNING: invalid escape sequence: \[:]
+mandoc: invalid.in:11:12: WARNING: invalid escape sequence: \[^]
+mandoc: invalid.in:12:16: WARNING: invalid escape sequence: \[_]
+mandoc: invalid.in:13:11: WARNING: invalid escape sequence: \[|]
+mandoc: invalid.in:14:12: WARNING: invalid escape sequence: \[~]
+mandoc: invalid.in:15:18: WARNING: invalid escape sequence: \[0]
diff --git a/regress/usr.bin/mandoc/roff/esc/Makefile b/regress/usr.bin/mandoc/roff/esc/Makefile
index dd4eb67807a..7d0a753df75 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.13 2017/06/14 18:23:26 schwarze Exp $
+# $OpenBSD: Makefile,v 1.14 2018/12/15 19:30:20 schwarze Exp $
-REGRESS_TARGETS = one two multi B c c_man e f h l o p w z ignore
-LINT_TARGETS = B h l w ignore
+REGRESS_TARGETS = one two multi B c c_man e f h l O o p w z
+REGRESS_TARGETS += ignore invalid unsupp
+LINT_TARGETS = B h l O w ignore invalid unsupp
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/roff/esc/O.in b/regress/usr.bin/mandoc/roff/esc/O.in
new file mode 100644
index 00000000000..adc35d06f09
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/O.in
@@ -0,0 +1,15 @@
+.\" $OpenBSD: O.in,v 1.1 2018/12/15 19:30:20 schwarze Exp $
+.TH ESC-O 1 "December 15, 2018"
+.SH NAME
+esc-O \- escape sequence to suppress output
+.SH DESCRIPTION
+.nf
+O1: a\O1b
+O2: a\O2b
+O3: a\O3b
+O4: a\O4b
+O5: a\O5b
+O52: a\O(52b
+O5n: a\O[5dummy]b
+O6: a\O6b
+O0: a\O0\&\O1b
diff --git a/regress/usr.bin/mandoc/roff/esc/O.out_ascii b/regress/usr.bin/mandoc/roff/esc/O.out_ascii
new file mode 100644
index 00000000000..d2e5668ccb3
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/O.out_ascii
@@ -0,0 +1,21 @@
+ESC-O(1) General Commands Manual ESC-O(1)
+
+
+
+NNAAMMEE
+ esc-O - escape sequence to suppress output
+
+DDEESSCCRRIIPPTTIIOONN
+ O1: ab
+ O2: ab
+ O3: ab
+ O4: ab
+ O5: ab
+ O52: ab
+ O5n: ab
+ O6: ab
+ O0: ab
+
+
+
+OpenBSD December 15, 2018 ESC-O(1)
diff --git a/regress/usr.bin/mandoc/roff/esc/O.out_lint b/regress/usr.bin/mandoc/roff/esc/O.out_lint
new file mode 100644
index 00000000000..ee91008dd88
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/O.out_lint
@@ -0,0 +1,5 @@
+mandoc: O.in:11:6: WARNING: invalid escape sequence: \O5
+mandoc: O.in:12:7: WARNING: invalid escape sequence: \O(52
+mandoc: O.in:13:7: UNSUPP: unsupported escape sequence: \O[5dummy]
+mandoc: O.in:14:6: WARNING: invalid escape sequence: \O6
+mandoc: O.in:15:6: UNSUPP: unsupported escape sequence: \O0
diff --git a/regress/usr.bin/mandoc/roff/esc/ignore.in b/regress/usr.bin/mandoc/roff/esc/ignore.in
index d41be2e1902..cb1a3e12581 100644
--- a/regress/usr.bin/mandoc/roff/esc/ignore.in
+++ b/regress/usr.bin/mandoc/roff/esc/ignore.in
@@ -1,15 +1,13 @@
-.\" $OpenBSD: ignore.in,v 1.3 2017/07/04 14:53:27 schwarze Exp $
-.Dd $Mdocdate: July 4 2017 $
-.Dt ESC-IGNORE 1
-.Os
-.Sh NAME
-.Nm esc-ignore
-.Nd ignored roff escape sequences
-.Sh DESCRIPTION
+.\" $OpenBSD: ignore.in,v 1.4 2018/12/15 19:30:20 schwarze Exp $
+.TH ESC-IGNORE 1 "December 15, 2018"
+.SH NAME
+esc-ignore \- ignored roff escape sequences
+.SH DESCRIPTION
+.nf
+closing parenthesis: a\)b\[)]c
+comma: a\,b\[,]c
+slash: a\/b\[/]c
multiform: a\kxb\k(xyc\k[xyz]d
-.br
quoted: a\R'myreg 0'b\R'myreg \A'y'0'c
-.br
sizes: a\s0b\s(12c\s[123]d\s'123'e\s'1\w'xy'2'f
-.br
signed sizes: a\s-0b\s-(12c\s-[123]d\s-'123'e\s-'1\w'xy'2'f\s-
diff --git a/regress/usr.bin/mandoc/roff/esc/ignore.out_ascii b/regress/usr.bin/mandoc/roff/esc/ignore.out_ascii
index fa16f389ffa..eaee36c0b62 100644
--- a/regress/usr.bin/mandoc/roff/esc/ignore.out_ascii
+++ b/regress/usr.bin/mandoc/roff/esc/ignore.out_ascii
@@ -1,12 +1,19 @@
ESC-IGNORE(1) General Commands Manual ESC-IGNORE(1)
+
+
NNAAMMEE
- eesscc--iiggnnoorree - ignored roff escape sequences
+ esc-ignore - ignored roff escape sequences
DDEESSCCRRIIPPTTIIOONN
- multiform: abcd
- quoted: abc
- sizes: abcdef
- signed sizes: abcdef
+ closing parenthesis: abc
+ comma: abc
+ slash: abc
+ multiform: abcd
+ quoted: abc
+ sizes: abcdef
+ signed sizes: abcdef
+
+
-OpenBSD July 4, 2017 OpenBSD
+OpenBSD December 15, 2018 ESC-IGNORE(1)
diff --git a/regress/usr.bin/mandoc/roff/esc/ignore.out_lint b/regress/usr.bin/mandoc/roff/esc/ignore.out_lint
index 95eba9330bf..0f33c929941 100644
--- a/regress/usr.bin/mandoc/roff/esc/ignore.out_lint
+++ b/regress/usr.bin/mandoc/roff/esc/ignore.out_lint
@@ -1 +1,4 @@
-mandoc: ignore.in:15:60: WARNING: invalid escape sequence: \s-
+mandoc: ignore.in:7:26: WARNING: invalid escape sequence: \[)]
+mandoc: ignore.in:8:12: WARNING: invalid escape sequence: \[,]
+mandoc: ignore.in:9:12: WARNING: invalid escape sequence: \[/]
+mandoc: ignore.in:13:60: WARNING: invalid escape sequence: \s-
diff --git a/regress/usr.bin/mandoc/roff/esc/invalid.in b/regress/usr.bin/mandoc/roff/esc/invalid.in
new file mode 100644
index 00000000000..16d5e60b548
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/invalid.in
@@ -0,0 +1,28 @@
+.\" $OpenBSD: invalid.in,v 1.1 2018/12/15 19:30:20 schwarze Exp $
+.TH ESC-INVALID 1 "December 15, 2018"
+.SH NAME
+esc-invalid \- invalid roff escape sequences
+.SH DESCRIPTION
+.nf
+plus: a\+b\[+]c
+semicolon: a\;b\[;]c
+less than: a\<b\[<]c
+equal to: a\=b\[=]c
+greater than: a\>b\[>]c
+at: a\@b\[@]c
+square bracket: a\]b
+curly braces: a\[{]b\[}]c
+digit: a\1b\[1]c
+G: a\Gb\[G]c
+I: a\Ib\[I]c
+i: a\ib\[i]c
+J: a\Jb\[J]c
+j: a\jb\[j]c
+K: a\Kb\[K]c
+P: a\Pb\[P]c
+Q: a\Qb\[Q]c
+q: a\qb\[q]c
+T: a\Tb\[T]c
+U: a\Ub\[U]c
+W: a\Wb\[W]c
+y: a\yb\[y]c
diff --git a/regress/usr.bin/mandoc/roff/esc/invalid.out_ascii b/regress/usr.bin/mandoc/roff/esc/invalid.out_ascii
new file mode 100644
index 00000000000..24915262984
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/invalid.out_ascii
@@ -0,0 +1,34 @@
+ESC-INVALID(1) General Commands Manual ESC-INVALID(1)
+
+
+
+NNAAMMEE
+ esc-invalid - invalid roff escape sequences
+
+DDEESSCCRRIIPPTTIIOONN
+ plus: a+bc
+ semicolon: a;bc
+ less than: a<bc
+ equal to: a=bc
+ greater than: a>bc
+ at: a@bc
+ square bracket: a]b
+ curly braces: abc
+ digit: a1bc
+ G: aGbc
+ I: aIbc
+ i: aibc
+ J: aJbc
+ j: ajbc
+ K: aKbc
+ P: aPbc
+ Q: aQbc
+ q: aqbc
+ T: aTbc
+ U: aUbc
+ W: aWbc
+ y: aybc
+
+
+
+OpenBSD December 15, 2018 ESC-INVALID(1)
diff --git a/regress/usr.bin/mandoc/roff/esc/invalid.out_lint b/regress/usr.bin/mandoc/roff/esc/invalid.out_lint
new file mode 100644
index 00000000000..a0afa7ae27a
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/invalid.out_lint
@@ -0,0 +1,43 @@
+mandoc: invalid.in:7:11: WARNING: invalid escape sequence: \[+]
+mandoc: invalid.in:7:8: WARNING: undefined escape, printing literally: \+
+mandoc: invalid.in:8:16: WARNING: invalid escape sequence: \[;]
+mandoc: invalid.in:8:13: WARNING: undefined escape, printing literally: \;
+mandoc: invalid.in:9:16: WARNING: invalid escape sequence: \[<]
+mandoc: invalid.in:9:13: WARNING: undefined escape, printing literally: \<
+mandoc: invalid.in:10:15: WARNING: invalid escape sequence: \[=]
+mandoc: invalid.in:10:12: WARNING: undefined escape, printing literally: \=
+mandoc: invalid.in:11:19: WARNING: invalid escape sequence: \[>]
+mandoc: invalid.in:11:16: WARNING: undefined escape, printing literally: \>
+mandoc: invalid.in:12:9: WARNING: invalid escape sequence: \[@]
+mandoc: invalid.in:12:6: WARNING: undefined escape, printing literally: \@
+mandoc: invalid.in:13:18: WARNING: undefined escape, printing literally: \]
+mandoc: invalid.in:14:21: WARNING: invalid escape sequence: \[}]
+mandoc: invalid.in:14:16: WARNING: invalid escape sequence: \[{]
+mandoc: invalid.in:15:12: WARNING: invalid escape sequence: \[1]
+mandoc: invalid.in:15:9: WARNING: undefined escape, printing literally: \1
+mandoc: invalid.in:16:8: WARNING: invalid escape sequence: \[G]
+mandoc: invalid.in:16:5: WARNING: undefined escape, printing literally: \G
+mandoc: invalid.in:17:8: WARNING: invalid escape sequence: \[I]
+mandoc: invalid.in:17:5: WARNING: undefined escape, printing literally: \I
+mandoc: invalid.in:18:8: WARNING: invalid escape sequence: \[i]
+mandoc: invalid.in:18:5: WARNING: undefined escape, printing literally: \i
+mandoc: invalid.in:19:8: WARNING: invalid escape sequence: \[J]
+mandoc: invalid.in:19:5: WARNING: undefined escape, printing literally: \J
+mandoc: invalid.in:20:8: WARNING: invalid escape sequence: \[j]
+mandoc: invalid.in:20:5: WARNING: undefined escape, printing literally: \j
+mandoc: invalid.in:21:8: WARNING: invalid escape sequence: \[K]
+mandoc: invalid.in:21:5: WARNING: undefined escape, printing literally: \K
+mandoc: invalid.in:22:8: WARNING: invalid escape sequence: \[P]
+mandoc: invalid.in:22:5: WARNING: undefined escape, printing literally: \P
+mandoc: invalid.in:23:8: WARNING: invalid escape sequence: \[Q]
+mandoc: invalid.in:23:5: WARNING: undefined escape, printing literally: \Q
+mandoc: invalid.in:24:8: WARNING: invalid escape sequence: \[q]
+mandoc: invalid.in:24:5: WARNING: undefined escape, printing literally: \q
+mandoc: invalid.in:25:8: WARNING: invalid escape sequence: \[T]
+mandoc: invalid.in:25:5: WARNING: undefined escape, printing literally: \T
+mandoc: invalid.in:26:8: WARNING: invalid escape sequence: \[U]
+mandoc: invalid.in:26:5: WARNING: undefined escape, printing literally: \U
+mandoc: invalid.in:27:8: WARNING: invalid escape sequence: \[W]
+mandoc: invalid.in:27:5: WARNING: undefined escape, printing literally: \W
+mandoc: invalid.in:28:8: WARNING: invalid escape sequence: \[y]
+mandoc: invalid.in:28:5: WARNING: undefined escape, printing literally: \y
diff --git a/regress/usr.bin/mandoc/roff/esc/one.in b/regress/usr.bin/mandoc/roff/esc/one.in
index 6edf9f64f2b..57afd697297 100644
--- a/regress/usr.bin/mandoc/roff/esc/one.in
+++ b/regress/usr.bin/mandoc/roff/esc/one.in
@@ -1,17 +1,11 @@
-.\" $OpenBSD: one.in,v 1.3 2017/07/04 14:53:27 schwarze Exp $
-.Dd $Mdocdate: July 4 2017 $
-.Dt ESC-ONE 1
-.Os
-.Sh NAME
-.Nm esc-one
-.Nd roff one-character escape sequences
-.Sh DESCRIPTION
+.\" $OpenBSD: one.in,v 1.4 2018/12/15 19:30:20 schwarze Exp $
+.TH ESC-ONE 1 "December 15, 2018"
+.SH NAME
+esc-one \- roff one-character escape sequences
+.SH DESCRIPTION
+.nf
backslash: >\e<
-.br
-minus: >\-<
-.br
+minus: >\-|\[-]<
acute: >\'<
-.br
grave: >\`<
-.br
normal character: >\q<
diff --git a/regress/usr.bin/mandoc/roff/esc/one.out_ascii b/regress/usr.bin/mandoc/roff/esc/one.out_ascii
index bc88dcf278c..1eb5f1f2685 100644
--- a/regress/usr.bin/mandoc/roff/esc/one.out_ascii
+++ b/regress/usr.bin/mandoc/roff/esc/one.out_ascii
@@ -1,13 +1,17 @@
ESC-ONE(1) General Commands Manual ESC-ONE(1)
+
+
NNAAMMEE
- eesscc--oonnee - roff one-character escape sequences
+ esc-one - roff one-character escape sequences
DDEESSCCRRIIPPTTIIOONN
- backslash: >\<
- minus: >-<
- acute: >'<
- grave: >`<
- normal character: >q<
+ backslash: >\<
+ minus: >-|-<
+ acute: >'<
+ grave: >`<
+ normal character: >q<
+
+
-OpenBSD July 4, 2017 OpenBSD
+OpenBSD December 15, 2018 ESC-ONE(1)
diff --git a/regress/usr.bin/mandoc/roff/esc/unsupp.in b/regress/usr.bin/mandoc/roff/esc/unsupp.in
new file mode 100644
index 00000000000..ec3af618ed3
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/unsupp.in
@@ -0,0 +1,8 @@
+.\" $OpenBSD: unsupp.in,v 1.1 2018/12/15 19:30:20 schwarze Exp $
+.TH ESC-UNSUPP 1 "December 15, 2018"
+.SH NAME
+esc-unsupp \- unsupported escape sequences
+.SH DESCRIPTION
+.nf
+exclamation mark: a\!b\[!]c
+question mark: a\?\&\?b\[?]c
diff --git a/regress/usr.bin/mandoc/roff/esc/unsupp.out_ascii b/regress/usr.bin/mandoc/roff/esc/unsupp.out_ascii
new file mode 100644
index 00000000000..22613e54ff3
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/unsupp.out_ascii
@@ -0,0 +1,14 @@
+ESC-UNSUPP(1) General Commands Manual ESC-UNSUPP(1)
+
+
+
+NNAAMMEE
+ esc-unsupp - unsupported escape sequences
+
+DDEESSCCRRIIPPTTIIOONN
+ exclamation mark: abc
+ question mark: abc
+
+
+
+OpenBSD December 15, 2018 ESC-UNSUPP(1)
diff --git a/regress/usr.bin/mandoc/roff/esc/unsupp.out_lint b/regress/usr.bin/mandoc/roff/esc/unsupp.out_lint
new file mode 100644
index 00000000000..d3cc4bf1077
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/esc/unsupp.out_lint
@@ -0,0 +1,5 @@
+mandoc: unsupp.in:7:23: WARNING: invalid escape sequence: \[!]
+mandoc: unsupp.in:7:20: UNSUPP: unsupported escape sequence: \!
+mandoc: unsupp.in:8:24: WARNING: invalid escape sequence: \[?]
+mandoc: unsupp.in:8:21: UNSUPP: unsupported escape sequence: \?
+mandoc: unsupp.in:8:17: UNSUPP: unsupported escape sequence: \?