aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-08 03:02:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-08 03:02:13 +0000
commitd9f0f81c846a8405c29870e4a8379e5e79d1cad3 (patch)
treec07efd74ac58650949dc67576001a720e688319f /regress
parentcdbb1fca07752eb230e5219c22e9e65075c85b82 (diff)
downloadmandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.tar.gz
mandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.tar.zst
mandoc-d9f0f81c846a8405c29870e4a8379e5e79d1cad3.zip
Finally port the OpenBSD regression suite.
Both kristaps@ and wiz@ repeated asked for this, literally for years.
Diffstat (limited to 'regress')
-rw-r--r--regress/char/Makefile6
-rw-r--r--regress/char/Makefile.inc5
-rw-r--r--regress/char/N/Makefile5
-rw-r--r--regress/char/N/basic.in26
-rw-r--r--regress/char/N/basic.out_ascii21
-rw-r--r--regress/char/accent/Makefile7
-rw-r--r--regress/char/accent/combine.in23
-rw-r--r--regress/char/accent/combine.out_utf817
-rw-r--r--regress/char/accent/nocombine.in45
-rw-r--r--regress/char/accent/nocombine.out_ascii28
-rw-r--r--regress/char/accent/nocombine.out_utf828
-rw-r--r--regress/char/accent/utf8only.in9
-rw-r--r--regress/char/accent/utf8only.out_utf815
-rw-r--r--regress/char/bar/Makefile5
-rw-r--r--regress/char/bar/man.in12
-rw-r--r--regress/char/bar/man.out_ascii21
-rw-r--r--regress/char/bar/mdoc.in37
-rw-r--r--regress/char/bar/mdoc.out_ascii31
-rw-r--r--regress/char/hyphen/Makefile5
-rw-r--r--regress/char/hyphen/man.in11
-rw-r--r--regress/char/hyphen/man.out_ascii20
-rw-r--r--regress/char/hyphen/mdoc.in17
-rw-r--r--regress/char/hyphen/mdoc.out_ascii19
-rw-r--r--regress/char/space/Makefile13
-rw-r--r--regress/char/space/break.in11
-rw-r--r--regress/char/space/break.out_ascii12
-rw-r--r--regress/char/space/eos-man.in22
-rw-r--r--regress/char/space/eos-man.out_ascii26
-rw-r--r--regress/char/space/eos.in27
-rw-r--r--regress/char/space/eos.out_ascii21
-rw-r--r--regress/char/space/esct-man.in34
-rw-r--r--regress/char/space/esct-man.out_ascii36
-rw-r--r--regress/char/space/esct-man.out_lint6
-rw-r--r--regress/char/space/esct-mdoc.in35
-rw-r--r--regress/char/space/esct-mdoc.out_ascii34
-rw-r--r--regress/char/space/esct-mdoc.out_lint3
-rw-r--r--regress/char/space/leading-man.in11
-rw-r--r--regress/char/space/leading-man.out_ascii15
-rw-r--r--regress/char/space/leading-mdoc.in24
-rw-r--r--regress/char/space/leading-mdoc.out_ascii18
-rw-r--r--regress/char/space/multiple.in18
-rw-r--r--regress/char/space/multiple.out_ascii19
-rw-r--r--regress/char/space/nobreak.in30
-rw-r--r--regress/char/space/nobreak.out_ascii34
-rw-r--r--regress/char/space/tab-man.in66
-rw-r--r--regress/char/space/tab-man.out_ascii52
-rw-r--r--regress/char/space/tab-man.out_lint22
-rw-r--r--regress/char/space/tab.in128
-rw-r--r--regress/char/space/tab.out_ascii89
-rw-r--r--regress/char/space/tab.out_lint42
-rw-r--r--regress/char/space/trailing-mdoc.in11
-rw-r--r--regress/char/space/trailing-mdoc.out_ascii9
-rw-r--r--regress/char/space/trailing-mdoc.out_lint3
-rw-r--r--regress/char/space/zerowidth.in12
-rw-r--r--regress/char/space/zerowidth.out_ascii18
-rw-r--r--regress/char/space/zerowidth.out_html6
-rw-r--r--regress/char/space/zerowidth.out_utf818
-rw-r--r--regress/char/unicode/Makefile13
-rw-r--r--regress/char/unicode/ascii.in28
-rw-r--r--regress/char/unicode/ascii.out_ascii34
-rw-r--r--regress/char/unicode/ascii.out_html22
-rw-r--r--regress/char/unicode/ascii.out_utf834
-rw-r--r--regress/char/unicode/input.inbin0 -> 2371 bytes
-rw-r--r--regress/char/unicode/input.out_ascii67
-rw-r--r--regress/char/unicode/input.out_lint81
-rw-r--r--regress/char/unicode/input.out_utf867
-rw-r--r--regress/char/unicode/invalid.in17
-rw-r--r--regress/char/unicode/invalid.out_ascii16
-rw-r--r--regress/char/unicode/invalid.out_html8
-rw-r--r--regress/char/unicode/invalid.out_lint9
-rw-r--r--regress/char/unicode/invalid.out_utf816
-rw-r--r--regress/char/unicode/latin1.in92
-rw-r--r--regress/char/unicode/latin1.out_ascii98
-rw-r--r--regress/char/unicode/latin1.out_html86
-rw-r--r--regress/char/unicode/latin1.out_utf898
-rw-r--r--regress/char/unicode/latin1diff.in19
-rw-r--r--regress/char/unicode/latin1diff.out_ascii25
-rw-r--r--regress/char/unicode/latin1diff.out_html13
-rw-r--r--regress/char/unicode/latin1diff.out_utf825
-rw-r--r--regress/char/unicode/man.in12
-rw-r--r--regress/char/unicode/man.out_utf819
-rw-r--r--regress/char/unicode/mdoc.in15
-rw-r--r--regress/char/unicode/mdoc.out_utf815
-rw-r--r--regress/char/unicode/named.in155
-rw-r--r--regress/char/unicode/named.out_ascii161
-rw-r--r--regress/char/unicode/named.out_html149
-rw-r--r--regress/char/unicode/named.out_utf8161
-rw-r--r--regress/char/unicode/namediff.in43
-rw-r--r--regress/char/unicode/namediff.out_ascii49
-rw-r--r--regress/char/unicode/namediff.out_html37
-rw-r--r--regress/char/unicode/namediff.out_utf849
-rw-r--r--regress/char/unicode/nogroff.in43
-rw-r--r--regress/char/unicode/nogroff.out_ascii49
-rw-r--r--regress/char/unicode/nogroff.out_html37
-rw-r--r--regress/char/unicode/nogroff.out_utf849
-rw-r--r--regress/eqn/Makefile6
-rw-r--r--regress/eqn/Makefile.inc28
-rw-r--r--regress/eqn/define/Makefile6
-rw-r--r--regress/eqn/define/invalid.in36
-rw-r--r--regress/eqn/define/invalid.out_ascii17
-rw-r--r--regress/eqn/define/invalid.out_lint5
-rw-r--r--regress/eqn/fromto/Makefile6
-rw-r--r--regress/eqn/fromto/basic.in12
-rw-r--r--regress/eqn/fromto/basic.out_ascii9
-rw-r--r--regress/eqn/fromto/basic.out_html1
-rw-r--r--regress/eqn/fromto/noarg.in12
-rw-r--r--regress/eqn/fromto/noarg.out_ascii9
-rw-r--r--regress/eqn/fromto/noarg.out_html1
-rw-r--r--regress/eqn/matrix/Makefile6
-rw-r--r--regress/eqn/matrix/basic.in17
-rw-r--r--regress/eqn/matrix/basic.out_ascii9
-rw-r--r--regress/eqn/matrix/basic.out_html1
-rw-r--r--regress/eqn/nullary/Makefile6
-rw-r--r--regress/eqn/nullary/roman.in14
-rw-r--r--regress/eqn/nullary/roman.out_ascii10
-rw-r--r--regress/eqn/nullary/roman.out_html1
-rw-r--r--regress/eqn/over/Makefile7
-rw-r--r--regress/eqn/over/noarg.in12
-rw-r--r--regress/eqn/over/noarg.out_ascii9
-rw-r--r--regress/eqn/over/noarg.out_html1
-rw-r--r--regress/eqn/over/noarg.out_lint1
-rw-r--r--regress/eqn/over/precedence.in12
-rw-r--r--regress/eqn/over/precedence.out_ascii9
-rw-r--r--regress/eqn/over/precedence.out_html1
-rw-r--r--regress/eqn/size/Makefile5
-rw-r--r--regress/eqn/size/basic.in12
-rw-r--r--regress/eqn/size/basic.out_ascii9
-rw-r--r--regress/eqn/subsup/Makefile6
-rw-r--r--regress/eqn/subsup/combine.in12
-rw-r--r--regress/eqn/subsup/combine.out_ascii9
-rw-r--r--regress/eqn/subsup/combine.out_html1
-rw-r--r--regress/eqn/subsup/noarg.in12
-rw-r--r--regress/eqn/subsup/noarg.out_ascii9
-rw-r--r--regress/eqn/subsup/noarg.out_html1
-rw-r--r--regress/eqn/subsup/sub_group.in12
-rw-r--r--regress/eqn/subsup/sub_group.out_ascii9
-rw-r--r--regress/eqn/subsup/sub_group.out_html1
-rw-r--r--regress/eqn/unary/Makefile6
-rw-r--r--regress/eqn/unary/diacrit.in13
-rw-r--r--regress/eqn/unary/diacrit.out_ascii9
-rw-r--r--regress/eqn/unary/diacrit.out_html1
-rw-r--r--regress/eqn/unary/sqrt.in12
-rw-r--r--regress/eqn/unary/sqrt.out_ascii9
-rw-r--r--regress/eqn/unary/sqrt.out_html1
-rw-r--r--regress/man/B/Makefile6
-rw-r--r--regress/man/B/args.in20
-rw-r--r--regress/man/B/args.out_ascii18
-rw-r--r--regress/man/B/args.out_lint1
-rw-r--r--regress/man/BI/Makefile5
-rw-r--r--regress/man/BI/emptyargs.in10
-rw-r--r--regress/man/BI/emptyargs.out_ascii18
-rw-r--r--regress/man/BI/literal.in12
-rw-r--r--regress/man/BI/literal.out_ascii18
-rw-r--r--regress/man/EX/Makefile5
-rw-r--r--regress/man/EX/args.in12
-rw-r--r--regress/man/EX/args.out_ascii16
-rw-r--r--regress/man/EX/nested.in18
-rw-r--r--regress/man/EX/nested.out_ascii19
-rw-r--r--regress/man/EX/spacing.in35
-rw-r--r--regress/man/EX/spacing.out_ascii27
-rw-r--r--regress/man/HP/Makefile5
-rw-r--r--regress/man/HP/break.in10
-rw-r--r--regress/man/HP/break.out_ascii16
-rw-r--r--regress/man/HP/literal.in26
-rw-r--r--regress/man/HP/literal.out_ascii27
-rw-r--r--regress/man/HP/macrotag.in13
-rw-r--r--regress/man/HP/macrotag.out_ascii17
-rw-r--r--regress/man/HP/manyargs.in45
-rw-r--r--regress/man/HP/manyargs.out_ascii43
-rw-r--r--regress/man/HP/spacing.in59
-rw-r--r--regress/man/HP/spacing.out_ascii58
-rw-r--r--regress/man/IP/Makefile6
-rw-r--r--regress/man/IP/empty.in26
-rw-r--r--regress/man/IP/empty.out_ascii26
-rw-r--r--regress/man/IP/empty.out_lint2
-rw-r--r--regress/man/IP/literal.in24
-rw-r--r--regress/man/IP/literal.out_ascii26
-rw-r--r--regress/man/IP/longhead.in10
-rw-r--r--regress/man/IP/longhead.out_ascii19
-rw-r--r--regress/man/IP/manyargs.in39
-rw-r--r--regress/man/IP/manyargs.out_ascii40
-rw-r--r--regress/man/IP/spacing.in31
-rw-r--r--regress/man/IP/spacing.out_ascii41
-rw-r--r--regress/man/IP/width.in78
-rw-r--r--regress/man/IP/width.out_ascii87
-rw-r--r--regress/man/Makefile6
-rw-r--r--regress/man/Makefile.inc5
-rw-r--r--regress/man/OP/Makefile6
-rw-r--r--regress/man/OP/args.in13
-rw-r--r--regress/man/OP/args.out_ascii14
-rw-r--r--regress/man/OP/args.out_lint2
-rw-r--r--regress/man/PD/Makefile6
-rw-r--r--regress/man/PD/args.in28
-rw-r--r--regress/man/PD/args.out_ascii31
-rw-r--r--regress/man/PD/args.out_lint1
-rw-r--r--regress/man/PD/nextline.in42
-rw-r--r--regress/man/PD/nextline.out_ascii33
-rw-r--r--regress/man/PD/spacing.in62
-rw-r--r--regress/man/PD/spacing.out_ascii70
-rw-r--r--regress/man/PP/Makefile6
-rw-r--r--regress/man/PP/args.in11
-rw-r--r--regress/man/PP/args.out_ascii19
-rw-r--r--regress/man/PP/args.out_lint3
-rw-r--r--regress/man/PP/empty.in15
-rw-r--r--regress/man/PP/empty.out_ascii19
-rw-r--r--regress/man/PP/empty.out_lint3
-rw-r--r--regress/man/RS/Makefile7
-rw-r--r--regress/man/RS/REarg.in26
-rw-r--r--regress/man/RS/REarg.out_ascii23
-rw-r--r--regress/man/RS/REarg.out_lint7
-rw-r--r--regress/man/RS/breaking.in23
-rw-r--r--regress/man/RS/breaking.out_ascii21
-rw-r--r--regress/man/RS/broken.in45
-rw-r--r--regress/man/RS/broken.out_ascii41
-rw-r--r--regress/man/RS/empty.in16
-rw-r--r--regress/man/RS/empty.out_ascii16
-rw-r--r--regress/man/RS/empty.out_lint1
-rw-r--r--regress/man/RS/literal.in18
-rw-r--r--regress/man/RS/literal.out_ascii20
-rw-r--r--regress/man/RS/lonelyRE.in21
-rw-r--r--regress/man/RS/lonelyRE.out_ascii23
-rw-r--r--regress/man/RS/lonelyRE.out_lint3
-rw-r--r--regress/man/RS/nested.in54
-rw-r--r--regress/man/RS/nested.out_ascii41
-rw-r--r--regress/man/RS/noRE.in9
-rw-r--r--regress/man/RS/noRE.out_ascii14
-rw-r--r--regress/man/RS/noRE.out_lint1
-rw-r--r--regress/man/RS/nowidth.in20
-rw-r--r--regress/man/RS/nowidth.out_ascii21
-rw-r--r--regress/man/RS/width.in30
-rw-r--r--regress/man/RS/width.out_ascii22
-rw-r--r--regress/man/SH/Makefile16
-rw-r--r--regress/man/SH/broken.in6
-rw-r--r--regress/man/SH/broken.out_ascii13
-rw-r--r--regress/man/SH/broken.out_lint1
-rw-r--r--regress/man/SH/broken_eline.in7
-rw-r--r--regress/man/SH/broken_eline.out_ascii13
-rw-r--r--regress/man/SH/broken_eline.out_lint2
-rw-r--r--regress/man/SH/empty_before.in6
-rw-r--r--regress/man/SH/empty_before.out_ascii13
-rw-r--r--regress/man/SH/empty_before.out_lint1
-rw-r--r--regress/man/SH/longarg.in9
-rw-r--r--regress/man/SH/longarg.out_ascii17
-rw-r--r--regress/man/SH/noarg.in42
-rw-r--r--regress/man/SH/noarg.out_ascii32
-rw-r--r--regress/man/SH/noarg.out_lint13
-rw-r--r--regress/man/SS/Makefile16
-rw-r--r--regress/man/SS/broken.in6
-rw-r--r--regress/man/SS/broken.out_ascii13
-rw-r--r--regress/man/SS/broken.out_lint1
-rw-r--r--regress/man/SS/broken_eline.in7
-rw-r--r--regress/man/SS/broken_eline.out_ascii13
-rw-r--r--regress/man/SS/broken_eline.out_lint2
-rw-r--r--regress/man/SS/longarg.in9
-rw-r--r--regress/man/SS/longarg.out_ascii17
-rw-r--r--regress/man/SS/noarg.in42
-rw-r--r--regress/man/SS/noarg.out_ascii32
-rw-r--r--regress/man/SS/noarg.out_lint13
-rw-r--r--regress/man/TH/Makefile13
-rw-r--r--regress/man/TH/baddate.in5
-rw-r--r--regress/man/TH/baddate.out_ascii13
-rw-r--r--regress/man/TH/baddate.out_lint1
-rw-r--r--regress/man/TH/case.in5
-rw-r--r--regress/man/TH/case.out_ascii13
-rw-r--r--regress/man/TH/case.out_lint1
-rw-r--r--regress/man/TH/emptydate.in5
-rw-r--r--regress/man/TH/emptydate.out_ascii13
-rw-r--r--regress/man/TH/emptydate.out_lint1
-rw-r--r--regress/man/TH/isodate.in5
-rw-r--r--regress/man/TH/isodate.out_ascii13
-rw-r--r--regress/man/TH/longdate.in5
-rw-r--r--regress/man/TH/longdate.out_ascii15
-rw-r--r--regress/man/TH/longdate.out_lint1
-rw-r--r--regress/man/TH/longtit.in5
-rw-r--r--regress/man/TH/longtit.out_ascii15
-rw-r--r--regress/man/TH/longvol.in5
-rw-r--r--regress/man/TH/longvol.out_ascii14
-rw-r--r--regress/man/TH/mdocdate.in5
-rw-r--r--regress/man/TH/mdocdate.out_ascii13
-rw-r--r--regress/man/TH/noTH.in4
-rw-r--r--regress/man/TH/noTH.out_lint2
-rw-r--r--regress/man/TH/noarg.in5
-rw-r--r--regress/man/TH/noarg.out_ascii13
-rw-r--r--regress/man/TH/noarg.out_lint3
-rw-r--r--regress/man/TH/nobody.in1
-rw-r--r--regress/man/TH/nobody.out_ascii5
-rw-r--r--regress/man/TH/nobody.out_lint1
-rw-r--r--regress/man/TH/onearg.in5
-rw-r--r--regress/man/TH/onearg.out_ascii13
-rw-r--r--regress/man/TH/onearg.out_lint2
-rw-r--r--regress/man/TH/onlyyear.in5
-rw-r--r--regress/man/TH/onlyyear.out_ascii13
-rw-r--r--regress/man/TH/sixargs.in5
-rw-r--r--regress/man/TH/sixargs.out_ascii13
-rw-r--r--regress/man/TH/sixargs.out_lint1
-rw-r--r--regress/man/TH/twoargs.in5
-rw-r--r--regress/man/TH/twoargs.out_ascii13
-rw-r--r--regress/man/TH/twoargs.out_lint2
-rw-r--r--regress/man/TP/Makefile14
-rw-r--r--regress/man/TP/badarg.in20
-rw-r--r--regress/man/TP/badarg.out_ascii22
-rw-r--r--regress/man/TP/broken.in13
-rw-r--r--regress/man/TP/broken.out_ascii15
-rw-r--r--regress/man/TP/broken.out_lint1
-rw-r--r--regress/man/TP/double.in40
-rw-r--r--regress/man/TP/double.out_ascii39
-rw-r--r--regress/man/TP/double.out_lint5
-rw-r--r--regress/man/TP/eof.in6
-rw-r--r--regress/man/TP/eof.out_ascii13
-rw-r--r--regress/man/TP/eof.out_lint1
-rw-r--r--regress/man/TP/fill.in16
-rw-r--r--regress/man/TP/fill.out_ascii21
-rw-r--r--regress/man/TP/literal.in26
-rw-r--r--regress/man/TP/literal.out_ascii26
-rw-r--r--regress/man/TP/longhead.in11
-rw-r--r--regress/man/TP/longhead.out_ascii19
-rw-r--r--regress/man/TP/macrotag.in13
-rw-r--r--regress/man/TP/macrotag.out_ascii18
-rw-r--r--regress/man/TP/manyargs.in45
-rw-r--r--regress/man/TP/manyargs.out_ascii40
-rw-r--r--regress/man/TP/sameline.in30
-rw-r--r--regress/man/TP/sameline.out_ascii29
-rw-r--r--regress/man/TP/spacing.in42
-rw-r--r--regress/man/TP/spacing.out_ascii43
-rw-r--r--regress/man/TP/width.in89
-rw-r--r--regress/man/TP/width.out_ascii81
-rw-r--r--regress/man/TS/Makefile22
-rw-r--r--regress/man/TS/break.in33
-rw-r--r--regress/man/TS/break.out_ascii29
-rw-r--r--regress/man/TS/break.out_lint4
-rw-r--r--regress/man/TS/vspace.in48
-rw-r--r--regress/man/TS/vspace.out_ascii42
-rw-r--r--regress/man/UR/Makefile12
-rw-r--r--regress/man/UR/args.in29
-rw-r--r--regress/man/UR/args.out_ascii23
-rw-r--r--regress/man/UR/args.out_lint5
-rw-r--r--regress/man/UR/noUE.in11
-rw-r--r--regress/man/UR/noUE.out_ascii15
-rw-r--r--regress/man/UR/noUE.out_lint2
-rw-r--r--regress/man/blank/Makefile6
-rw-r--r--regress/man/blank/afterSH.in77
-rw-r--r--regress/man/blank/afterSH.out_ascii58
-rw-r--r--regress/man/blank/afterSH.out_lint4
-rw-r--r--regress/man/blank/afterSS.in78
-rw-r--r--regress/man/blank/afterSS.out_ascii60
-rw-r--r--regress/man/blank/afterSS.out_lint4
-rw-r--r--regress/man/blank/line.in86
-rw-r--r--regress/man/blank/line.out_ascii81
-rw-r--r--regress/man/blank/line.out_lint4
-rw-r--r--regress/man/nf/Makefile6
-rw-r--r--regress/man/nf/args.in12
-rw-r--r--regress/man/nf/args.out_ascii16
-rw-r--r--regress/man/nf/args.out_lint2
-rw-r--r--regress/man/nf/dupe.in17
-rw-r--r--regress/man/nf/dupe.out_ascii19
-rw-r--r--regress/man/nf/dupe.out_lint2
-rw-r--r--regress/man/nf/indent.in21
-rw-r--r--regress/man/nf/indent.out_ascii25
-rw-r--r--regress/man/nf/userdef.in21
-rw-r--r--regress/man/nf/userdef.out_ascii19
-rw-r--r--regress/man/nf/vert.in28
-rw-r--r--regress/man/nf/vert.out_ascii24
-rw-r--r--regress/mdoc/Ad/Makefile6
-rw-r--r--regress/mdoc/Ad/font.in10
-rw-r--r--regress/mdoc/Ad/font.out_ascii9
-rw-r--r--regress/mdoc/Ad/noarg.in12
-rw-r--r--regress/mdoc/Ad/noarg.out_ascii9
-rw-r--r--regress/mdoc/Ad/noarg.out_lint1
-rw-r--r--regress/mdoc/An/Makefile6
-rw-r--r--regress/mdoc/An/break.in49
-rw-r--r--regress/mdoc/An/break.out_ascii29
-rw-r--r--regress/mdoc/An/break.out_lint12
-rw-r--r--regress/mdoc/Ap/Makefile5
-rw-r--r--regress/mdoc/Ap/eos.in12
-rw-r--r--regress/mdoc/Ap/eos.out_ascii10
-rw-r--r--regress/mdoc/Ap/middle.in8
-rw-r--r--regress/mdoc/Ap/middle.out_ascii9
-rw-r--r--regress/mdoc/Aq/Makefile6
-rw-r--r--regress/mdoc/Aq/author.in10
-rw-r--r--regress/mdoc/Aq/author.out_ascii13
-rw-r--r--regress/mdoc/Aq/author.out_utf813
-rw-r--r--regress/mdoc/Aq/empty.in14
-rw-r--r--regress/mdoc/Aq/empty.out_ascii9
-rw-r--r--regress/mdoc/Aq/empty.out_utf89
-rw-r--r--regress/mdoc/Ar/Makefile5
-rw-r--r--regress/mdoc/Ar/font.in10
-rw-r--r--regress/mdoc/Ar/font.out_ascii9
-rw-r--r--regress/mdoc/Ar/punct.in39
-rw-r--r--regress/mdoc/Ar/punct.out_ascii12
-rw-r--r--regress/mdoc/At/Makefile6
-rw-r--r--regress/mdoc/At/invalid.in17
-rw-r--r--regress/mdoc/At/invalid.out_ascii15
-rw-r--r--regress/mdoc/At/invalid.out_lint1
-rw-r--r--regress/mdoc/Bd/Makefile25
-rw-r--r--regress/mdoc/Bd/badargs.in51
-rw-r--r--regress/mdoc/Bd/badargs.out_ascii30
-rw-r--r--regress/mdoc/Bd/badargs.out_lint12
-rw-r--r--regress/mdoc/Bd/beforeNAME.in15
-rw-r--r--regress/mdoc/Bd/beforeNAME.out_ascii13
-rw-r--r--regress/mdoc/Bd/beforeNAME.out_lint1
-rw-r--r--regress/mdoc/Bd/blank.in31
-rw-r--r--regress/mdoc/Bd/blank.out_ascii29
-rw-r--r--regress/mdoc/Bd/blank.out_lint8
-rw-r--r--regress/mdoc/Bd/break.in15
-rw-r--r--regress/mdoc/Bd/break.out_ascii12
-rw-r--r--regress/mdoc/Bd/break.out_lint1
-rw-r--r--regress/mdoc/Bd/broken.in14
-rw-r--r--regress/mdoc/Bd/broken.out_ascii11
-rw-r--r--regress/mdoc/Bd/broken.out_lint1
-rw-r--r--regress/mdoc/Bd/centered.in15
-rw-r--r--regress/mdoc/Bd/centered.out_ascii13
-rw-r--r--regress/mdoc/Bd/empty.in20
-rw-r--r--regress/mdoc/Bd/empty.out_ascii17
-rw-r--r--regress/mdoc/Bd/nested.in42
-rw-r--r--regress/mdoc/Bd/nested.out_ascii29
-rw-r--r--regress/mdoc/Bd/nested.out_lint2
-rw-r--r--regress/mdoc/Bd/offset-empty.in31
-rw-r--r--regress/mdoc/Bd/offset-empty.out_ascii23
-rw-r--r--regress/mdoc/Bd/offset-neg.in24
-rw-r--r--regress/mdoc/Bd/offset-neg.out_ascii21
-rw-r--r--regress/mdoc/Bd/spacing.in16
-rw-r--r--regress/mdoc/Bd/spacing.out_ascii14
-rw-r--r--regress/mdoc/Bd/unclosed.in10
-rw-r--r--regress/mdoc/Bd/unclosed.out_ascii11
-rw-r--r--regress/mdoc/Bd/unclosed.out_lint1
-rw-r--r--regress/mdoc/Bf/Makefile16
-rw-r--r--regress/mdoc/Bf/badargs.in20
-rw-r--r--regress/mdoc/Bf/badargs.out_ascii10
-rw-r--r--regress/mdoc/Bf/badargs.out_lint3
-rw-r--r--regress/mdoc/Bf/break.in16
-rw-r--r--regress/mdoc/Bf/break.out_ascii9
-rw-r--r--regress/mdoc/Bf/break.out_lint1
-rw-r--r--regress/mdoc/Bf/broken.in15
-rw-r--r--regress/mdoc/Bf/broken.out_ascii9
-rw-r--r--regress/mdoc/Bf/broken.out_lint1
-rw-r--r--regress/mdoc/Bf/multiargs.in32
-rw-r--r--regress/mdoc/Bf/multiargs.out_ascii11
-rw-r--r--regress/mdoc/Bf/multiargs.out_lint5
-rw-r--r--regress/mdoc/Bf/nest.in33
-rw-r--r--regress/mdoc/Bf/nest.out_ascii11
-rw-r--r--regress/mdoc/Bk/Makefile8
-rw-r--r--regress/mdoc/Bk/badarg.in56
-rw-r--r--regress/mdoc/Bk/badarg.out_ascii25
-rw-r--r--regress/mdoc/Bk/badarg.out_lint6
-rw-r--r--regress/mdoc/Bk/break.in53
-rw-r--r--regress/mdoc/Bk/break.out_ascii30
-rw-r--r--regress/mdoc/Bk/broken.in11
-rw-r--r--regress/mdoc/Bk/broken.out_ascii12
-rw-r--r--regress/mdoc/Bk/broken.out_lint2
-rw-r--r--regress/mdoc/Bk/inputlines.in73
-rw-r--r--regress/mdoc/Bk/inputlines.out_ascii37
-rw-r--r--regress/mdoc/Bk/lines.in88
-rw-r--r--regress/mdoc/Bk/lines.out_ascii84
-rw-r--r--regress/mdoc/Bk/synopsis.in32
-rw-r--r--regress/mdoc/Bk/synopsis.out_ascii27
-rw-r--r--regress/mdoc/Bl/Makefile38
-rw-r--r--regress/mdoc/Bl/badargs.in78
-rw-r--r--regress/mdoc/Bl/badargs.out_ascii43
-rw-r--r--regress/mdoc/Bl/badargs.out_lint18
-rw-r--r--regress/mdoc/Bl/bareIt.in15
-rw-r--r--regress/mdoc/Bl/bareIt.out_ascii12
-rw-r--r--regress/mdoc/Bl/bareIt.out_lint3
-rw-r--r--regress/mdoc/Bl/bareTa.in26
-rw-r--r--regress/mdoc/Bl/bareTa.out_ascii18
-rw-r--r--regress/mdoc/Bl/bareTa.out_lint5
-rw-r--r--regress/mdoc/Bl/break.in77
-rw-r--r--regress/mdoc/Bl/break.out_ascii49
-rw-r--r--regress/mdoc/Bl/break.out_lint18
-rw-r--r--regress/mdoc/Bl/breakingIt.in69
-rw-r--r--regress/mdoc/Bl/breakingIt.out_ascii47
-rw-r--r--regress/mdoc/Bl/breakingIt.out_lint16
-rw-r--r--regress/mdoc/Bl/broken.in28
-rw-r--r--regress/mdoc/Bl/broken.out_ascii19
-rw-r--r--regress/mdoc/Bl/broken.out_lint3
-rw-r--r--regress/mdoc/Bl/bullet.in81
-rw-r--r--regress/mdoc/Bl/bullet.out_ascii67
-rw-r--r--regress/mdoc/Bl/colNoIt.in15
-rw-r--r--regress/mdoc/Bl/colNoIt.out_ascii13
-rw-r--r--regress/mdoc/Bl/column.in105
-rw-r--r--regress/mdoc/Bl/column.out_ascii74
-rw-r--r--regress/mdoc/Bl/column.out_lint4
-rw-r--r--regress/mdoc/Bl/dash.in81
-rw-r--r--regress/mdoc/Bl/dash.out_ascii67
-rw-r--r--regress/mdoc/Bl/dash.out_utf867
-rw-r--r--regress/mdoc/Bl/diag.in54
-rw-r--r--regress/mdoc/Bl/diag.out_ascii39
-rw-r--r--regress/mdoc/Bl/empty.in41
-rw-r--r--regress/mdoc/Bl/empty.out_ascii20
-rw-r--r--regress/mdoc/Bl/empty.out_lint11
-rw-r--r--regress/mdoc/Bl/emptyhead.in43
-rw-r--r--regress/mdoc/Bl/emptyhead.out_ascii38
-rw-r--r--regress/mdoc/Bl/emptyhead.out_lint4
-rw-r--r--regress/mdoc/Bl/emptyitem.in39
-rw-r--r--regress/mdoc/Bl/emptyitem.out_ascii36
-rw-r--r--regress/mdoc/Bl/emptyitem.out_lint8
-rw-r--r--regress/mdoc/Bl/emptytag.in17
-rw-r--r--regress/mdoc/Bl/emptytag.out_ascii16
-rw-r--r--regress/mdoc/Bl/emptytag.out_lint1
-rw-r--r--regress/mdoc/Bl/enum.in81
-rw-r--r--regress/mdoc/Bl/enum.out_ascii67
-rw-r--r--regress/mdoc/Bl/extend.in31
-rw-r--r--regress/mdoc/Bl/extend.out_ascii18
-rw-r--r--regress/mdoc/Bl/hang.in111
-rw-r--r--regress/mdoc/Bl/hang.out_ascii85
-rw-r--r--regress/mdoc/Bl/inset.in48
-rw-r--r--regress/mdoc/Bl/inset.out_ascii37
-rw-r--r--regress/mdoc/Bl/item.in23
-rw-r--r--regress/mdoc/Bl/item.out_ascii16
-rw-r--r--regress/mdoc/Bl/multitag.in47
-rw-r--r--regress/mdoc/Bl/multitag.out_ascii42
-rw-r--r--regress/mdoc/Bl/multitype.in11
-rw-r--r--regress/mdoc/Bl/multitype.out_ascii9
-rw-r--r--regress/mdoc/Bl/nested.in83
-rw-r--r--regress/mdoc/Bl/nested.out_ascii54
-rw-r--r--regress/mdoc/Bl/noIt.in24
-rw-r--r--regress/mdoc/Bl/noIt.out_ascii15
-rw-r--r--regress/mdoc/Bl/noIt.out_lint8
-rw-r--r--regress/mdoc/Bl/notype.in26
-rw-r--r--regress/mdoc/Bl/notype.out_ascii21
-rw-r--r--regress/mdoc/Bl/notype.out_lint5
-rw-r--r--regress/mdoc/Bl/offset.in79
-rw-r--r--regress/mdoc/Bl/offset.out_ascii51
-rw-r--r--regress/mdoc/Bl/ohang.in23
-rw-r--r--regress/mdoc/Bl/ohang.out_ascii22
-rw-r--r--regress/mdoc/Bl/secstart.in39
-rw-r--r--regress/mdoc/Bl/secstart.out_ascii26
-rw-r--r--regress/mdoc/Bl/tag.in154
-rw-r--r--regress/mdoc/Bl/tag.out_ascii134
-rw-r--r--regress/mdoc/Bl/tag.out_lint1
-rw-r--r--regress/mdoc/Bl/unclosed.in12
-rw-r--r--regress/mdoc/Bl/unclosed.out_ascii12
-rw-r--r--regress/mdoc/Brq/Makefile5
-rw-r--r--regress/mdoc/Brq/empty.in14
-rw-r--r--regress/mdoc/Brq/empty.out_ascii9
-rw-r--r--regress/mdoc/Bx/Makefile5
-rw-r--r--regress/mdoc/Bx/args.in26
-rw-r--r--regress/mdoc/Bx/args.out_ascii21
-rw-r--r--regress/mdoc/Cd/Makefile6
-rw-r--r--regress/mdoc/Cd/eos.in10
-rw-r--r--regress/mdoc/Cd/eos.out_ascii9
-rw-r--r--regress/mdoc/Cd/font.in10
-rw-r--r--regress/mdoc/Cd/font.out_ascii9
-rw-r--r--regress/mdoc/Cd/noarg.in12
-rw-r--r--regress/mdoc/Cd/noarg.out_ascii9
-rw-r--r--regress/mdoc/Cd/noarg.out_lint1
-rw-r--r--regress/mdoc/Cm/Makefile6
-rw-r--r--regress/mdoc/Cm/basic.in12
-rw-r--r--regress/mdoc/Cm/basic.out_ascii11
-rw-r--r--regress/mdoc/Cm/font.in10
-rw-r--r--regress/mdoc/Cm/font.out_ascii9
-rw-r--r--regress/mdoc/Cm/noarg.in12
-rw-r--r--regress/mdoc/Cm/noarg.out_ascii11
-rw-r--r--regress/mdoc/Cm/noarg.out_lint2
-rw-r--r--regress/mdoc/D1/Makefile6
-rw-r--r--regress/mdoc/D1/spacing.in12
-rw-r--r--regress/mdoc/D1/spacing.out_ascii12
-rw-r--r--regress/mdoc/D1/spacing.out_lint1
-rw-r--r--regress/mdoc/Db/Makefile6
-rw-r--r--regress/mdoc/Db/args.in14
-rw-r--r--regress/mdoc/Db/args.out_ascii9
-rw-r--r--regress/mdoc/Db/args.out_lint3
-rw-r--r--regress/mdoc/Dd/Makefile19
-rw-r--r--regress/mdoc/Dd/badarg.in8
-rw-r--r--regress/mdoc/Dd/badarg.out_ascii9
-rw-r--r--regress/mdoc/Dd/badarg.out_lint1
-rw-r--r--regress/mdoc/Dd/dupe.in11
-rw-r--r--regress/mdoc/Dd/dupe.out_ascii9
-rw-r--r--regress/mdoc/Dd/dupe.out_lint2
-rw-r--r--regress/mdoc/Dd/late.in9
-rw-r--r--regress/mdoc/Dd/late.out_ascii9
-rw-r--r--regress/mdoc/Dd/late.out_lint1
-rw-r--r--regress/mdoc/Dd/long.in8
-rw-r--r--regress/mdoc/Dd/long.out_ascii11
-rw-r--r--regress/mdoc/Dd/long.out_lint1
-rw-r--r--regress/mdoc/Dd/manarg.in8
-rw-r--r--regress/mdoc/Dd/manarg.out_ascii9
-rw-r--r--regress/mdoc/Dd/manarg.out_lint0
-rw-r--r--regress/mdoc/Dd/noarg.in8
-rw-r--r--regress/mdoc/Dd/noarg.out_lint1
-rw-r--r--regress/mdoc/Dd/order.in8
-rw-r--r--regress/mdoc/Dd/order.out_ascii9
-rw-r--r--regress/mdoc/Dd/order.out_lint1
-rw-r--r--regress/mdoc/Dl/Makefile6
-rw-r--r--regress/mdoc/Dl/spacing.in12
-rw-r--r--regress/mdoc/Dl/spacing.out_ascii12
-rw-r--r--regress/mdoc/Dl/spacing.out_lint1
-rw-r--r--regress/mdoc/Dq/Makefile5
-rw-r--r--regress/mdoc/Dq/empty.in14
-rw-r--r--regress/mdoc/Dq/empty.out_ascii10
-rw-r--r--regress/mdoc/Dt/Makefile20
-rw-r--r--regress/mdoc/Dt/badsec.in8
-rw-r--r--regress/mdoc/Dt/badsec.out_lint1
-rw-r--r--regress/mdoc/Dt/case.in8
-rw-r--r--regress/mdoc/Dt/case.out_ascii9
-rw-r--r--regress/mdoc/Dt/case.out_lint1
-rw-r--r--regress/mdoc/Dt/dupe.in11
-rw-r--r--regress/mdoc/Dt/dupe.out_ascii9
-rw-r--r--regress/mdoc/Dt/dupe.out_lint2
-rw-r--r--regress/mdoc/Dt/fourargs.in8
-rw-r--r--regress/mdoc/Dt/fourargs.out_ascii9
-rw-r--r--regress/mdoc/Dt/fourargs.out_lint1
-rw-r--r--regress/mdoc/Dt/late.in9
-rw-r--r--regress/mdoc/Dt/late.out_ascii9
-rw-r--r--regress/mdoc/Dt/late.out_lint2
-rw-r--r--regress/mdoc/Dt/missing.in7
-rw-r--r--regress/mdoc/Dt/missing.out_ascii9
-rw-r--r--regress/mdoc/Dt/missing.out_lint1
-rw-r--r--regress/mdoc/Dt/noarg.in8
-rw-r--r--regress/mdoc/Dt/noarg.out_ascii9
-rw-r--r--regress/mdoc/Dt/noarg.out_lint2
-rw-r--r--regress/mdoc/Dt/nobody.in3
-rw-r--r--regress/mdoc/Dt/nobody.out_ascii3
-rw-r--r--regress/mdoc/Dt/nobody.out_lint1
-rw-r--r--regress/mdoc/Dt/nosec.in8
-rw-r--r--regress/mdoc/Dt/nosec.out_ascii9
-rw-r--r--regress/mdoc/Dt/nosec.out_lint1
-rw-r--r--regress/mdoc/Dt/order.in8
-rw-r--r--regress/mdoc/Dt/order.out_ascii9
-rw-r--r--regress/mdoc/Dt/order.out_lint1
-rw-r--r--regress/mdoc/Dv/Makefile6
-rw-r--r--regress/mdoc/Dv/font.in13
-rw-r--r--regress/mdoc/Dv/font.out_ascii11
-rw-r--r--regress/mdoc/Dv/noarg.in12
-rw-r--r--regress/mdoc/Dv/noarg.out_ascii9
-rw-r--r--regress/mdoc/Dv/noarg.out_lint1
-rw-r--r--regress/mdoc/Em/Makefile6
-rw-r--r--regress/mdoc/Em/font.in10
-rw-r--r--regress/mdoc/Em/font.out_ascii9
-rw-r--r--regress/mdoc/Em/noarg.in12
-rw-r--r--regress/mdoc/Em/noarg.out_ascii9
-rw-r--r--regress/mdoc/Em/noarg.out_lint1
-rw-r--r--regress/mdoc/Em/punct.in82
-rw-r--r--regress/mdoc/Em/punct.out_ascii26
-rw-r--r--regress/mdoc/Em/punct.out_lint24
-rw-r--r--regress/mdoc/Eo/Makefile11
-rw-r--r--regress/mdoc/Eo/break.in68
-rw-r--r--regress/mdoc/Eo/break.out_ascii11
-rw-r--r--regress/mdoc/Eo/break.out_lint8
-rw-r--r--regress/mdoc/Eo/empty.in51
-rw-r--r--regress/mdoc/Eo/empty.out_ascii13
-rw-r--r--regress/mdoc/Eo/obsolete.in20
-rw-r--r--regress/mdoc/Eo/obsolete.out_ascii14
-rw-r--r--regress/mdoc/Eo/obsolete.out_lint6
-rw-r--r--regress/mdoc/Eo/unclosed.in9
-rw-r--r--regress/mdoc/Eo/unclosed.out_ascii9
-rw-r--r--regress/mdoc/Eo/unclosed.out_lint1
-rw-r--r--regress/mdoc/Er/Makefile6
-rw-r--r--regress/mdoc/Er/font.in10
-rw-r--r--regress/mdoc/Er/font.out_ascii9
-rw-r--r--regress/mdoc/Er/noarg.in12
-rw-r--r--regress/mdoc/Er/noarg.out_ascii9
-rw-r--r--regress/mdoc/Er/noarg.out_lint1
-rw-r--r--regress/mdoc/Ev/Makefile6
-rw-r--r--regress/mdoc/Ev/font.in13
-rw-r--r--regress/mdoc/Ev/font.out_ascii11
-rw-r--r--regress/mdoc/Ev/noarg.in12
-rw-r--r--regress/mdoc/Ev/noarg.out_ascii9
-rw-r--r--regress/mdoc/Ev/noarg.out_lint1
-rw-r--r--regress/mdoc/Ex/Makefile11
-rw-r--r--regress/mdoc/Ex/args.in15
-rw-r--r--regress/mdoc/Ex/args.out_ascii16
-rw-r--r--regress/mdoc/Ex/noname.in15
-rw-r--r--regress/mdoc/Ex/noname.out_ascii16
-rw-r--r--regress/mdoc/Ex/noname.out_lint2
-rw-r--r--regress/mdoc/Ex/nostd.in15
-rw-r--r--regress/mdoc/Ex/nostd.out_ascii16
-rw-r--r--regress/mdoc/Ex/nostd.out_lint3
-rw-r--r--regress/mdoc/Fd/Makefile7
-rw-r--r--regress/mdoc/Fd/break.in26
-rw-r--r--regress/mdoc/Fd/break.out_ascii27
-rw-r--r--regress/mdoc/Fd/empty.in14
-rw-r--r--regress/mdoc/Fd/empty.out_ascii13
-rw-r--r--regress/mdoc/Fd/empty.out_lint2
-rw-r--r--regress/mdoc/Fd/eos.in10
-rw-r--r--regress/mdoc/Fd/eos.out_ascii10
-rw-r--r--regress/mdoc/Fd/font.in10
-rw-r--r--regress/mdoc/Fd/font.out_ascii10
-rw-r--r--regress/mdoc/Fl/Makefile5
-rw-r--r--regress/mdoc/Fl/font.in10
-rw-r--r--regress/mdoc/Fl/font.out_ascii9
-rw-r--r--regress/mdoc/Fl/multiarg.in14
-rw-r--r--regress/mdoc/Fl/multiarg.out_ascii11
-rw-r--r--regress/mdoc/Fl/noarg.in19
-rw-r--r--regress/mdoc/Fl/noarg.out_ascii13
-rw-r--r--regress/mdoc/Fl/parsed.in18
-rw-r--r--regress/mdoc/Fl/parsed.out_ascii17
-rw-r--r--regress/mdoc/Fl/punct.in39
-rw-r--r--regress/mdoc/Fl/punct.out_ascii12
-rw-r--r--regress/mdoc/Fo/Makefile15
-rw-r--r--regress/mdoc/Fo/basic.in24
-rw-r--r--regress/mdoc/Fo/basic.out_ascii16
-rw-r--r--regress/mdoc/Fo/break.in49
-rw-r--r--regress/mdoc/Fo/break.out_ascii48
-rw-r--r--regress/mdoc/Fo/eos.in15
-rw-r--r--regress/mdoc/Fo/eos.out_ascii10
-rw-r--r--regress/mdoc/Fo/font.in19
-rw-r--r--regress/mdoc/Fo/font.out_ascii13
-rw-r--r--regress/mdoc/Fo/noarg.in44
-rw-r--r--regress/mdoc/Fo/noarg.out_ascii12
-rw-r--r--regress/mdoc/Fo/noarg.out_lint10
-rw-r--r--regress/mdoc/Fo/nohead.in13
-rw-r--r--regress/mdoc/Fo/nohead.out_ascii9
-rw-r--r--regress/mdoc/Fo/nohead.out_lint1
-rw-r--r--regress/mdoc/Fo/obsolete.in12
-rw-r--r--regress/mdoc/Fo/obsolete.out_ascii11
-rw-r--r--regress/mdoc/Fo/obsolete.out_lint2
-rw-r--r--regress/mdoc/Fo/punct.in9
-rw-r--r--regress/mdoc/Fo/punct.out_ascii9
-rw-r--r--regress/mdoc/Fo/section.in83
-rw-r--r--regress/mdoc/Fo/section.out_ascii59
-rw-r--r--regress/mdoc/Fo/warn.in13
-rw-r--r--regress/mdoc/Fo/warn.out_ascii13
-rw-r--r--regress/mdoc/Fo/warn.out_lint2
-rw-r--r--regress/mdoc/Ft/Makefile5
-rw-r--r--regress/mdoc/Ft/font.in10
-rw-r--r--regress/mdoc/Ft/font.out_ascii9
-rw-r--r--regress/mdoc/Ic/Makefile6
-rw-r--r--regress/mdoc/Ic/font.in10
-rw-r--r--regress/mdoc/Ic/font.out_ascii9
-rw-r--r--regress/mdoc/Ic/noarg.in12
-rw-r--r--regress/mdoc/Ic/noarg.out_ascii9
-rw-r--r--regress/mdoc/Ic/noarg.out_lint1
-rw-r--r--regress/mdoc/In/Makefile6
-rw-r--r--regress/mdoc/In/break.in26
-rw-r--r--regress/mdoc/In/break.out_ascii26
-rw-r--r--regress/mdoc/In/eos.in10
-rw-r--r--regress/mdoc/In/eos.out_ascii9
-rw-r--r--regress/mdoc/In/font.in10
-rw-r--r--regress/mdoc/In/font.out_ascii9
-rw-r--r--regress/mdoc/In/noarg.in20
-rw-r--r--regress/mdoc/In/noarg.out_ascii18
-rw-r--r--regress/mdoc/In/noarg.out_lint2
-rw-r--r--regress/mdoc/Lb/Makefile6
-rw-r--r--regress/mdoc/Lb/badargs.in10
-rw-r--r--regress/mdoc/Lb/badargs.out_ascii10
-rw-r--r--regress/mdoc/Lb/badargs.out_lint1
-rw-r--r--regress/mdoc/Lb/break.in12
-rw-r--r--regress/mdoc/Lb/break.out_ascii13
-rw-r--r--regress/mdoc/Lb/eos.in10
-rw-r--r--regress/mdoc/Lb/eos.out_ascii9
-rw-r--r--regress/mdoc/Li/Makefile6
-rw-r--r--regress/mdoc/Li/font.in10
-rw-r--r--regress/mdoc/Li/font.out_ascii9
-rw-r--r--regress/mdoc/Li/punct.in83
-rw-r--r--regress/mdoc/Li/punct.out_ascii26
-rw-r--r--regress/mdoc/Li/punct.out_lint24
-rw-r--r--regress/mdoc/Lk/Makefile6
-rw-r--r--regress/mdoc/Lk/font.in10
-rw-r--r--regress/mdoc/Lk/font.out_ascii9
-rw-r--r--regress/mdoc/Lk/link.in16
-rw-r--r--regress/mdoc/Lk/link.out_ascii16
-rw-r--r--regress/mdoc/Lk/noarg.in14
-rw-r--r--regress/mdoc/Lk/noarg.out_ascii10
-rw-r--r--regress/mdoc/Lk/noarg.out_lint1
-rw-r--r--regress/mdoc/Makefile9
-rw-r--r--regress/mdoc/Makefile.inc3
-rw-r--r--regress/mdoc/Ms/Makefile6
-rw-r--r--regress/mdoc/Ms/font.in10
-rw-r--r--regress/mdoc/Ms/font.out_ascii9
-rw-r--r--regress/mdoc/Ms/noarg.in12
-rw-r--r--regress/mdoc/Ms/noarg.out_ascii9
-rw-r--r--regress/mdoc/Ms/noarg.out_lint1
-rw-r--r--regress/mdoc/Mt/Makefile5
-rw-r--r--regress/mdoc/Mt/font.in10
-rw-r--r--regress/mdoc/Mt/font.out_ascii9
-rw-r--r--regress/mdoc/Mt/simple.in12
-rw-r--r--regress/mdoc/Mt/simple.out_ascii11
-rw-r--r--regress/mdoc/Nd/Makefile6
-rw-r--r--regress/mdoc/Nd/broken.in22
-rw-r--r--regress/mdoc/Nd/broken.out_ascii17
-rw-r--r--regress/mdoc/Nd/broken.out_lint6
-rw-r--r--regress/mdoc/Nd/hyph.in11
-rw-r--r--regress/mdoc/Nd/hyph.out_ascii10
-rw-r--r--regress/mdoc/Nd/noarg.in8
-rw-r--r--regress/mdoc/Nd/noarg.out_ascii9
-rw-r--r--regress/mdoc/Nd/noarg.out_lint1
-rw-r--r--regress/mdoc/Nd/par.in15
-rw-r--r--regress/mdoc/Nd/par.out_ascii13
-rw-r--r--regress/mdoc/Nm/Makefile24
-rw-r--r--regress/mdoc/Nm/badNAME.in8
-rw-r--r--regress/mdoc/Nm/badNAME.out_ascii9
-rw-r--r--regress/mdoc/Nm/badNAME.out_lint2
-rw-r--r--regress/mdoc/Nm/badNAMEuse.in9
-rw-r--r--regress/mdoc/Nm/badNAMEuse.out_ascii10
-rw-r--r--regress/mdoc/Nm/badNAMEuse.out_lint2
-rw-r--r--regress/mdoc/Nm/break.in12
-rw-r--r--regress/mdoc/Nm/break.out_ascii12
-rw-r--r--regress/mdoc/Nm/break.out_lint1
-rw-r--r--regress/mdoc/Nm/broken.in10
-rw-r--r--regress/mdoc/Nm/broken.out_ascii11
-rw-r--r--regress/mdoc/Nm/empty.in13
-rw-r--r--regress/mdoc/Nm/empty.out_ascii13
-rw-r--r--regress/mdoc/Nm/emptyNAME.in8
-rw-r--r--regress/mdoc/Nm/emptyNAME.out_ascii9
-rw-r--r--regress/mdoc/Nm/emptyNAMEuse.in9
-rw-r--r--regress/mdoc/Nm/emptyNAMEuse.out_ascii10
-rw-r--r--regress/mdoc/Nm/font.in10
-rw-r--r--regress/mdoc/Nm/font.out_ascii9
-rw-r--r--regress/mdoc/Nm/long.in11
-rw-r--r--regress/mdoc/Nm/long.out_ascii14
-rw-r--r--regress/mdoc/Nm/par.in11
-rw-r--r--regress/mdoc/Nm/par.out_ascii11
-rw-r--r--regress/mdoc/Nm/parns.in23
-rw-r--r--regress/mdoc/Nm/parns.out_ascii17
-rw-r--r--regress/mdoc/Nm/punct.in39
-rw-r--r--regress/mdoc/Nm/punct.out_ascii12
-rw-r--r--regress/mdoc/No/Makefile6
-rw-r--r--regress/mdoc/No/punct.in83
-rw-r--r--regress/mdoc/No/punct.out_ascii26
-rw-r--r--regress/mdoc/No/punct.out_lint24
-rw-r--r--regress/mdoc/No/spacing.in24
-rw-r--r--regress/mdoc/No/spacing.out_ascii11
-rw-r--r--regress/mdoc/Ns/Makefile6
-rw-r--r--regress/mdoc/Ns/position.in29
-rw-r--r--regress/mdoc/Ns/position.out_ascii19
-rw-r--r--regress/mdoc/Ns/position.out_lint1
-rw-r--r--regress/mdoc/Ns/punct.in13
-rw-r--r--regress/mdoc/Ns/punct.out_ascii10
-rw-r--r--regress/mdoc/Oo/Makefile5
-rw-r--r--regress/mdoc/Oo/punct.in23
-rw-r--r--regress/mdoc/Oo/punct.out_ascii13
-rw-r--r--regress/mdoc/Op/Makefile9
-rw-r--r--regress/mdoc/Op/break.in29
-rw-r--r--regress/mdoc/Op/break.out_lint3
-rw-r--r--regress/mdoc/Op/broken.in24
-rw-r--r--regress/mdoc/Op/broken.out_ascii11
-rw-r--r--regress/mdoc/Op/broken.out_lint2
-rw-r--r--regress/mdoc/Op/punct.in31
-rw-r--r--regress/mdoc/Op/punct.out_ascii17
-rw-r--r--regress/mdoc/Os/Makefile7
-rw-r--r--regress/mdoc/Os/dupe.in11
-rw-r--r--regress/mdoc/Os/dupe.out_ascii9
-rw-r--r--regress/mdoc/Os/dupe.out_lint3
-rw-r--r--regress/mdoc/Os/late.in9
-rw-r--r--regress/mdoc/Os/late.out_ascii9
-rw-r--r--regress/mdoc/Os/late.out_lint1
-rw-r--r--regress/mdoc/Os/long.in8
-rw-r--r--regress/mdoc/Os/long.out_ascii11
-rw-r--r--regress/mdoc/Os/missing.in7
-rw-r--r--regress/mdoc/Os/missing.out_ascii9
-rw-r--r--regress/mdoc/Os/missing.out_lint1
-rw-r--r--regress/mdoc/Ox/Makefile5
-rw-r--r--regress/mdoc/Ox/keep.in11
-rw-r--r--regress/mdoc/Ox/keep.out_ascii10
-rw-r--r--regress/mdoc/Pa/Makefile7
-rw-r--r--regress/mdoc/Pa/font.in10
-rw-r--r--regress/mdoc/Pa/font.out_ascii9
-rw-r--r--regress/mdoc/Pa/punct.in39
-rw-r--r--regress/mdoc/Pa/punct.out_ascii11
-rw-r--r--regress/mdoc/Pf/Makefile6
-rw-r--r--regress/mdoc/Pf/spacing.in31
-rw-r--r--regress/mdoc/Pf/spacing.out_ascii15
-rw-r--r--regress/mdoc/Pf/spacing.out_lint3
-rw-r--r--regress/mdoc/Pp/Makefile6
-rw-r--r--regress/mdoc/Pp/arg.in14
-rw-r--r--regress/mdoc/Pp/arg.out_ascii14
-rw-r--r--regress/mdoc/Pp/arg.out_lint3
-rw-r--r--regress/mdoc/Qq/Makefile5
-rw-r--r--regress/mdoc/Qq/empty.in14
-rw-r--r--regress/mdoc/Qq/empty.out_ascii9
-rw-r--r--regress/mdoc/Rs/Makefile11
-rw-r--r--regress/mdoc/Rs/allch.in48
-rw-r--r--regress/mdoc/Rs/allch.out_ascii21
-rw-r--r--regress/mdoc/Rs/allch.out_lint6
-rw-r--r--regress/mdoc/Rs/args.in18
-rw-r--r--regress/mdoc/Rs/args.out_ascii13
-rw-r--r--regress/mdoc/Rs/args.out_lint2
-rw-r--r--regress/mdoc/Rs/break.in27
-rw-r--r--regress/mdoc/Rs/break.out_ascii19
-rw-r--r--regress/mdoc/Rs/empty.in16
-rw-r--r--regress/mdoc/Rs/empty.out_ascii14
-rw-r--r--regress/mdoc/Rs/empty.out_lint2
-rw-r--r--regress/mdoc/Rs/three_authors.in13
-rw-r--r--regress/mdoc/Rs/three_authors.out_ascii9
-rw-r--r--regress/mdoc/Rv/Makefile11
-rw-r--r--regress/mdoc/Rv/args.in15
-rw-r--r--regress/mdoc/Rv/args.out_ascii22
-rw-r--r--regress/mdoc/Rv/noname.in15
-rw-r--r--regress/mdoc/Rv/noname.out_ascii22
-rw-r--r--regress/mdoc/Rv/noname.out_lint1
-rw-r--r--regress/mdoc/Rv/nostd.in15
-rw-r--r--regress/mdoc/Rv/nostd.out_ascii22
-rw-r--r--regress/mdoc/Rv/nostd.out_lint3
-rw-r--r--regress/mdoc/Sh/Makefile11
-rw-r--r--regress/mdoc/Sh/badNAME.in8
-rw-r--r--regress/mdoc/Sh/badNAME.out_ascii9
-rw-r--r--regress/mdoc/Sh/badNAME.out_lint2
-rw-r--r--regress/mdoc/Sh/before.in13
-rw-r--r--regress/mdoc/Sh/before.out_ascii11
-rw-r--r--regress/mdoc/Sh/before.out_lint1
-rw-r--r--regress/mdoc/Sh/empty.in10
-rw-r--r--regress/mdoc/Sh/empty.out_ascii11
-rw-r--r--regress/mdoc/Sh/empty.out_lint1
-rw-r--r--regress/mdoc/Sh/emptyNAME.in6
-rw-r--r--regress/mdoc/Sh/emptyNAME.out_ascii7
-rw-r--r--regress/mdoc/Sh/emptyNAME.out_lint2
-rw-r--r--regress/mdoc/Sh/first.in5
-rw-r--r--regress/mdoc/Sh/first.out_lint1
-rw-r--r--regress/mdoc/Sh/nohead.in12
-rw-r--r--regress/mdoc/Sh/nohead.out_ascii9
-rw-r--r--regress/mdoc/Sh/nohead.out_lint2
-rw-r--r--regress/mdoc/Sh/order.in12
-rw-r--r--regress/mdoc/Sh/order.out_ascii14
-rw-r--r--regress/mdoc/Sh/order.out_lint3
-rw-r--r--regress/mdoc/Sh/orderNAME.in9
-rw-r--r--regress/mdoc/Sh/orderNAME.out_ascii12
-rw-r--r--regress/mdoc/Sh/orderNAME.out_lint2
-rw-r--r--regress/mdoc/Sh/punctNAME.in10
-rw-r--r--regress/mdoc/Sh/punctNAME.out_ascii10
-rw-r--r--regress/mdoc/Sh/punctNAME.out_lint4
-rw-r--r--regress/mdoc/Sh/subbefore.in14
-rw-r--r--regress/mdoc/Sh/subbefore.out_ascii12
-rw-r--r--regress/mdoc/Sh/subbefore.out_lint1
-rw-r--r--regress/mdoc/Sm/Makefile8
-rw-r--r--regress/mdoc/Sm/badarg.in14
-rw-r--r--regress/mdoc/Sm/badarg.out_ascii9
-rw-r--r--regress/mdoc/Sm/badarg.out_lint2
-rw-r--r--regress/mdoc/Sm/noarg.in20
-rw-r--r--regress/mdoc/Sm/noarg.out_ascii11
-rw-r--r--regress/mdoc/Sm/scope.in30
-rw-r--r--regress/mdoc/Sm/scope.out_ascii17
-rw-r--r--regress/mdoc/Sm/spacing-No.in60
-rw-r--r--regress/mdoc/Sm/spacing-No.out_ascii26
-rw-r--r--regress/mdoc/Sm/spacing-Op.in63
-rw-r--r--regress/mdoc/Sm/spacing-Op.out_ascii28
-rw-r--r--regress/mdoc/Sm/twoarg.in21
-rw-r--r--regress/mdoc/Sm/twoarg.out_ascii12
-rw-r--r--regress/mdoc/Sm/twoarg.out_lint1
-rw-r--r--regress/mdoc/Sq/Makefile5
-rw-r--r--regress/mdoc/Sq/empty.in14
-rw-r--r--regress/mdoc/Sq/empty.out_ascii9
-rw-r--r--regress/mdoc/St/Makefile12
-rw-r--r--regress/mdoc/St/badargs.in20
-rw-r--r--regress/mdoc/St/badargs.out_ascii17
-rw-r--r--regress/mdoc/St/badargs.out_lint2
-rw-r--r--regress/mdoc/St/call.in14
-rw-r--r--regress/mdoc/St/call.out_ascii13
-rw-r--r--regress/mdoc/St/call.out_lint1
-rw-r--r--regress/mdoc/Sx/Makefile6
-rw-r--r--regress/mdoc/Sx/font.in10
-rw-r--r--regress/mdoc/Sx/font.out_ascii9
-rw-r--r--regress/mdoc/Sx/noarg.in12
-rw-r--r--regress/mdoc/Sx/noarg.out_ascii9
-rw-r--r--regress/mdoc/Sx/noarg.out_lint1
-rw-r--r--regress/mdoc/Sy/Makefile6
-rw-r--r--regress/mdoc/Sy/font.in10
-rw-r--r--regress/mdoc/Sy/font.out_ascii9
-rw-r--r--regress/mdoc/Sy/noarg.in12
-rw-r--r--regress/mdoc/Sy/noarg.out_ascii9
-rw-r--r--regress/mdoc/Sy/noarg.out_lint1
-rw-r--r--regress/mdoc/Sy/punct.in82
-rw-r--r--regress/mdoc/Sy/punct.out_ascii26
-rw-r--r--regress/mdoc/Sy/punct.out_lint24
-rw-r--r--regress/mdoc/Tn/Makefile6
-rw-r--r--regress/mdoc/Tn/font.in10
-rw-r--r--regress/mdoc/Tn/font.out_ascii9
-rw-r--r--regress/mdoc/Tn/noarg.in12
-rw-r--r--regress/mdoc/Tn/noarg.out_ascii9
-rw-r--r--regress/mdoc/Tn/noarg.out_lint1
-rw-r--r--regress/mdoc/Ud/Makefile6
-rw-r--r--regress/mdoc/Ud/arg.in19
-rw-r--r--regress/mdoc/Ud/arg.out_ascii13
-rw-r--r--regress/mdoc/Ud/arg.out_lint4
-rw-r--r--regress/mdoc/Ux/Makefile5
-rw-r--r--regress/mdoc/Ux/eos.in22
-rw-r--r--regress/mdoc/Ux/eos.out_ascii11
-rw-r--r--regress/mdoc/Ux/spacing.in20
-rw-r--r--regress/mdoc/Ux/spacing.out_ascii11
-rw-r--r--regress/mdoc/Va/Makefile6
-rw-r--r--regress/mdoc/Va/basic.in14
-rw-r--r--regress/mdoc/Va/basic.out_ascii10
-rw-r--r--regress/mdoc/Va/font.in10
-rw-r--r--regress/mdoc/Va/font.out_ascii9
-rw-r--r--regress/mdoc/Va/noarg.in13
-rw-r--r--regress/mdoc/Va/noarg.out_ascii9
-rw-r--r--regress/mdoc/Va/noarg.out_lint1
-rw-r--r--regress/mdoc/Vt/Makefile6
-rw-r--r--regress/mdoc/Vt/child.in15
-rw-r--r--regress/mdoc/Vt/child.out_ascii12
-rw-r--r--regress/mdoc/Vt/font.in10
-rw-r--r--regress/mdoc/Vt/font.out_ascii9
-rw-r--r--regress/mdoc/Vt/noarg.in12
-rw-r--r--regress/mdoc/Vt/noarg.out_ascii9
-rw-r--r--regress/mdoc/Vt/noarg.out_lint1
-rw-r--r--regress/mdoc/Vt/spacing.in16
-rw-r--r--regress/mdoc/Vt/spacing.out_ascii13
-rw-r--r--regress/mdoc/Xr/Makefile6
-rw-r--r--regress/mdoc/Xr/args.in27
-rw-r--r--regress/mdoc/Xr/args.out_ascii16
-rw-r--r--regress/mdoc/Xr/args.out_lint3
-rw-r--r--regress/mdoc/blank/Makefile8
-rw-r--r--regress/mdoc/blank/comment.in15
-rw-r--r--regress/mdoc/blank/comment.out_ascii11
-rw-r--r--regress/mdoc/blank/comment.out_lint1
-rw-r--r--regress/mdoc/blank/line.in90
-rw-r--r--regress/mdoc/blank/line.out_ascii77
-rw-r--r--regress/mdoc/blank/line.out_lint23
-rw-r--r--regress/mdoc/blank/list.in66
-rw-r--r--regress/mdoc/blank/list.out_ascii42
-rw-r--r--regress/mdoc/blank/list.out_lint7
-rw-r--r--regress/mdoc/break/Makefile15
-rw-r--r--regress/mdoc/break/brokenbreaker.in14
-rw-r--r--regress/mdoc/break/brokenbreaker.out_ascii9
-rw-r--r--regress/mdoc/break/brokenbreaker.out_lint3
-rw-r--r--regress/mdoc/break/notopen.in12
-rw-r--r--regress/mdoc/break/notopen.out_ascii9
-rw-r--r--regress/mdoc/break/notopen.out_lint1
-rw-r--r--regress/mdoc/break/tail.in37
-rw-r--r--regress/mdoc/break/tail.out_ascii21
-rw-r--r--regress/mdoc/break/tail.out_lint4
-rw-r--r--regress/mdoc/break/twice.in32
-rw-r--r--regress/mdoc/break/twice.out_ascii15
-rw-r--r--regress/mdoc/break/twice.out_lint8
-rw-r--r--regress/mdoc/break/two.in42
-rw-r--r--regress/mdoc/break/two.out_ascii19
-rw-r--r--regress/mdoc/break/two.out_lint8
-rwxr-xr-xregress/regress.pl347
-rw-r--r--regress/regress.pl.1189
-rw-r--r--regress/roff/Makefile7
-rw-r--r--regress/roff/Makefile.inc5
-rw-r--r--regress/roff/args/Makefile6
-rw-r--r--regress/roff/args/man.in134
-rw-r--r--regress/roff/args/man.out_ascii38
-rw-r--r--regress/roff/args/man.out_lint9
-rw-r--r--regress/roff/args/mdoc.in124
-rw-r--r--regress/roff/args/mdoc.out_ascii34
-rw-r--r--regress/roff/args/mdoc.out_lint13
-rw-r--r--regress/roff/args/roff.in71
-rw-r--r--regress/roff/args/roff.out_ascii43
-rw-r--r--regress/roff/args/roff.out_lint16
-rw-r--r--regress/roff/br/Makefile6
-rw-r--r--regress/roff/br/args.in9
-rw-r--r--regress/roff/br/args.out_ascii14
-rw-r--r--regress/roff/br/args.out_lint1
-rw-r--r--regress/roff/cc/Makefile6
-rw-r--r--regress/roff/cc/basic.in19
-rw-r--r--regress/roff/cc/basic.out_ascii17
-rw-r--r--regress/roff/cc/basic.out_lint1
-rw-r--r--regress/roff/cond/Makefile6
-rw-r--r--regress/roff/cond/before-Dd.in30
-rw-r--r--regress/roff/cond/before-Dd.out_ascii17
-rw-r--r--regress/roff/cond/close.in15
-rw-r--r--regress/roff/cond/close.out_ascii19
-rw-r--r--regress/roff/cond/close.out_lint1
-rw-r--r--regress/roff/cond/ie.in30
-rw-r--r--regress/roff/cond/ie.out_ascii19
-rw-r--r--regress/roff/cond/if.in97
-rw-r--r--regress/roff/cond/if.out_ascii34
-rw-r--r--regress/roff/cond/if.out_lint2
-rw-r--r--regress/roff/cond/numeric.in152
-rw-r--r--regress/roff/cond/numeric.out_ascii41
-rw-r--r--regress/roff/cond/register.in11
-rw-r--r--regress/roff/cond/register.out_ascii14
-rw-r--r--regress/roff/cond/strcmp.in37
-rw-r--r--regress/roff/cond/strcmp.out_ascii18
-rw-r--r--regress/roff/de/Dd.in11
-rw-r--r--regress/roff/de/Dd.out_ascii9
-rw-r--r--regress/roff/de/Makefile44
-rw-r--r--regress/roff/de/TH.in8
-rw-r--r--regress/roff/de/TH.out_ascii13
-rw-r--r--regress/roff/de/append.in25
-rw-r--r--regress/roff/de/append.out_ascii9
-rw-r--r--regress/roff/de/cond.in13
-rw-r--r--regress/roff/de/cond.out_ascii9
-rw-r--r--regress/roff/de/escname.in43
-rw-r--r--regress/roff/de/escname.out_ascii23
-rw-r--r--regress/roff/de/escname.out_lint8
-rw-r--r--regress/roff/de/factorial.in31
-rw-r--r--regress/roff/de/factorial.out_ascii18
-rw-r--r--regress/roff/de/indir.in30
-rw-r--r--regress/roff/de/indir.out_ascii12
-rw-r--r--regress/roff/de/indir.out_lint4
-rw-r--r--regress/roff/de/startde.in24
-rw-r--r--regress/roff/de/startde.out_ascii15
-rw-r--r--regress/roff/ds/Makefile5
-rw-r--r--regress/roff/ds/append.in17
-rw-r--r--regress/roff/ds/append.out_ascii12
-rw-r--r--regress/roff/ds/escname.in14
-rw-r--r--regress/roff/ds/escname.out_ascii11
-rw-r--r--regress/roff/ds/nested.in14
-rw-r--r--regress/roff/ds/nested.out_ascii11
-rw-r--r--regress/roff/ds/quoting.in32
-rw-r--r--regress/roff/ds/quoting.out_ascii17
-rw-r--r--regress/roff/esc/B.in36
-rw-r--r--regress/roff/esc/B.out_ascii23
-rw-r--r--regress/roff/esc/B.out_lint1
-rw-r--r--regress/roff/esc/Makefile6
-rw-r--r--regress/roff/esc/c.in17
-rw-r--r--regress/roff/esc/c.out_ascii11
-rw-r--r--regress/roff/esc/c_man.in12
-rw-r--r--regress/roff/esc/c_man.out_ascii15
-rw-r--r--regress/roff/esc/e.in19
-rw-r--r--regress/roff/esc/e.out_ascii13
-rw-r--r--regress/roff/esc/f.in12
-rw-r--r--regress/roff/esc/f.out_ascii11
-rw-r--r--regress/roff/esc/h.in18
-rw-r--r--regress/roff/esc/h.out_ascii14
-rw-r--r--regress/roff/esc/h.out_lint1
-rw-r--r--regress/roff/esc/ignore.in14
-rw-r--r--regress/roff/esc/ignore.out_ascii12
-rw-r--r--regress/roff/esc/ignore.out_lint1
-rw-r--r--regress/roff/esc/multi.in10
-rw-r--r--regress/roff/esc/multi.out_ascii10
-rw-r--r--regress/roff/esc/o.in18
-rw-r--r--regress/roff/esc/o.out_ascii14
-rw-r--r--regress/roff/esc/one.in16
-rw-r--r--regress/roff/esc/one.out_ascii13
-rw-r--r--regress/roff/esc/two.in75
-rw-r--r--regress/roff/esc/two.out_ascii26
-rw-r--r--regress/roff/esc/w.in16
-rw-r--r--regress/roff/esc/w.out_ascii13
-rw-r--r--regress/roff/esc/w.out_lint1
-rw-r--r--regress/roff/esc/z.in24
-rw-r--r--regress/roff/esc/z.out_ascii16
-rw-r--r--regress/roff/ft/Makefile6
-rw-r--r--regress/roff/ft/badargs.in15
-rw-r--r--regress/roff/ft/badargs.out_ascii13
-rw-r--r--regress/roff/ft/badargs.out_lint2
-rw-r--r--regress/roff/ig/Makefile6
-rw-r--r--regress/roff/ig/basic.in27
-rw-r--r--regress/roff/ig/basic.out_ascii13
-rw-r--r--regress/roff/ig/basic.out_lint3
-rw-r--r--regress/roff/it/Makefile6
-rw-r--r--regress/roff/it/badarg.in17
-rw-r--r--regress/roff/it/badarg.out_ascii9
-rw-r--r--regress/roff/it/badarg.out_lint2
-rw-r--r--regress/roff/it/double.in16
-rw-r--r--regress/roff/it/double.out_ascii13
-rw-r--r--regress/roff/it/text.in27
-rw-r--r--regress/roff/it/text.out_ascii16
-rw-r--r--regress/roff/ll/Makefile7
-rw-r--r--regress/roff/ll/basic.in25
-rw-r--r--regress/roff/ll/basic.out_ascii23
-rw-r--r--regress/roff/na/Makefile5
-rw-r--r--regress/roff/na/args.in9
-rw-r--r--regress/roff/na/args.out_ascii13
-rw-r--r--regress/roff/nr/Makefile6
-rw-r--r--regress/roff/nr/argc.in21
-rw-r--r--regress/roff/nr/argc.out_ascii17
-rw-r--r--regress/roff/nr/divzero.in8
-rw-r--r--regress/roff/nr/divzero.out_ascii13
-rw-r--r--regress/roff/nr/divzero.out_lint2
-rw-r--r--regress/roff/nr/escname.in17
-rw-r--r--regress/roff/nr/escname.out_ascii19
-rw-r--r--regress/roff/nr/escname.out_lint4
-rw-r--r--regress/roff/nr/eval.in67
-rw-r--r--regress/roff/nr/eval.out_ascii33
-rw-r--r--regress/roff/nr/int.in15
-rw-r--r--regress/roff/nr/int.out_ascii15
-rw-r--r--regress/roff/nr/predef.in24
-rw-r--r--regress/roff/nr/predef.out_ascii21
-rw-r--r--regress/roff/nr/rr.in15
-rw-r--r--regress/roff/nr/rr.out_ascii14
-rw-r--r--regress/roff/nr/scale.in26
-rw-r--r--regress/roff/nr/scale.out_ascii13
-rw-r--r--regress/roff/ps/Makefile5
-rw-r--r--regress/roff/ps/ignore.in9
-rw-r--r--regress/roff/ps/ignore.out_ascii13
-rw-r--r--regress/roff/rm/Makefile5
-rw-r--r--regress/roff/rm/basic.in19
-rw-r--r--regress/roff/rm/basic.out_ascii10
-rw-r--r--regress/roff/scale/Makefile5
-rw-r--r--regress/roff/scale/horiz.in31
-rw-r--r--regress/roff/scale/horiz.out_ascii27
-rw-r--r--regress/roff/sp/Makefile6
-rw-r--r--regress/roff/sp/badargs-man.in17
-rw-r--r--regress/roff/sp/badargs-man.out_ascii29
-rw-r--r--regress/roff/sp/badargs-man.out_lint1
-rw-r--r--regress/roff/sp/badargs-mdoc.in20
-rw-r--r--regress/roff/sp/badargs-mdoc.out_ascii25
-rw-r--r--regress/roff/sp/negative.in8
-rw-r--r--regress/roff/sp/negative.out_ascii14
-rw-r--r--regress/roff/sp/scaling-man.in27
-rw-r--r--regress/roff/sp/scaling-man.out_ascii34
-rw-r--r--regress/roff/sp/scaling-mdoc.in30
-rw-r--r--regress/roff/sp/scaling-mdoc.out_ascii30
-rw-r--r--regress/roff/string/Makefile11
-rw-r--r--regress/roff/string/escape.in26
-rw-r--r--regress/roff/string/escape.out_ascii31
-rw-r--r--regress/roff/string/infinite.in8
-rw-r--r--regress/roff/string/infinite.out_ascii13
-rw-r--r--regress/roff/string/name.in35
-rw-r--r--regress/roff/string/name.out_ascii18
-rw-r--r--regress/roff/string/name.out_lint17
-rw-r--r--regress/roff/string/zerolength.in16
-rw-r--r--regress/roff/string/zerolength.out_ascii15
-rw-r--r--regress/roff/tr/Makefile6
-rw-r--r--regress/roff/tr/args.in16
-rw-r--r--regress/roff/tr/args.out_ascii14
-rw-r--r--regress/roff/tr/args.out_lint3
-rw-r--r--regress/tbl/Makefile6
-rw-r--r--regress/tbl/Makefile.inc15
-rw-r--r--regress/tbl/data/Makefile12
-rw-r--r--regress/tbl/data/blankline.in14
-rw-r--r--regress/tbl/data/blankline.out_ascii18
-rw-r--r--regress/tbl/data/block_unclosed.in33
-rw-r--r--regress/tbl/data/block_unclosed.out_ascii27
-rw-r--r--regress/tbl/data/block_unclosed.out_lint2
-rw-r--r--regress/tbl/data/empty.in9
-rw-r--r--regress/tbl/data/empty.out_ascii15
-rw-r--r--regress/tbl/data/empty.out_lint1
-rw-r--r--regress/tbl/layout/Makefile12
-rw-r--r--regress/tbl/layout/center.in22
-rw-r--r--regress/tbl/layout/center.out_ascii22
-rw-r--r--regress/tbl/layout/complex.in37
-rw-r--r--regress/tbl/layout/complex.out_ascii35
-rw-r--r--regress/tbl/layout/complex.out_lint5
-rw-r--r--regress/tbl/layout/empty.in15
-rw-r--r--regress/tbl/layout/empty.out_ascii19
-rw-r--r--regress/tbl/layout/empty.out_lint2
-rw-r--r--regress/tbl/layout/emptyline.in24
-rw-r--r--regress/tbl/layout/emptyline.out_ascii24
-rw-r--r--regress/tbl/layout/numbers.in12
-rw-r--r--regress/tbl/layout/numbers.out_ascii18
-rw-r--r--regress/tbl/layout/span.in40
-rw-r--r--regress/tbl/layout/span.out_ascii33
-rw-r--r--regress/tbl/macro/Makefile12
-rw-r--r--regress/tbl/macro/column.in16
-rw-r--r--regress/tbl/macro/column.out_ascii13
-rw-r--r--regress/tbl/macro/man.in16
-rw-r--r--regress/tbl/macro/man.out_ascii20
-rw-r--r--regress/tbl/macro/man.out_lint2
-rw-r--r--regress/tbl/macro/nested.in16
-rw-r--r--regress/tbl/macro/nested.out_ascii21
-rw-r--r--regress/tbl/macro/nested.out_lint1
-rw-r--r--regress/tbl/mod/Makefile15
-rw-r--r--regress/tbl/mod/badfont.in14
-rw-r--r--regress/tbl/mod/badfont.out_ascii18
-rw-r--r--regress/tbl/mod/badfont.out_lint2
-rw-r--r--regress/tbl/mod/expand.in225
-rw-r--r--regress/tbl/mod/expand.out_ascii101
-rw-r--r--regress/tbl/mod/font.in14
-rw-r--r--regress/tbl/mod/font.out_ascii19
-rw-r--r--regress/tbl/mod/font.out_lint1
-rw-r--r--regress/tbl/mod/misalign.in16
-rw-r--r--regress/tbl/mod/misalign.out_ascii22
-rw-r--r--regress/tbl/opt/Makefile6
-rw-r--r--regress/tbl/opt/box.in39
-rw-r--r--regress/tbl/opt/box.out_ascii37
-rw-r--r--regress/tbl/opt/center.in98
-rw-r--r--regress/tbl/opt/center.out_ascii65
-rw-r--r--regress/tbl/opt/invalid.in19
-rw-r--r--regress/tbl/opt/invalid.out_ascii24
-rw-r--r--regress/tbl/opt/invalid.out_lint5
1244 files changed, 23823 insertions, 0 deletions
diff --git a/regress/char/Makefile b/regress/char/Makefile
new file mode 100644
index 00000000..dbd922e0
--- /dev/null
+++ b/regress/char/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.9 2014/06/20 18:27:51 schwarze Exp $
+
+SUBDIR = accent bar hyphen space unicode N
+
+.include "../Makefile.sub"
+.include <bsd.subdir.mk>
diff --git a/regress/char/Makefile.inc b/regress/char/Makefile.inc
new file mode 100644
index 00000000..6b294ca9
--- /dev/null
+++ b/regress/char/Makefile.inc
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile.inc,v 1.3 2015/02/03 19:37:25 schwarze Exp $
+
+SKIP_TMAN ?= ALL
+
+.include "../Makefile.inc"
diff --git a/regress/char/N/Makefile b/regress/char/N/Makefile
new file mode 100644
index 00000000..3630b154
--- /dev/null
+++ b/regress/char/N/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+
+REGRESS_TARGETS=basic
+
+.include <bsd.regress.mk>
diff --git a/regress/char/N/basic.in b/regress/char/N/basic.in
new file mode 100644
index 00000000..f915c8b7
--- /dev/null
+++ b/regress/char/N/basic.in
@@ -0,0 +1,26 @@
+.TH N-BASIC 1 "January 29, 2011" OpenBSD
+.SH NAME
+N-basic \- basic handling of character number escapes
+.SH DESCRIPTION
+basic usage: x\N'65'x
+.br
+too large: x\N'259'x
+.br
+much too large: x\N'2259'x
+.br
+.\" XXX mandoc ignores non-printable characters, while groff does not
+.\" too small: x\N'1'x
+.\" .br
+.\" null: x\N'0'x
+.\" .br
+non-numerical content: x\N'XX'x
+.br
+mixed content: x\N'65XX'x
+.br
+empty: x\N''x
+.br
+no quoting: x\N665x
+.br
+non-matching quoting characters: x\NX65Yx
+.br
+end of test document
diff --git a/regress/char/N/basic.out_ascii b/regress/char/N/basic.out_ascii
new file mode 100644
index 00000000..87c53449
--- /dev/null
+++ b/regress/char/N/basic.out_ascii
@@ -0,0 +1,21 @@
+N-BASIC(1) General Commands Manual N-BASIC(1)
+
+
+
+NNAAMMEE
+ N-basic - basic handling of character number escapes
+
+DDEESSCCRRIIPPTTIIOONN
+ basic usage: xAx
+ too large: xx
+ much too large: xx
+ non-numerical content: xX'x
+ mixed content: xAX'x
+ empty: xx
+ no quoting: x65x
+ non-matching quoting characters: xAx
+ end of test document
+
+
+
+OpenBSD January 29, 2011 N-BASIC(1)
diff --git a/regress/char/accent/Makefile b/regress/char/accent/Makefile
new file mode 100644
index 00000000..4bc149a7
--- /dev/null
+++ b/regress/char/accent/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.1 2014/03/08 18:00:59 schwarze Exp $
+
+REGRESS_TARGETS = nocombine utf8only combine
+SKIP_ASCII = utf8only combine
+UTF8_TARGETS = nocombine utf8only combine
+
+.include <bsd.regress.mk>
diff --git a/regress/char/accent/combine.in b/regress/char/accent/combine.in
new file mode 100644
index 00000000..124d82d5
--- /dev/null
+++ b/regress/char/accent/combine.in
@@ -0,0 +1,23 @@
+.TH CHAR-ACCENT-COMBINE 1 "February 28, 2014" OpenBSD
+.SH NAME
+\fBchar-accent-combine\fR - combining accents
+.SH DESCRIPTION
+char + combine char U: e\U'0301'
+.br
+char + combine char C: e\C'u0301'
+.br
+char + combine char named: e\[u0301]
+.\" XXX not implemented in mandoc
+.\" .br
+.\" combined chars named numeric: \[u0065_0301]
+.\" .br
+.\" combined chars named: \[e aa]
+.br
+combined char pre N: \['e]
+.br
+combined char pre 2: \('e
+.\" XXX Plan 9 roff only
+.\" .br
+.\" combined char post N: \[e']
+.\" .br
+.\" combined char post 2: \(e'
diff --git a/regress/char/accent/combine.out_utf8 b/regress/char/accent/combine.out_utf8
new file mode 100644
index 00000000..f5c0c2e7
--- /dev/null
+++ b/regress/char/accent/combine.out_utf8
@@ -0,0 +1,17 @@
+CHAR-ACCENT-COMBINE(1) General Commands Manual CHAR-ACCENT-COMBINE(1)
+
+
+
+NNAAMMEE
+ cchhaarr--aacccceenntt--ccoommbbiinnee - combining accents
+
+DDEESSCCRRIIPPTTIIOONN
+ char + combine char U: eU'0301'
+ char + combine char C: é
+ char + combine char named: é
+ combined char pre N: é
+ combined char pre 2: é
+
+
+
+OpenBSD February 28, 2014 CHAR-ACCENT-COMBINE(1)
diff --git a/regress/char/accent/nocombine.in b/regress/char/accent/nocombine.in
new file mode 100644
index 00000000..39428f76
--- /dev/null
+++ b/regress/char/accent/nocombine.in
@@ -0,0 +1,45 @@
+.TH CHAR-ACCENT-NOCOMBINE 1 "March 8, 2014" OpenBSD
+.SH NAME
+\fBchar-accent-nocombine\fR - non-combining accents
+.SH DESCRIPTION
+bare acute accent: e'e
+.br
+escaped acute accent: e\'e
+.br
+acute accent sequence: e\(aae
+.br
+bare grave accent: e`e
+.br
+escaped grave accent: e\`e
+.br
+acute grave sequence: e\(gae
+.br
+hungarian umlaut: e\(a"e
+.br
+.\" XXX This is ridiculous.
+.\" XXX groff prints the macron as an underscore in the previous line.
+.\" macron: e\(a-e
+.br
+.\" XXX groff doesn't have a dot in ASCII mode, only in UTF-8 mode.
+.\" dotted: e\(a.e
+.br
+circumflex: e\(a^e
+.br
+.\" XXX groff uses a backspace for this one in ASCII mode.
+.\" breve: e\(abe
+.br
+cedilla: e\(ace
+.br
+dieresis: e\(ade
+.br
+caron: e\(ahe
+.br
+ring: e\(aoe
+.br
+tilde: e\(a~e
+.br
+ogonek: e\(hoe
+.br
+text hat: e\(hae
+.br
+text tilde: e\(tie
diff --git a/regress/char/accent/nocombine.out_ascii b/regress/char/accent/nocombine.out_ascii
new file mode 100644
index 00000000..bc1cce15
--- /dev/null
+++ b/regress/char/accent/nocombine.out_ascii
@@ -0,0 +1,28 @@
+CHAR-ACCENT-NOCOMBINE(1) General Commands Manual CHAR-ACCENT-NOCOMBINE(1)
+
+
+
+NNAAMMEE
+ cchhaarr--aacccceenntt--nnooccoommbbiinnee - non-combining accents
+
+DDEESSCCRRIIPPTTIIOONN
+ bare acute accent: e'e
+ escaped acute accent: e'e
+ acute accent sequence: e'e
+ bare grave accent: e`e
+ escaped grave accent: e`e
+ acute grave sequence: e`e
+ hungarian umlaut: e"e
+ circumflex: e^e
+ cedilla: e,e
+ dieresis: e"e
+ caron: eve
+ ring: eoe
+ tilde: e~e
+ ogonek: e,e
+ text hat: e^e
+ text tilde: e~e
+
+
+
+OpenBSD March 8, 2014 CHAR-ACCENT-NOCOMBINE(1)
diff --git a/regress/char/accent/nocombine.out_utf8 b/regress/char/accent/nocombine.out_utf8
new file mode 100644
index 00000000..3aa441a2
--- /dev/null
+++ b/regress/char/accent/nocombine.out_utf8
@@ -0,0 +1,28 @@
+CHAR-ACCENT-NOCOMBINE(1) General Commands Manual CHAR-ACCENT-NOCOMBINE(1)
+
+
+
+NNAAMMEE
+ cchhaarr--aacccceenntt--nnooccoommbbiinnee - non-combining accents
+
+DDEESSCCRRIIPPTTIIOONN
+ bare acute accent: e'e
+ escaped acute accent: e´e
+ acute accent sequence: e´e
+ bare grave accent: e`e
+ escaped grave accent: e`e
+ acute grave sequence: e`e
+ hungarian umlaut: e˝e
+ circumflex: e^e
+ cedilla: e¸e
+ dieresis: e¨e
+ caron: eˇe
+ ring: e˚e
+ tilde: e~e
+ ogonek: e˛e
+ text hat: e^e
+ text tilde: e~e
+
+
+
+OpenBSD March 8, 2014 CHAR-ACCENT-NOCOMBINE(1)
diff --git a/regress/char/accent/utf8only.in b/regress/char/accent/utf8only.in
new file mode 100644
index 00000000..8c7d2ca0
--- /dev/null
+++ b/regress/char/accent/utf8only.in
@@ -0,0 +1,9 @@
+.TH CHAR-ACCENT-UTF8ONLY 1 "March 8, 2014" OpenBSD
+.SH NAME
+\fBchar-accent-utf8only\fR - accents available in UTF-8 only
+.SH DESCRIPTION
+macron: e\(a-e
+.br
+dotted: e\(a.e
+.br
+breve: e\(abe
diff --git a/regress/char/accent/utf8only.out_utf8 b/regress/char/accent/utf8only.out_utf8
new file mode 100644
index 00000000..7488f7e1
--- /dev/null
+++ b/regress/char/accent/utf8only.out_utf8
@@ -0,0 +1,15 @@
+CHAR-ACCENT-UTF8ONLY(1) General Commands Manual CHAR-ACCENT-UTF8ONLY(1)
+
+
+
+NNAAMMEE
+ cchhaarr--aacccceenntt--uuttff88oonnllyy - accents available in UTF-8 only
+
+DDEESSCCRRIIPPTTIIOONN
+ macron: e¯e
+ dotted: e˙e
+ breve: e˘e
+
+
+
+OpenBSD March 8, 2014 CHAR-ACCENT-UTF8ONLY(1)
diff --git a/regress/char/bar/Makefile b/regress/char/bar/Makefile
new file mode 100644
index 00000000..0245631c
--- /dev/null
+++ b/regress/char/bar/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2012/07/18 10:36:20 schwarze Exp $
+
+REGRESS_TARGETS = man mdoc
+
+.include <bsd.regress.mk>
diff --git a/regress/char/bar/man.in b/regress/char/bar/man.in
new file mode 100644
index 00000000..acabf501
--- /dev/null
+++ b/regress/char/bar/man.in
@@ -0,0 +1,12 @@
+.TH bar-man 1 "July 17, 2012" OpenBSD
+.SH NAME
+\fBbar-man\fR - formatting the vertical bar symbol
+.SH DESCRIPTION
+.SS normal bar
+Manually switching fonts: \fIitalic\fRroman|roman\fPitalic
+.PP
+.B prefix | suffix
+.SS special character
+Manually switching fonts: \fIitalic\fRroman\(baroman\fPitalic
+.PP
+.B prefix \(ba suffix
diff --git a/regress/char/bar/man.out_ascii b/regress/char/bar/man.out_ascii
new file mode 100644
index 00000000..b18c089e
--- /dev/null
+++ b/regress/char/bar/man.out_ascii
@@ -0,0 +1,21 @@
+bar-man(1) General Commands Manual bar-man(1)
+
+
+
+NNAAMMEE
+ bbaarr--mmaann - formatting the vertical bar symbol
+
+DDEESSCCRRIIPPTTIIOONN
+ nnoorrmmaall bbaarr
+ Manually switching fonts: _i_t_a_l_i_croman|roman_i_t_a_l_i_c
+
+ pprreeffiixx || ssuuffffiixx
+
+ ssppeecciiaall cchhaarraacctteerr
+ Manually switching fonts: _i_t_a_l_i_croman|roman_i_t_a_l_i_c
+
+ pprreeffiixx || ssuuffffiixx
+
+
+
+OpenBSD July 17, 2012 bar-man(1)
diff --git a/regress/char/bar/mdoc.in b/regress/char/bar/mdoc.in
new file mode 100644
index 00000000..5e9afa0a
--- /dev/null
+++ b/regress/char/bar/mdoc.in
@@ -0,0 +1,37 @@
+.Dd July 17, 2012
+.Dt BAR-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm bar-mdoc
+.Nd formatting the vertical bar symbol
+.Sh DESCRIPTION
+.Ss normal bar
+Manually switching fonts: \fIitalic\fRroman|roman\fPitalic\fR
+.Pp
+.Fl isolated | em|bedded \fR|\fP formatted
+.br
+.Sy isolated | em|bedded \fR|\fP formatted
+.br
+.Ar isolated | em|bedded \fR|\fP formatted
+.br
+.Em isolated | em|bedded \fR|\fP formatted
+.Ss special character
+Manually switching fonts: \fIitalic\fRroman\(baroman\fPitalic\fR
+.Pp
+.Fl isolated \(ba em\(babedded \fR\(ba\fP formatted \fB\(ba\fP bold
+.br
+.Sy isolated \(ba em\(babedded \fR\(ba\fP formatted \fB\(ba\fP bold
+.br
+.Ar isolated \(ba em\(babedded \fR\(ba\fP formatted \fB\(ba\fP bold
+.br
+.Em isolated \(ba em\(babedded \fR\(ba\fP formatted \fB\(ba\fP bold
+.Ss predefined string
+Manually switching fonts: \fIitalic\fRroman\*(Baroman\fPbroken\fR
+.Pp
+.Fl isolated \*(Ba em\*(Babedded
+.br
+.Sy isolated \*(Ba em\*(Babedded
+.br
+.Ar isolated \*(Ba em\*(Babedded
+.br
+.Em isolated \*(Ba em\*(Babedded
diff --git a/regress/char/bar/mdoc.out_ascii b/regress/char/bar/mdoc.out_ascii
new file mode 100644
index 00000000..8d98160a
--- /dev/null
+++ b/regress/char/bar/mdoc.out_ascii
@@ -0,0 +1,31 @@
+BAR-MDOC(1) General Commands Manual BAR-MDOC(1)
+
+NNAAMMEE
+ bbaarr--mmddoocc - formatting the vertical bar symbol
+
+DDEESSCCRRIIPPTTIIOONN
+ nnoorrmmaall bbaarr
+ Manually switching fonts: _i_t_a_l_i_croman|roman_i_t_a_l_i_c
+
+ --iissoollaatteedd | --eemm||bbeeddddeedd | --ffoorrmmaatttteedd
+ iissoollaatteedd | eemm||bbeeddddeedd | ffoorrmmaatttteedd
+ _i_s_o_l_a_t_e_d | _e_m_|_b_e_d_d_e_d | _f_o_r_m_a_t_t_e_d
+ _i_s_o_l_a_t_e_d | _e_m_|_b_e_d_d_e_d | _f_o_r_m_a_t_t_e_d
+
+ ssppeecciiaall cchhaarraacctteerr
+ Manually switching fonts: _i_t_a_l_i_croman|roman_i_t_a_l_i_c
+
+ --iissoollaatteedd --|| --eemm||bbeeddddeedd --| --ffoorrmmaatttteedd --|| --bboolldd
+ iissoollaatteedd || eemm||bbeeddddeedd | ffoorrmmaatttteedd || bboolldd
+ _i_s_o_l_a_t_e_d _| _e_m_|_b_e_d_d_e_d | _f_o_r_m_a_t_t_e_d || _b_o_l_d
+ _i_s_o_l_a_t_e_d _| _e_m_|_b_e_d_d_e_d | _f_o_r_m_a_t_t_e_d || _b_o_l_d
+
+ pprreeddeeffiinneedd ssttrriinngg
+ Manually switching fonts: _i_t_a_l_i_croman|romanbroken
+
+ --iissoollaatteedd | --eemm|bbeeddddeedd
+ iissoollaatteedd | eemm|bbeeddddeedd
+ _i_s_o_l_a_t_e_d | _e_m|_b_e_d_d_e_d
+ _i_s_o_l_a_t_e_d | _e_m|_b_e_d_d_e_d
+
+OpenBSD July 17, 2012 OpenBSD
diff --git a/regress/char/hyphen/Makefile b/regress/char/hyphen/Makefile
new file mode 100644
index 00000000..6f9638a3
--- /dev/null
+++ b/regress/char/hyphen/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+
+REGRESS_TARGETS=man mdoc
+
+.include <bsd.regress.mk>
diff --git a/regress/char/hyphen/man.in b/regress/char/hyphen/man.in
new file mode 100644
index 00000000..546c7c56
--- /dev/null
+++ b/regress/char/hyphen/man.in
@@ -0,0 +1,11 @@
+.TH hyphen-man 1 "September 18, 2011" OpenBSD
+.SH NAME
+\fBhyphen-man\fR - formatting hyphens and breaking lines
+.SH DESCRIPTION
+This is a long line of text, such that the last word won't fit: break-here
+.PP
+Try the same thing once same again, but now in italic font mode:
+\fIbreak-here\fP
+.PP
+Finally, try it a third time, but this time in bold font mode:
+\fBbreak-here\fP
diff --git a/regress/char/hyphen/man.out_ascii b/regress/char/hyphen/man.out_ascii
new file mode 100644
index 00000000..368edbb5
--- /dev/null
+++ b/regress/char/hyphen/man.out_ascii
@@ -0,0 +1,20 @@
+hyphen-man(1) General Commands Manual hyphen-man(1)
+
+
+
+NNAAMMEE
+ hhyypphheenn--mmaann - formatting hyphens and breaking lines
+
+DDEESSCCRRIIPPTTIIOONN
+ This is a long line of text, such that the last word won't fit: break-
+ here
+
+ Try the same thing once same again, but now in italic font mode: _b_r_e_a_k_-
+ _h_e_r_e
+
+ Finally, try it a third time, but this time in bold font mode: bbrreeaakk--
+ hheerree
+
+
+
+OpenBSD September 18, 2011 hyphen-man(1)
diff --git a/regress/char/hyphen/mdoc.in b/regress/char/hyphen/mdoc.in
new file mode 100644
index 00000000..76cfd0d3
--- /dev/null
+++ b/regress/char/hyphen/mdoc.in
@@ -0,0 +1,17 @@
+.Dd February 22, 2014
+.Dt HYPHEN-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm hyphen-mdoc
+.Nd formatting hyphens and breaking lines
+.Sh DESCRIPTION
+This is a long line of text, such that the last word won't fit: break-here
+.Pp
+But do not break the line at hyphens inside macro arguments: no
+.No break-here
+.Pp
+Try the same thing once same again, but now in italic font mode:
+\fIbreak-here\fP
+.Pp
+And finally, try it a third time, but this time in bold font mode:
+\fBbreak-here\fP
diff --git a/regress/char/hyphen/mdoc.out_ascii b/regress/char/hyphen/mdoc.out_ascii
new file mode 100644
index 00000000..d1171156
--- /dev/null
+++ b/regress/char/hyphen/mdoc.out_ascii
@@ -0,0 +1,19 @@
+HYPHEN-MDOC(1) General Commands Manual HYPHEN-MDOC(1)
+
+NNAAMMEE
+ hhyypphheenn--mmddoocc - formatting hyphens and breaking lines
+
+DDEESSCCRRIIPPTTIIOONN
+ This is a long line of text, such that the last word won't fit: break-
+ here
+
+ But do not break the line at hyphens inside macro arguments: no
+ break-here
+
+ Try the same thing once same again, but now in italic font mode: _b_r_e_a_k_-
+ _h_e_r_e
+
+ And finally, try it a third time, but this time in bold font mode: bbrreeaakk--
+ hheerree
+
+OpenBSD February 22, 2014 OpenBSD
diff --git a/regress/char/space/Makefile b/regress/char/space/Makefile
new file mode 100644
index 00000000..b6095de3
--- /dev/null
+++ b/regress/char/space/Makefile
@@ -0,0 +1,13 @@
+# $OpenBSD: Makefile,v 1.12 2016/12/07 23:27:42 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
+
+UTF8_TARGETS = zerowidth
+
+HTML_TARGETS = zerowidth
+
+LINT_TARGETS = trailing-mdoc tab tab-man esct-mdoc esct-man
+
+.include <bsd.regress.mk>
diff --git a/regress/char/space/break.in b/regress/char/space/break.in
new file mode 100644
index 00000000..f82fd01b
--- /dev/null
+++ b/regress/char/space/break.in
@@ -0,0 +1,11 @@
+.Dd January 8, 2014
+.Dt CHAR-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm char-break
+.Nd optional line-break
+.Sh DESCRIPTION
+.Dl cons25,linux,rxvt,rxvt-unicode,\:sun,\:vt100,\:vt220,\:\
+wsvt25,\:xterm,\:xterm-color
+.Pp
+end of text
diff --git a/regress/char/space/break.out_ascii b/regress/char/space/break.out_ascii
new file mode 100644
index 00000000..f03c7eec
--- /dev/null
+++ b/regress/char/space/break.out_ascii
@@ -0,0 +1,12 @@
+CHAR-BREAK(1) General Commands Manual CHAR-BREAK(1)
+
+NNAAMMEE
+ cchhaarr--bbrreeaakk - optional line-break
+
+DDEESSCCRRIIPPTTIIOONN
+ cons25,linux,rxvt,rxvt-unicode,sun,vt100,vt220,wsvt25,xterm,
+ xterm-color
+
+ end of text
+
+OpenBSD January 8, 2014 OpenBSD
diff --git a/regress/char/space/eos-man.in b/regress/char/space/eos-man.in
new file mode 100644
index 00000000..48f8a984
--- /dev/null
+++ b/regress/char/space/eos-man.in
@@ -0,0 +1,22 @@
+.TH SPACE-EOS-MAN 1 "December 22, 2013" OpenBSD
+.SH NAME
+SPACE-EOS-MAN \- end-of-sentence spacing in man(7) documents
+.SH DESCRIPTION
+This is a sentence.
+There is a double space before the next one.
+.PP
+Here is a full stop
+.B at the end of a macro.
+It causes a double space, too.
+.PP
+She said: "Here is another sentence."
+And it was detected even with quotation marks.
+(Really.)
+And within parantheses.
+.PP
+A dot in parantheses (.) is not a full stop.
+.PP
+A dot in the middle of an input line . is not a full stop.
+.PP
+At the end of an input line, even an escaped dot \&.
+is regarded as a full stop.
diff --git a/regress/char/space/eos-man.out_ascii b/regress/char/space/eos-man.out_ascii
new file mode 100644
index 00000000..3f4a652c
--- /dev/null
+++ b/regress/char/space/eos-man.out_ascii
@@ -0,0 +1,26 @@
+SPACE-EOS-MAN(1) General Commands Manual SPACE-EOS-MAN(1)
+
+
+
+NNAAMMEE
+ SPACE-EOS-MAN - end-of-sentence spacing in man(7) documents
+
+DDEESSCCRRIIPPTTIIOONN
+ This is a sentence. There is a double space before the next one.
+
+ Here is a full stop aatt tthhee eenndd ooff aa mmaaccrroo.. It causes a double space,
+ too.
+
+ She said: "Here is another sentence." And it was detected even with
+ quotation marks. (Really.) And within parantheses.
+
+ A dot in parantheses (.) is not a full stop.
+
+ A dot in the middle of an input line . is not a full stop.
+
+ At the end of an input line, even an escaped dot . is regarded as a
+ full stop.
+
+
+
+OpenBSD December 22, 2013 SPACE-EOS-MAN(1)
diff --git a/regress/char/space/eos.in b/regress/char/space/eos.in
new file mode 100644
index 00000000..2b5ae698
--- /dev/null
+++ b/regress/char/space/eos.in
@@ -0,0 +1,27 @@
+.Dd December 30, 2013
+.Dt SPACE-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm space-eos
+.Nd end-of-sentence spacing
+.Sh DESCRIPTION
+This is a sentence.
+There is a double space before the next one.
+.Pp
+Here is a full stop
+.Pq quite lonely .
+It causes a double space, too.
+.Pp
+A dot in parantheses (.) is not a full stop.
+Not even
+.Pq Like in this case.
+when preceded by a letter.
+.Pp
+A lonely dot in an enclosure
+.Pq \&.
+is not a full stop.
+.Pp
+A dot in the middle of an input line . is not a full stop.
+.Pp
+At the end of an input line, even an escaped dot \&.
+is regarded as a full stop.
diff --git a/regress/char/space/eos.out_ascii b/regress/char/space/eos.out_ascii
new file mode 100644
index 00000000..1a5bd493
--- /dev/null
+++ b/regress/char/space/eos.out_ascii
@@ -0,0 +1,21 @@
+SPACE-EOS(1) General Commands Manual SPACE-EOS(1)
+
+NNAAMMEE
+ ssppaaccee--eeooss - end-of-sentence spacing
+
+DDEESSCCRRIIPPTTIIOONN
+ This is a sentence. There is a double space before the next one.
+
+ Here is a full stop (quite lonely). It causes a double space, too.
+
+ A dot in parantheses (.) is not a full stop. Not even (Like in this
+ case.) when preceded by a letter.
+
+ A lonely dot in an enclosure (.) is not a full stop.
+
+ A dot in the middle of an input line . is not a full stop.
+
+ At the end of an input line, even an escaped dot . is regarded as a full
+ stop.
+
+OpenBSD December 30, 2013 OpenBSD
diff --git a/regress/char/space/esct-man.in b/regress/char/space/esct-man.in
new file mode 100644
index 00000000..90aed2c7
--- /dev/null
+++ b/regress/char/space/esct-man.in
@@ -0,0 +1,34 @@
+.TH SPACE-ESCT-MAN 1 2013-06-20 OpenBSD
+.SH NAME
+SPACE-T-MAN \- the t escape sequence in pages with man macros
+.SH DESCRIPTION
+In plain text:
+.br
+single tab
+.br
+single\tescape-t
+.br
+double tab
+.br
+double\t\tescape-t
+.br
+\tThis line starts with escape-t and comes close to the right margin.
+\tThe next line starts with escape-t as well.
+.sp
+In a literal display:
+.nf
+single tab
+single\tescape-t
+double tab
+double\t\tescape-t
+.fi
+.sp
+After the IP macro:
+.IP single tab 3n
+text
+.IP single\tescape-t 3n
+text
+.PP
+After font macros:
+.br
+.B single\ttab
diff --git a/regress/char/space/esct-man.out_ascii b/regress/char/space/esct-man.out_ascii
new file mode 100644
index 00000000..29fbabea
--- /dev/null
+++ b/regress/char/space/esct-man.out_ascii
@@ -0,0 +1,36 @@
+SPACE-ESCT-MAN(1) General Commands Manual SPACE-ESCT-MAN(1)
+
+
+
+NNAAMMEE
+ SPACE-T-MAN - the t escape sequence in pages with man macros
+
+DDEESSCCRRIIPPTTIIOONN
+ In plain text:
+ single tab
+ singleescape-t
+ double tab
+ doubleescape-t
+ 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
+ double tab
+ doubleescape-t
+
+ After the IP macro:
+
+ single tab
+ text
+
+ single escape-t
+ text
+
+ After font macros:
+ ssiinnggllee ttaabb
+
+
+
+OpenBSD 2013-06-20 SPACE-ESCT-MAN(1)
diff --git a/regress/char/space/esct-man.out_lint b/regress/char/space/esct-man.out_lint
new file mode 100644
index 00000000..815b68fb
--- /dev/null
+++ b/regress/char/space/esct-man.out_lint
@@ -0,0 +1,6 @@
+mandoc: esct-man.in:7:7: WARNING: tab in filled text
+mandoc: esct-man.in:11:7: WARNING: tab in filled text
+mandoc: esct-man.in:11:8: WARNING: tab in filled text
+mandoc: esct-man.in:27:11: WARNING: tab in filled text
+mandoc: esct-man.in:29:11: WARNING: tab in filled text
+mandoc: esct-man.in:34:10: WARNING: tab in filled text
diff --git a/regress/char/space/esct-mdoc.in b/regress/char/space/esct-mdoc.in
new file mode 100644
index 00000000..9d6b385d
--- /dev/null
+++ b/regress/char/space/esct-mdoc.in
@@ -0,0 +1,35 @@
+.Dd $Mdocdate: February 8 2017 $
+.Dt SPACE-ESCT-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm space-esct-mdoc
+.Nd the t escape sequence in pages with mdoc macros
+.Sh DESCRIPTION
+In plain text:
+.Pp
+single tab
+.Pp
+single\tescape-t
+.Pp
+double tab
+.Pp
+double\t\tescape-t
+.Pp
+\tThis line starts with escape-t and comes close to the right margin.
+\tThe next line starts with escape-t as well.
+.Pp
+In an unfilled display:
+.Bd -unfilled -offset 3n
+single tab
+single\tescape-t
+double tab
+double\t\tescape-t
+.Ed
+.Pp
+In a literal display:
+.Bd -literal -offset 3n
+single tab
+single\tescape-t
+double tab
+double\t\tescape-t
+.Ed
diff --git a/regress/char/space/esct-mdoc.out_ascii b/regress/char/space/esct-mdoc.out_ascii
new file mode 100644
index 00000000..9b09325e
--- /dev/null
+++ b/regress/char/space/esct-mdoc.out_ascii
@@ -0,0 +1,34 @@
+SPACE-ESCT-MDOC(1) General Commands Manual SPACE-ESCT-MDOC(1)
+
+NNAAMMEE
+ ssppaaccee--eesscctt--mmddoocc - the t escape sequence in pages with mdoc macros
+
+DDEESSCCRRIIPPTTIIOONN
+ In plain text:
+
+ single tab
+
+ singleescape-t
+
+ double tab
+
+ doubleescape-t
+
+ This line starts with escape-t and comes close to the right margin. The
+ next line starts with escape-t as well.
+
+ In an unfilled display:
+
+ single tab
+ singleescape-t
+ double tab
+ doubleescape-t
+
+ In a literal display:
+
+ single tab
+ singleescape-t
+ double tab
+ doubleescape-t
+
+OpenBSD June 20, 2013 OpenBSD
diff --git a/regress/char/space/esct-mdoc.out_lint b/regress/char/space/esct-mdoc.out_lint
new file mode 100644
index 00000000..85b9799f
--- /dev/null
+++ b/regress/char/space/esct-mdoc.out_lint
@@ -0,0 +1,3 @@
+mandoc: esct-mdoc.in:10:7: WARNING: tab in filled text
+mandoc: esct-mdoc.in:14:7: WARNING: tab in filled text
+mandoc: esct-mdoc.in:14:8: WARNING: tab in filled text
diff --git a/regress/char/space/leading-man.in b/regress/char/space/leading-man.in
new file mode 100644
index 00000000..6d48f3be
--- /dev/null
+++ b/regress/char/space/leading-man.in
@@ -0,0 +1,11 @@
+.TH SPACE-LEADING-MAN 1 "January 15, 2011" OpenBSD
+.SH NAME
+space-leading-man \- leading spaces on text lines in man documents
+.SH DESCRIPTION
+normal line of text
+second normal line
+ leading space
+.BI bold italic
+normal after macro
+.BI bold italic
+ leading space after a macro line
diff --git a/regress/char/space/leading-man.out_ascii b/regress/char/space/leading-man.out_ascii
new file mode 100644
index 00000000..fa75ea2f
--- /dev/null
+++ b/regress/char/space/leading-man.out_ascii
@@ -0,0 +1,15 @@
+SPACE-LEADING-MAN(1) General Commands Manual SPACE-LEADING-MAN(1)
+
+
+
+NNAAMMEE
+ space-leading-man - leading spaces on text lines in man documents
+
+DDEESSCCRRIIPPTTIIOONN
+ normal line of text second normal line
+ leading space bboolldd_i_t_a_l_i_c normal after macro bboolldd_i_t_a_l_i_c
+ leading space after a macro line
+
+
+
+OpenBSD January 15, 2011 SPACE-LEADING-MAN(1)
diff --git a/regress/char/space/leading-mdoc.in b/regress/char/space/leading-mdoc.in
new file mode 100644
index 00000000..912b9000
--- /dev/null
+++ b/regress/char/space/leading-mdoc.in
@@ -0,0 +1,24 @@
+.Dd January 15, 2011
+.Dt SPACE-LEADING_MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm space-leading-mdoc
+.Nd leading spaces on text lines in mdoc documents
+.Sh DESCRIPTION
+normal line of text
+second normal line
+ line with a leading space
+.Ux
+normal line after a macro line
+.Ux
+ leading space after a macro line
+.Bd -literal
+normal line in a literal display
+ leading space in a literal display
+another normal line
+.Ed
+.Bd -filled
+normal line in a filled display
+ leading space in a filled display
+another normal line
+.Ed
diff --git a/regress/char/space/leading-mdoc.out_ascii b/regress/char/space/leading-mdoc.out_ascii
new file mode 100644
index 00000000..91ef3f36
--- /dev/null
+++ b/regress/char/space/leading-mdoc.out_ascii
@@ -0,0 +1,18 @@
+SPACE-LEADING_MDOC(1) General Commands Manual SPACE-LEADING_MDOC(1)
+
+NNAAMMEE
+ ssppaaccee--lleeaaddiinngg--mmddoocc - leading spaces on text lines in mdoc documents
+
+DDEESSCCRRIIPPTTIIOONN
+ normal line of text second normal line
+ line with a leading space UNIX normal line after a macro line UNIX
+ leading space after a macro line
+
+ normal line in a literal display
+ leading space in a literal display
+ another normal line
+
+ normal line in a filled display
+ leading space in a filled display another normal line
+
+OpenBSD January 15, 2011 OpenBSD
diff --git a/regress/char/space/multiple.in b/regress/char/space/multiple.in
new file mode 100644
index 00000000..47037269
--- /dev/null
+++ b/regress/char/space/multiple.in
@@ -0,0 +1,18 @@
+.Dd April 23, 2010
+.Dt SPACE-MULTIPLE 1
+.Os OpenBSD
+.Sh NAME
+.Nm space-multiple
+.Nd handling of multiple adjacent space characters
+.Sh DESCRIPTION
+one space here
+.Pp
+two spaces here
+.Pp
+three spaces here
+.Pp
+one non-collapsing space here
+.Pp
+two non-collapsing spaces\ \ here
+.Pp
+three non-collapsing spaces\ \ \ here
diff --git a/regress/char/space/multiple.out_ascii b/regress/char/space/multiple.out_ascii
new file mode 100644
index 00000000..945cd260
--- /dev/null
+++ b/regress/char/space/multiple.out_ascii
@@ -0,0 +1,19 @@
+SPACE-MULTIPLE(1) General Commands Manual SPACE-MULTIPLE(1)
+
+NNAAMMEE
+ ssppaaccee--mmuullttiippllee - handling of multiple adjacent space characters
+
+DDEESSCCRRIIPPTTIIOONN
+ one space here
+
+ two spaces here
+
+ three spaces here
+
+ one non-collapsing space here
+
+ two non-collapsing spaces here
+
+ three non-collapsing spaces here
+
+OpenBSD April 23, 2010 OpenBSD
diff --git a/regress/char/space/nobreak.in b/regress/char/space/nobreak.in
new file mode 100644
index 00000000..20bd19bd
--- /dev/null
+++ b/regress/char/space/nobreak.in
@@ -0,0 +1,30 @@
+.Dd July 29, 2012
+.Dt SPACE-NOBREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm space-nobreak
+.Nd non-breaking, non-collapsing space
+.Sh DESCRIPTION
+The following line has 78 characters and fits:
+.Pp
+78 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x
+.Pp
+The following line has 79 characters and breaks:
+.Pp
+79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x
+.Pp
+With a non-breaking space, it breaks earlier:
+.Pp
+79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x\~x
+.Pp
+The same with backslash-space:
+.Pp
+79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x\ x
+.Pp
+Only non-breaking spaces:
+.Pp
+79\~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\~x\~x
+.Pp
+The same with backslash-space:
+.Pp
+79\ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ x\ x
diff --git a/regress/char/space/nobreak.out_ascii b/regress/char/space/nobreak.out_ascii
new file mode 100644
index 00000000..5544c77e
--- /dev/null
+++ b/regress/char/space/nobreak.out_ascii
@@ -0,0 +1,34 @@
+SPACE-NOBREAK(1) General Commands Manual SPACE-NOBREAK(1)
+
+NNAAMMEE
+ ssppaaccee--nnoobbrreeaakk - non-breaking, non-collapsing space
+
+DDEESSCCRRIIPPTTIIOONN
+ The following line has 78 characters and fits:
+
+ 78 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x
+
+ The following line has 79 characters and breaks:
+
+ 79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x
+ x
+
+ With a non-breaking space, it breaks earlier:
+
+ 79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ x x
+
+ The same with backslash-space:
+
+ 79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ x x
+
+ Only non-breaking spaces:
+
+ 79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x
+
+ The same with backslash-space:
+
+ 79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x
+
+OpenBSD July 29, 2012 OpenBSD
diff --git a/regress/char/space/tab-man.in b/regress/char/space/tab-man.in
new file mode 100644
index 00000000..a3645fd2
--- /dev/null
+++ b/regress/char/space/tab-man.in
@@ -0,0 +1,66 @@
+.TH SPACE-TAB-MAN 1 "May 24, 2010" OpenBSD
+.SH NAME
+SPACE-TAB-MAN \- handling of literal tab characters
+.SH DESCRIPTION
+In plain text:
+.br
+1 x
+.br
+22 x
+.br
+333 x
+.br
+4444 x
+.br
+55555 x
+.br
+666666 x
+.br
+7777777 x
+.br
+88888888 x
+.br
+999999999 x
+.br
+aaaaaaaaaa x
+.br
+bbbbbbbbbbb x
+.br
+cccccccccccc x
+.br
+ddddddddddddd x
+.br
+tab space
+.br
+tab tab
+.br
+space tab
+.br
+ tab
+.br
+ tab
+.br
+ This line starts with a tab and comes close to the right margin.
+ The next line starts with a tab as well.
+.br
+In a literal display:
+.nf
+1 x
+22 x
+333 x
+4444 x
+55555 x
+666666 x
+7777777 x
+88888888 x
+999999999 x
+aaaaaaaaaa x
+bbbbbbbbbbb x
+cccccccccccc x
+ddddddddddddd x
+tab space
+tab tab
+space tab
+ tab
+ tab
+.fi
diff --git a/regress/char/space/tab-man.out_ascii b/regress/char/space/tab-man.out_ascii
new file mode 100644
index 00000000..9e5309af
--- /dev/null
+++ b/regress/char/space/tab-man.out_ascii
@@ -0,0 +1,52 @@
+SPACE-TAB-MAN(1) General Commands Manual SPACE-TAB-MAN(1)
+
+
+
+NNAAMMEE
+ SPACE-TAB-MAN - handling of literal tab characters
+
+DDEESSCCRRIIPPTTIIOONN
+ In plain text:
+ 1 x
+ 22 x
+ 333 x
+ 4444 x
+ 55555 x
+ 666666 x
+ 7777777 x
+ 88888888 x
+ 999999999 x
+ aaaaaaaaaa x
+ bbbbbbbbbbb x
+ cccccccccccc x
+ ddddddddddddd x
+ tab space
+ tab tab
+ space tab
+ tab
+ tab
+ This line starts with a tab and comes close to the right margin.
+ The next line starts with a tab as well.
+ In a literal display:
+ 1 x
+ 22 x
+ 333 x
+ 4444 x
+ 55555 x
+ 666666 x
+ 7777777 x
+ 88888888 x
+ 999999999 x
+ aaaaaaaaaa x
+ bbbbbbbbbbb x
+ cccccccccccc x
+ ddddddddddddd x
+ tab space
+ tab tab
+ space tab
+ tab
+ tab
+
+
+
+OpenBSD May 24, 2010 SPACE-TAB-MAN(1)
diff --git a/regress/char/space/tab-man.out_lint b/regress/char/space/tab-man.out_lint
new file mode 100644
index 00000000..a5796e1b
--- /dev/null
+++ b/regress/char/space/tab-man.out_lint
@@ -0,0 +1,22 @@
+mandoc: tab-man.in:7:2: WARNING: tab in filled text
+mandoc: tab-man.in:9:3: WARNING: tab in filled text
+mandoc: tab-man.in:11:4: WARNING: tab in filled text
+mandoc: tab-man.in:13:5: WARNING: tab in filled text
+mandoc: tab-man.in:15:6: WARNING: tab in filled text
+mandoc: tab-man.in:17:7: WARNING: tab in filled text
+mandoc: tab-man.in:19:8: WARNING: tab in filled text
+mandoc: tab-man.in:21:9: WARNING: tab in filled text
+mandoc: tab-man.in:23:10: WARNING: tab in filled text
+mandoc: tab-man.in:25:11: WARNING: tab in filled text
+mandoc: tab-man.in:27:12: WARNING: tab in filled text
+mandoc: tab-man.in:29:13: WARNING: tab in filled text
+mandoc: tab-man.in:31:14: WARNING: tab in filled text
+mandoc: tab-man.in:33:4: WARNING: tab in filled text
+mandoc: tab-man.in:35:4: WARNING: tab in filled text
+mandoc: tab-man.in:35:5: WARNING: tab in filled text
+mandoc: tab-man.in:37:7: WARNING: tab in filled text
+mandoc: tab-man.in:39:1: WARNING: tab in filled text
+mandoc: tab-man.in:41:1: WARNING: tab in filled text
+mandoc: tab-man.in:41:2: WARNING: tab in filled text
+mandoc: tab-man.in:43:1: WARNING: tab in filled text
+mandoc: tab-man.in:44:1: WARNING: tab in filled text
diff --git a/regress/char/space/tab.in b/regress/char/space/tab.in
new file mode 100644
index 00000000..e801cbd9
--- /dev/null
+++ b/regress/char/space/tab.in
@@ -0,0 +1,128 @@
+.Dd April 23, 2010
+.Dt SPACE-TAB 1
+.Os OpenBSD
+.Sh NAME
+.Nm space-tab
+.Nd handling of literal space characters
+.Sh DESCRIPTION
+plain text
+.br
+1 x
+.br
+22 x
+.br
+333 x
+.br
+4444 x
+.br
+55555 x
+.br
+666666 x
+.br
+7777777 x
+.br
+88888888 x
+.br
+999999999 x
+.br
+aaaaaaaaaa x
+.br
+bbbbbbbbbbb x
+.br
+cccccccccccc x
+.br
+ddddddddddddd x
+.br
+tab space
+.br
+tab tab
+.br
+space tab
+.br
+ tab
+.br
+ tab
+.br
+ This line starts with a tab and comes close to the right margin.
+ The next line starts with a tab as well.
+.br
+ragged display
+.Bd -ragged -offset 2n
+1 x
+.br
+22 x
+.br
+333 x
+.br
+4444 x
+.br
+55555 x
+.br
+666666 x
+.br
+7777777 x
+.br
+88888888 x
+.br
+999999999 x
+.br
+aaaaaaaaaa x
+.br
+bbbbbbbbbbb x
+.br
+cccccccccccc x
+.br
+ddddddddddddd x
+.br
+tab space
+.br
+tab tab
+.br
+space tab
+.br
+ tab
+.br
+ tab
+.Ed
+unfilled display
+.Bd -unfilled -offset 2n
+1 x
+22 x
+333 x
+4444 x
+55555 x
+666666 x
+7777777 x
+88888888 x
+999999999 x
+aaaaaaaaaa x
+bbbbbbbbbbb x
+cccccccccccc x
+ddddddddddddd x
+tab space
+tab tab
+space tab
+ tab
+ tab
+.Ed
+literal display
+.Bd -literal -offset 2n
+1 x
+22 x
+333 x
+4444 x
+55555 x
+666666 x
+7777777 x
+88888888 x
+999999999 x
+aaaaaaaaaa x
+bbbbbbbbbbb x
+cccccccccccc x
+ddddddddddddd x
+tab space
+tab tab
+space tab
+ tab
+ tab
+.Ed
diff --git a/regress/char/space/tab.out_ascii b/regress/char/space/tab.out_ascii
new file mode 100644
index 00000000..64d32af1
--- /dev/null
+++ b/regress/char/space/tab.out_ascii
@@ -0,0 +1,89 @@
+SPACE-TAB(1) General Commands Manual SPACE-TAB(1)
+
+NNAAMMEE
+ ssppaaccee--ttaabb - handling of literal space characters
+
+DDEESSCCRRIIPPTTIIOONN
+ plain text
+ 1 x
+ 22 x
+ 333 x
+ 4444 x
+ 55555 x
+ 666666 x
+ 7777777 x
+ 88888888 x
+ 999999999 x
+ aaaaaaaaaa x
+ bbbbbbbbbbb x
+ cccccccccccc x
+ ddddddddddddd x
+ tab space
+ tab tab
+ space tab
+ tab
+ tab
+ This line starts with a tab and comes close to the right margin.
+ The next line starts with a tab as well.
+ ragged display
+
+ 1 x
+ 22 x
+ 333 x
+ 4444 x
+ 55555 x
+ 666666 x
+ 7777777 x
+ 88888888 x
+ 999999999 x
+ aaaaaaaaaa x
+ bbbbbbbbbbb x
+ cccccccccccc x
+ ddddddddddddd x
+ tab space
+ tab tab
+ space tab
+ tab
+ tab
+ unfilled display
+
+ 1 x
+ 22 x
+ 333 x
+ 4444 x
+ 55555 x
+ 666666 x
+ 7777777 x
+ 88888888 x
+ 999999999 x
+ aaaaaaaaaa x
+ bbbbbbbbbbb x
+ cccccccccccc x
+ ddddddddddddd x
+ tab space
+ tab tab
+ space tab
+ tab
+ tab
+ literal display
+
+ 1 x
+ 22 x
+ 333 x
+ 4444 x
+ 55555 x
+ 666666 x
+ 7777777 x
+ 88888888 x
+ 999999999 x
+ aaaaaaaaaa x
+ bbbbbbbbbbb x
+ cccccccccccc x
+ ddddddddddddd x
+ tab space
+ tab tab
+ space tab
+ tab
+ tab
+
+OpenBSD April 23, 2010 OpenBSD
diff --git a/regress/char/space/tab.out_lint b/regress/char/space/tab.out_lint
new file mode 100644
index 00000000..6495de7f
--- /dev/null
+++ b/regress/char/space/tab.out_lint
@@ -0,0 +1,42 @@
+mandoc: tab.in:10:2: WARNING: tab in filled text
+mandoc: tab.in:12:3: WARNING: tab in filled text
+mandoc: tab.in:14:4: WARNING: tab in filled text
+mandoc: tab.in:16:5: WARNING: tab in filled text
+mandoc: tab.in:18:6: WARNING: tab in filled text
+mandoc: tab.in:20:7: WARNING: tab in filled text
+mandoc: tab.in:22:8: WARNING: tab in filled text
+mandoc: tab.in:24:9: WARNING: tab in filled text
+mandoc: tab.in:26:10: WARNING: tab in filled text
+mandoc: tab.in:28:11: WARNING: tab in filled text
+mandoc: tab.in:30:12: WARNING: tab in filled text
+mandoc: tab.in:32:13: WARNING: tab in filled text
+mandoc: tab.in:34:14: WARNING: tab in filled text
+mandoc: tab.in:36:4: WARNING: tab in filled text
+mandoc: tab.in:38:4: WARNING: tab in filled text
+mandoc: tab.in:38:5: WARNING: tab in filled text
+mandoc: tab.in:40:7: WARNING: tab in filled text
+mandoc: tab.in:42:1: WARNING: tab in filled text
+mandoc: tab.in:44:1: WARNING: tab in filled text
+mandoc: tab.in:44:2: WARNING: tab in filled text
+mandoc: tab.in:46:1: WARNING: tab in filled text
+mandoc: tab.in:47:1: WARNING: tab in filled text
+mandoc: tab.in:51:2: WARNING: tab in filled text
+mandoc: tab.in:53:3: WARNING: tab in filled text
+mandoc: tab.in:55:4: WARNING: tab in filled text
+mandoc: tab.in:57:5: WARNING: tab in filled text
+mandoc: tab.in:59:6: WARNING: tab in filled text
+mandoc: tab.in:61:7: WARNING: tab in filled text
+mandoc: tab.in:63:8: WARNING: tab in filled text
+mandoc: tab.in:65:9: WARNING: tab in filled text
+mandoc: tab.in:67:10: WARNING: tab in filled text
+mandoc: tab.in:69:11: WARNING: tab in filled text
+mandoc: tab.in:71:12: WARNING: tab in filled text
+mandoc: tab.in:73:13: WARNING: tab in filled text
+mandoc: tab.in:75:14: WARNING: tab in filled text
+mandoc: tab.in:77:4: WARNING: tab in filled text
+mandoc: tab.in:79:4: WARNING: tab in filled text
+mandoc: tab.in:79:5: WARNING: tab in filled text
+mandoc: tab.in:81:7: WARNING: tab in filled text
+mandoc: tab.in:83:1: WARNING: tab in filled text
+mandoc: tab.in:85:1: WARNING: tab in filled text
+mandoc: tab.in:85:2: WARNING: tab in filled text
diff --git a/regress/char/space/trailing-mdoc.in b/regress/char/space/trailing-mdoc.in
new file mode 100644
index 00000000..3cc8dc08
--- /dev/null
+++ b/regress/char/space/trailing-mdoc.in
@@ -0,0 +1,11 @@
+.Dd December 8, 2016
+.Dt SPACE-TRAILING-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm space-trailing-mdoc
+.Nd trailing spaces on input lines
+.Sh DESCRIPTION
+on a text line,
+on a
+.Em macro
+line, after a comment \"
diff --git a/regress/char/space/trailing-mdoc.out_ascii b/regress/char/space/trailing-mdoc.out_ascii
new file mode 100644
index 00000000..28c32ed8
--- /dev/null
+++ b/regress/char/space/trailing-mdoc.out_ascii
@@ -0,0 +1,9 @@
+SPACE-TRAILING-MDOC(1) General Commands Manual SPACE-TRAILING-MDOC(1)
+
+NNAAMMEE
+ ssppaaccee--ttrraaiilliinngg--mmddoocc - trailing spaces on input lines
+
+DDEESSCCRRIIPPTTIIOONN
+ on a text line, on a _m_a_c_r_o line, after a comment
+
+OpenBSD December 8, 2016 OpenBSD
diff --git a/regress/char/space/trailing-mdoc.out_lint b/regress/char/space/trailing-mdoc.out_lint
new file mode 100644
index 00000000..a64141ea
--- /dev/null
+++ b/regress/char/space/trailing-mdoc.out_lint
@@ -0,0 +1,3 @@
+mandoc: trailing-mdoc.in:8:16: WARNING: whitespace at end of input line
+mandoc: trailing-mdoc.in:10:12: WARNING: whitespace at end of input line
+mandoc: trailing-mdoc.in:11:27: WARNING: whitespace at end of input line
diff --git a/regress/char/space/zerowidth.in b/regress/char/space/zerowidth.in
new file mode 100644
index 00000000..9d2f3ff2
--- /dev/null
+++ b/regress/char/space/zerowidth.in
@@ -0,0 +1,12 @@
+.TH SPACE-ZEROWIDTH 1 "October 27, 2014" OpenBSD
+.SH NAME
+space-zerowidth \- zero width and narrow space characters
+.SH DESCRIPTION
+.nf
+BEGINTEST
+zero width space \e& between A and B: A\&B
+hyphenation allowed \e% between A and B: A\%B
+half-narrow (1/12) space \e^ between A and B: A\^B
+narrow space (1/6) \e| between A and B: A\|B
+ENDTEST
+.fi
diff --git a/regress/char/space/zerowidth.out_ascii b/regress/char/space/zerowidth.out_ascii
new file mode 100644
index 00000000..e6509886
--- /dev/null
+++ b/regress/char/space/zerowidth.out_ascii
@@ -0,0 +1,18 @@
+SPACE-ZEROWIDTH(1) General Commands Manual SPACE-ZEROWIDTH(1)
+
+
+
+NNAAMMEE
+ space-zerowidth - zero width and narrow space characters
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ zero width space \& between A and B: AB
+ hyphenation allowed \% between A and B: AB
+ half-narrow (1/12) space \^ between A and B: AB
+ narrow space (1/6) \| between A and B: AB
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 SPACE-ZEROWIDTH(1)
diff --git a/regress/char/space/zerowidth.out_html b/regress/char/space/zerowidth.out_html
new file mode 100644
index 00000000..f317aafd
--- /dev/null
+++ b/regress/char/space/zerowidth.out_html
@@ -0,0 +1,6 @@
+BEGINTEST
+zero width space \&amp; between A and B: AB
+hyphenation allowed \% between A and B: AB
+half-narrow (1/12) space \^ between A and B: AB
+narrow space (1/6) \| between A and B: AB
+ENDTEST
diff --git a/regress/char/space/zerowidth.out_utf8 b/regress/char/space/zerowidth.out_utf8
new file mode 100644
index 00000000..e6509886
--- /dev/null
+++ b/regress/char/space/zerowidth.out_utf8
@@ -0,0 +1,18 @@
+SPACE-ZEROWIDTH(1) General Commands Manual SPACE-ZEROWIDTH(1)
+
+
+
+NNAAMMEE
+ space-zerowidth - zero width and narrow space characters
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ zero width space \& between A and B: AB
+ hyphenation allowed \% between A and B: AB
+ half-narrow (1/12) space \^ between A and B: AB
+ narrow space (1/6) \| between A and B: AB
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 SPACE-ZEROWIDTH(1)
diff --git a/regress/char/unicode/Makefile b/regress/char/unicode/Makefile
new file mode 100644
index 00000000..b75ba6db
--- /dev/null
+++ b/regress/char/unicode/Makefile
@@ -0,0 +1,13 @@
+# $OpenBSD: Makefile,v 1.4 2014/12/19 04:57:11 schwarze Exp $
+
+REGRESS_TARGETS = ascii input invalid latin1 latin1diff
+REGRESS_TARGETS += man mdoc named namediff nogroff
+SKIP_ASCII = man mdoc
+UTF8_TARGETS = ${REGRESS_TARGETS}
+HTML_TARGETS = ascii invalid latin1 latin1diff named namediff nogroff
+LINT_TARGETS = input invalid
+
+SKIP_GROFF = input nogroff
+SKIP_GROFF_ASCII = latin1diff namediff
+
+.include <bsd.regress.mk>
diff --git a/regress/char/unicode/ascii.in b/regress/char/unicode/ascii.in
new file mode 100644
index 00000000..c75da2c0
--- /dev/null
+++ b/regress/char/unicode/ascii.in
@@ -0,0 +1,28 @@
+.TH CHAR-UNICODE-ASCII 1 "October 27, 2014" OpenBSD
+.SH NAME
+char-unicode-ascii \- Unicode characters in the ASCII range
+.SH DESCRIPTION
+.nf
+BEGINTEST
+\[u0022]\N'34'\(dq QUOTATION MARK
+\[u0023]\N'35'\(sh NUMBER SIGN
+\[u0024]\N'36'\(Do DOLLAR SIGN
+\[u0027]\N'39'\(aq APOSTROPHE
+\[u002B]\N'43'\(pl PLUS SIGN
+\N'45'\- HYPHEN-MINUS
+\N'46'\. FULL STOP
+\[u002F]\N'47'\(sl SOLIDUS
+\[u003D]\N'61'\(eq EQUALS SIGN
+\[u0040]\N'64'\(at COMMERCIAL AT
+\[u005B]\N'91'\(lB LEFT SQUARE BRACKET
+\[u005C]\N'92'\e\(rs REVERSE SOLIDUS
+\[u005D]\N'93'\(rB RIGHT SQUARE BRACKET
+\[u005E]\N'94'\(a^\(ha CIRCUMFLEX ACCENT
+\[u005F]\N'95'\(ul LOW LINE
+\[u0060]\N'96'\`\(ga GRAVE ACCENT
+\[u007B]\N'123'\(lC LEFT CURLY BRACKET
+\[u007C]\N'124'\(ba\(or VERTICAL LINE
+\[u007D]\N'125'\(rC RIGHT CURLY BRACKET
+\[u007E]\N'126'\(a~\(ti TILDE
+ENDTEST
+.fi
diff --git a/regress/char/unicode/ascii.out_ascii b/regress/char/unicode/ascii.out_ascii
new file mode 100644
index 00000000..74b5d286
--- /dev/null
+++ b/regress/char/unicode/ascii.out_ascii
@@ -0,0 +1,34 @@
+CHAR-UNICODE-ASCII(1) General Commands Manual CHAR-UNICODE-ASCII(1)
+
+
+
+NNAAMMEE
+ char-unicode-ascii - Unicode characters in the ASCII range
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ """ QUOTATION MARK
+ ### NUMBER SIGN
+ $$$ DOLLAR SIGN
+ ''' APOSTROPHE
+ +++ PLUS SIGN
+ -- HYPHEN-MINUS
+ .. FULL STOP
+ /// SOLIDUS
+ === EQUALS SIGN
+ @@@ COMMERCIAL AT
+ [[[ LEFT SQUARE BRACKET
+ \\\\ REVERSE SOLIDUS
+ ]]] RIGHT SQUARE BRACKET
+ ^^^^ CIRCUMFLEX ACCENT
+ ___ LOW LINE
+ ```` GRAVE ACCENT
+ {{{ LEFT CURLY BRACKET
+ |||| VERTICAL LINE
+ }}} RIGHT CURLY BRACKET
+ ~~~~ TILDE
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-ASCII(1)
diff --git a/regress/char/unicode/ascii.out_html b/regress/char/unicode/ascii.out_html
new file mode 100644
index 00000000..deef5bcb
--- /dev/null
+++ b/regress/char/unicode/ascii.out_html
@@ -0,0 +1,22 @@
+BEGINTEST
+&quot;&quot;&quot; QUOTATION MARK
+### NUMBER SIGN
+$$$ DOLLAR SIGN
+''' APOSTROPHE
++++ PLUS SIGN
+-- HYPHEN-MINUS
+.. FULL STOP
+/// SOLIDUS
+=== EQUALS SIGN
+@@@ COMMERCIAL AT
+[[[ LEFT SQUARE BRACKET
+\\\\ REVERSE SOLIDUS
+]]] RIGHT SQUARE BRACKET
+^^^^ CIRCUMFLEX ACCENT
+___ LOW LINE
+```` GRAVE ACCENT
+{{{ LEFT CURLY BRACKET
+|||| VERTICAL LINE
+}}} RIGHT CURLY BRACKET
+~~~~ TILDE
+ENDTEST
diff --git a/regress/char/unicode/ascii.out_utf8 b/regress/char/unicode/ascii.out_utf8
new file mode 100644
index 00000000..74b5d286
--- /dev/null
+++ b/regress/char/unicode/ascii.out_utf8
@@ -0,0 +1,34 @@
+CHAR-UNICODE-ASCII(1) General Commands Manual CHAR-UNICODE-ASCII(1)
+
+
+
+NNAAMMEE
+ char-unicode-ascii - Unicode characters in the ASCII range
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ """ QUOTATION MARK
+ ### NUMBER SIGN
+ $$$ DOLLAR SIGN
+ ''' APOSTROPHE
+ +++ PLUS SIGN
+ -- HYPHEN-MINUS
+ .. FULL STOP
+ /// SOLIDUS
+ === EQUALS SIGN
+ @@@ COMMERCIAL AT
+ [[[ LEFT SQUARE BRACKET
+ \\\\ REVERSE SOLIDUS
+ ]]] RIGHT SQUARE BRACKET
+ ^^^^ CIRCUMFLEX ACCENT
+ ___ LOW LINE
+ ```` GRAVE ACCENT
+ {{{ LEFT CURLY BRACKET
+ |||| VERTICAL LINE
+ }}} RIGHT CURLY BRACKET
+ ~~~~ TILDE
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-ASCII(1)
diff --git a/regress/char/unicode/input.in b/regress/char/unicode/input.in
new file mode 100644
index 00000000..15a59f5b
--- /dev/null
+++ b/regress/char/unicode/input.in
Binary files differ
diff --git a/regress/char/unicode/input.out_ascii b/regress/char/unicode/input.out_ascii
new file mode 100644
index 00000000..7711574c
--- /dev/null
+++ b/regress/char/unicode/input.out_ascii
@@ -0,0 +1,67 @@
+CHAR-UNICODE-INPUT(1) General Commands Manual CHAR-UNICODE-INPUT(1)
+
+
+
+NNAAMMEE
+ char-unicode-input - Unicode characters in the input file
+
+DDEESSCCRRIIPPTTIIOONN
+ lowest valid: <80>
+
+ OOnnee--bbyyttee rraannggee
+
+ U+0000 0x00 <NUL>? lowest ASCII
+ U+001f 0x1f <US>? highest ASCII control character
+ U+007f 0x7f <DEL>? highest ASCII
+ 0x80 ? leading lowest continuation
+ 0xbf ? leading highest continuation
+
+ TTwwoo--bbyyttee rraannggee
+
+ U+0000 0xc080 ?? lowest obfuscated ASCII
+ U+007f 0xc1bf ?? highest obfuscated ASCII
+ 0xc278 ?x ASCII continuation
+ U+0080 0xc280 <80><80> lowest two-byte
+ 0xc2c380 ?`A high continuation
+ U+07FF 0xdfbf <?><?> highest two-byte
+
+ TThhrreeee--bbyyttee rraannggee
+
+ U+0000 0xe08080 ??? lowest obfuscated ASCII
+ U+007f 0xe081bf ??? highest obfuscated ASCII
+ U+0080 0xe08280 ??? lowest obfuscated two-byte
+ U+07FF 0xe09fbf ??? highest obfuscated two-byte
+ U+0800 0xe0a080 <?><?> lowest three-byte
+ U+0FFF 0xe0bfbf <?><?> end of first middle byte
+ U+1000 0xe18080 <?><?> begin of second middle byte
+ U+CFFF 0xecbfbf <?><?> end of last normal middle byte
+ U+D000 0xed8080 <?><?> begin of strange middle byte
+ U+D7FF 0xed9fbf <?><?> highest public three-byte
+ U+D800 0xeda080 ??? lowest surrogate
+ U+DFFF 0xedbfbf ??? highest surrogate
+ U+E000 0xee8080 <?><?> lowest private use
+ U+FFFF 0xefbfbf <?><?> highest three-byte
+
+ FFoouurr--bbyyttee rraannggee
+
+ U+0000 0xf0808080 ???? lowest obfuscated ASCII
+ U+007f 0xf08081bf ???? highest obfuscated ASCII
+ U+0080 0xf0808280 ???? lowest obfuscated two-byte
+ U+07FF 0xf0809fbf ???? highest obfuscated two-byte
+ U+0800 0xf080a080 ???? lowest obfuscated three-byte
+ U+FFFF 0xf08fbfbf ???? highest obfuscated three-byte
+ U+10000 0xf0908080 <?><?> lowest four-byte
+ U+3FFFF 0xf0bfbfbf <?><?> end of first middle byte
+ U+40000 0xf1808080 <?><?> second middle byte
+ U+FFFFF 0xf3bfbfbf <?><?> last normal middle byte
+ U+100000 0xf4808080 <?><?> strange middle byte
+ U+10FFFF 0xf48fbfbf <?><?> last valid four-byte
+ U+110000 0xf4908080 ???? lowest beyond Unicode
+ U+13FFFF 0xf4bfbfbf ???? end of strange middle byte
+ U+140000 0xf5808080 ???? lowest invalid middle byte
+ U+1FFFFF 0xf7bfbfbf ???? highest four-byte
+ U+200000 0xf888808080 ????? lowest five-byte
+
+
+
+OpenBSD December 19, 2014 CHAR-UNICODE-INPUT(1)
diff --git a/regress/char/unicode/input.out_lint b/regress/char/unicode/input.out_lint
new file mode 100644
index 00000000..8ac05edc
--- /dev/null
+++ b/regress/char/unicode/input.out_lint
@@ -0,0 +1,81 @@
+mandoc: input.in:10:21: ERROR: skipping bad character: 0x0
+mandoc: input.in:11:21: ERROR: skipping bad character: 0x1f
+mandoc: input.in:12:21: ERROR: skipping bad character: 0x7f
+mandoc: input.in:13:7: ERROR: skipping bad character: 0x80
+mandoc: input.in:14:7: ERROR: skipping bad character: 0xbf
+mandoc: input.in:20:15: ERROR: skipping bad character: 0xc0
+mandoc: input.in:20:16: ERROR: skipping bad character: 0x80
+mandoc: input.in:21:15: ERROR: skipping bad character: 0xc1
+mandoc: input.in:21:16: ERROR: skipping bad character: 0xbf
+mandoc: input.in:22:9: ERROR: skipping bad character: 0xc2
+mandoc: input.in:24:11: ERROR: skipping bad character: 0xc2
+mandoc: input.in:31:17: ERROR: skipping bad character: 0xc0
+mandoc: input.in:31:18: ERROR: skipping bad character: 0x80
+mandoc: input.in:31:19: ERROR: skipping bad character: 0x80
+mandoc: input.in:32:17: ERROR: skipping bad character: 0xe0
+mandoc: input.in:32:18: ERROR: skipping bad character: 0x81
+mandoc: input.in:32:19: ERROR: skipping bad character: 0xbf
+mandoc: input.in:33:17: ERROR: skipping bad character: 0xe0
+mandoc: input.in:33:18: ERROR: skipping bad character: 0x82
+mandoc: input.in:33:19: ERROR: skipping bad character: 0x80
+mandoc: input.in:34:17: ERROR: skipping bad character: 0xe0
+mandoc: input.in:34:18: ERROR: skipping bad character: 0x9f
+mandoc: input.in:34:19: ERROR: skipping bad character: 0xbf
+mandoc: input.in:41:25: ERROR: skipping bad character: 0xed
+mandoc: input.in:41:26: ERROR: skipping bad character: 0xa0
+mandoc: input.in:41:27: ERROR: skipping bad character: 0x80
+mandoc: input.in:41:17: WARNING: invalid escape sequence: \[uD800]
+mandoc: input.in:42:25: ERROR: skipping bad character: 0xed
+mandoc: input.in:42:26: ERROR: skipping bad character: 0xbf
+mandoc: input.in:42:27: ERROR: skipping bad character: 0xbf
+mandoc: input.in:42:17: WARNING: invalid escape sequence: \[uDFFF]
+mandoc: input.in:50:19: ERROR: skipping bad character: 0xf0
+mandoc: input.in:50:20: ERROR: skipping bad character: 0x80
+mandoc: input.in:50:21: ERROR: skipping bad character: 0x80
+mandoc: input.in:50:22: ERROR: skipping bad character: 0x80
+mandoc: input.in:51:19: ERROR: skipping bad character: 0xf0
+mandoc: input.in:51:20: ERROR: skipping bad character: 0x80
+mandoc: input.in:51:21: ERROR: skipping bad character: 0x81
+mandoc: input.in:51:22: ERROR: skipping bad character: 0xbf
+mandoc: input.in:52:19: ERROR: skipping bad character: 0xf0
+mandoc: input.in:52:20: ERROR: skipping bad character: 0x80
+mandoc: input.in:52:21: ERROR: skipping bad character: 0x82
+mandoc: input.in:52:22: ERROR: skipping bad character: 0x80
+mandoc: input.in:53:19: ERROR: skipping bad character: 0xf0
+mandoc: input.in:53:20: ERROR: skipping bad character: 0x80
+mandoc: input.in:53:21: ERROR: skipping bad character: 0x9f
+mandoc: input.in:53:22: ERROR: skipping bad character: 0xbf
+mandoc: input.in:54:19: ERROR: skipping bad character: 0xf0
+mandoc: input.in:54:20: ERROR: skipping bad character: 0x80
+mandoc: input.in:54:21: ERROR: skipping bad character: 0xa0
+mandoc: input.in:54:22: ERROR: skipping bad character: 0x80
+mandoc: input.in:55:19: ERROR: skipping bad character: 0xf0
+mandoc: input.in:55:20: ERROR: skipping bad character: 0x8f
+mandoc: input.in:55:21: ERROR: skipping bad character: 0xbf
+mandoc: input.in:55:22: ERROR: skipping bad character: 0xbf
+mandoc: input.in:62:31: ERROR: skipping bad character: 0xf4
+mandoc: input.in:62:32: ERROR: skipping bad character: 0x90
+mandoc: input.in:62:33: ERROR: skipping bad character: 0x80
+mandoc: input.in:62:34: ERROR: skipping bad character: 0x80
+mandoc: input.in:62:21: WARNING: invalid escape sequence: \[u110000]
+mandoc: input.in:63:31: ERROR: skipping bad character: 0xf4
+mandoc: input.in:63:32: ERROR: skipping bad character: 0xbf
+mandoc: input.in:63:33: ERROR: skipping bad character: 0xbf
+mandoc: input.in:63:34: ERROR: skipping bad character: 0xbf
+mandoc: input.in:63:21: WARNING: invalid escape sequence: \[u13FFFF]
+mandoc: input.in:64:31: ERROR: skipping bad character: 0xf5
+mandoc: input.in:64:32: ERROR: skipping bad character: 0x80
+mandoc: input.in:64:33: ERROR: skipping bad character: 0x80
+mandoc: input.in:64:34: ERROR: skipping bad character: 0x80
+mandoc: input.in:64:21: WARNING: invalid escape sequence: \[u140000]
+mandoc: input.in:65:31: ERROR: skipping bad character: 0xf7
+mandoc: input.in:65:32: ERROR: skipping bad character: 0xbf
+mandoc: input.in:65:33: ERROR: skipping bad character: 0xbf
+mandoc: input.in:65:34: ERROR: skipping bad character: 0xbf
+mandoc: input.in:65:21: WARNING: invalid escape sequence: \[u1FFFFF]
+mandoc: input.in:66:33: ERROR: skipping bad character: 0xf8
+mandoc: input.in:66:34: ERROR: skipping bad character: 0x88
+mandoc: input.in:66:35: ERROR: skipping bad character: 0x80
+mandoc: input.in:66:36: ERROR: skipping bad character: 0x80
+mandoc: input.in:66:37: ERROR: skipping bad character: 0x80
+mandoc: input.in:66:23: WARNING: invalid escape sequence: \[u200000]
diff --git a/regress/char/unicode/input.out_utf8 b/regress/char/unicode/input.out_utf8
new file mode 100644
index 00000000..890835d3
--- /dev/null
+++ b/regress/char/unicode/input.out_utf8
@@ -0,0 +1,67 @@
+CHAR-UNICODE-INPUT(1) General Commands Manual CHAR-UNICODE-INPUT(1)
+
+
+
+NNAAMMEE
+ char-unicode-input - Unicode characters in the input file
+
+DDEESSCCRRIIPPTTIIOONN
+ lowest valid: �
+
+ OOnnee--bbyyttee rraannggee
+
+ U+0000 0x00 �? lowest ASCII
+ U+001f 0x1f �? highest ASCII control character
+ U+007f 0x7f �? highest ASCII
+ 0x80 ? leading lowest continuation
+ 0xbf ? leading highest continuation
+
+ TTwwoo--bbyyttee rraannggee
+
+ U+0000 0xc080 ?? lowest obfuscated ASCII
+ U+007f 0xc1bf ?? highest obfuscated ASCII
+ 0xc278 ?x ASCII continuation
+ U+0080 0xc280 �� lowest two-byte
+ 0xc2c380 ?À high continuation
+ U+07FF 0xdfbf ߿߿ highest two-byte
+
+ TThhrreeee--bbyyttee rraannggee
+
+ U+0000 0xe08080 ??? lowest obfuscated ASCII
+ U+007f 0xe081bf ??? highest obfuscated ASCII
+ U+0080 0xe08280 ??? lowest obfuscated two-byte
+ U+07FF 0xe09fbf ??? highest obfuscated two-byte
+ U+0800 0xe0a080 ࠀࠀ lowest three-byte
+ U+0FFF 0xe0bfbf ࿿࿿ end of first middle byte
+ U+1000 0xe18080 ကက begin of second middle byte
+ U+CFFF 0xecbfbf 쿿쿿 end of last normal middle byte
+ U+D000 0xed8080 퀀퀀 begin of strange middle byte
+ U+D7FF 0xed9fbf ퟿퟿ highest public three-byte
+ U+D800 0xeda080 ??? lowest surrogate
+ U+DFFF 0xedbfbf ??? highest surrogate
+ U+E000 0xee8080  lowest private use
+ U+FFFF 0xefbfbf ￿￿ highest three-byte
+
+ FFoouurr--bbyyttee rraannggee
+
+ U+0000 0xf0808080 ???? lowest obfuscated ASCII
+ U+007f 0xf08081bf ???? highest obfuscated ASCII
+ U+0080 0xf0808280 ???? lowest obfuscated two-byte
+ U+07FF 0xf0809fbf ???? highest obfuscated two-byte
+ U+0800 0xf080a080 ???? lowest obfuscated three-byte
+ U+FFFF 0xf08fbfbf ???? highest obfuscated three-byte
+ U+10000 0xf0908080 𐀀𐀀 lowest four-byte
+ U+3FFFF 0xf0bfbfbf 𿿿𿿿 end of first middle byte
+ U+40000 0xf1808080 񀀀񀀀 second middle byte
+ U+FFFFF 0xf3bfbfbf 󿿿󿿿 last normal middle byte
+ U+100000 0xf4808080 􀀀􀀀 strange middle byte
+ U+10FFFF 0xf48fbfbf 􏿿􏿿 last valid four-byte
+ U+110000 0xf4908080 ???? lowest beyond Unicode
+ U+13FFFF 0xf4bfbfbf ???? end of strange middle byte
+ U+140000 0xf5808080 ???? lowest invalid middle byte
+ U+1FFFFF 0xf7bfbfbf ???? highest four-byte
+ U+200000 0xf888808080 ????? lowest five-byte
+
+
+
+OpenBSD December 19, 2014 CHAR-UNICODE-INPUT(1)
diff --git a/regress/char/unicode/invalid.in b/regress/char/unicode/invalid.in
new file mode 100644
index 00000000..4c0432bc
--- /dev/null
+++ b/regress/char/unicode/invalid.in
@@ -0,0 +1,17 @@
+.Dd October 28, 2014
+.Dt CHAR-UNICODE-INVALID 1
+.Os OpenBSD
+.Sh NAME
+.Nm char-unicode-invalid
+.Nd invalid unicode characters
+.Sh DESCRIPTION
+.Bd -unfilled
+BEGINTEST
+too short: >\[u2B].\[u02B]<
+just right: >\[u002B]<
+too long: >\[u0002B].\[u00002B].\[u000002B]<
+too large: >\[u110000].\[u200000].\[u1000000]<
+trailing garbage: >\[u1234g]<
+not unicode: >\[ul].\[ua].\[uA]<
+ENDTEST
+.Ed
diff --git a/regress/char/unicode/invalid.out_ascii b/regress/char/unicode/invalid.out_ascii
new file mode 100644
index 00000000..c30a7617
--- /dev/null
+++ b/regress/char/unicode/invalid.out_ascii
@@ -0,0 +1,16 @@
+CHAR-UNICODE-INVALID(1) General Commands Manual CHAR-UNICODE-INVALID(1)
+
+NNAAMMEE
+ cchhaarr--uunniiccooddee--iinnvvaalliidd - invalid unicode characters
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ too short: >.<
+ just right: >+<
+ too long: >..<
+ too large: >..<
+ trailing garbage: ><
+ not unicode: >_.|^.=^<
+ ENDTEST
+
+OpenBSD October 28, 2014 OpenBSD
diff --git a/regress/char/unicode/invalid.out_html b/regress/char/unicode/invalid.out_html
new file mode 100644
index 00000000..6456d728
--- /dev/null
+++ b/regress/char/unicode/invalid.out_html
@@ -0,0 +1,8 @@
+BEGINTEST
+too short: &gt;.&lt;
+just right: &gt;+&lt;
+too long: &gt;..&lt;
+too large: &gt;..&lt;
+trailing garbage: &gt;&lt;
+not unicode: &gt;_.&#8593;.&#8657;&lt;
+ENDTEST
diff --git a/regress/char/unicode/invalid.out_lint b/regress/char/unicode/invalid.out_lint
new file mode 100644
index 00000000..c200a620
--- /dev/null
+++ b/regress/char/unicode/invalid.out_lint
@@ -0,0 +1,9 @@
+mandoc: invalid.in:10:20: WARNING: invalid escape sequence: \[u02B]
+mandoc: invalid.in:10:13: WARNING: invalid escape sequence: \[u2B]
+mandoc: invalid.in:12:33: WARNING: invalid escape sequence: \[u000002B]
+mandoc: invalid.in:12:22: WARNING: invalid escape sequence: \[u00002B]
+mandoc: invalid.in:12:12: WARNING: invalid escape sequence: \[u0002B]
+mandoc: invalid.in:13:35: WARNING: invalid escape sequence: \[u1000000]
+mandoc: invalid.in:13:24: WARNING: invalid escape sequence: \[u200000]
+mandoc: invalid.in:13:13: WARNING: invalid escape sequence: \[u110000]
+mandoc: invalid.in:14:20: WARNING: invalid escape sequence: \[u1234g]
diff --git a/regress/char/unicode/invalid.out_utf8 b/regress/char/unicode/invalid.out_utf8
new file mode 100644
index 00000000..ed91d82a
--- /dev/null
+++ b/regress/char/unicode/invalid.out_utf8
@@ -0,0 +1,16 @@
+CHAR-UNICODE-INVALID(1) General Commands Manual CHAR-UNICODE-INVALID(1)
+
+NNAAMMEE
+ cchhaarr--uunniiccooddee--iinnvvaalliidd – invalid unicode characters
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ too short: >.<
+ just right: >+<
+ too long: >..<
+ too large: >..<
+ trailing garbage: ><
+ not unicode: >_.↑.⇑<
+ ENDTEST
+
+OpenBSD October 28, 2014 OpenBSD
diff --git a/regress/char/unicode/latin1.in b/regress/char/unicode/latin1.in
new file mode 100644
index 00000000..4c99e986
--- /dev/null
+++ b/regress/char/unicode/latin1.in
@@ -0,0 +1,92 @@
+.TH CHAR-UNICODE-LATIN1 1 "October 27, 2014" OpenBSD
+.SH NAME
+char-unicode-latin1 \- Unicode characters in the ISO-8859-1 range
+.SH DESCRIPTION
+.nf
+BEGINTEST
+\[u00A2]\(ct CENT SIGN
+\[u00A4]\(Cs CURRENCY SIGN
+\[u00A5]\(Ye YEN SIGN
+\[u00A6]\(bb BROKEN BAR
+\[u00A8]\(ad DIAERESIS
+\[u00A9]\(co COPYRIGHT SIGN
+\[u00AA] FEMININE ORDINAL INDICATOR
+\[u00AB]\(Fo LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+\[u00AC]\(no\[tno] NOT SIGN
+\[u00AD] SOFT HYPHEN
+\[u00AE]\(rg REGISTERED SIGN
+\[u00B1]\(+-\[t+-] PLUS-MINUS SIGN
+\[u00B2] SUPERSCRIPT TWO
+\[u00B3] SUPERSCRIPT THREE
+\[u00B4]\'\(aa ACUTE ACCENT
+\[u00B5]\(mc MICRO SIGN
+\[u00B7]\(pc MIDDLE DOT
+\[u00B8]\(ac CEDILLA
+\[u00B9] SUPERSCRIPT ONE
+\[u00BA] MASCULINE ORDINAL INDICATOR
+\[u00BB]\(Fc RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+\[u00BC]\(14 VULGAR FRACTION ONE QUARTER
+\[u00BD]\(12 VULGAR FRACTION ONE HALF
+\[u00BE]\(34 VULGAR FRACTION THREE QUARTERS
+\[u00C0]\(`A LATIN CAPITAL LETTER A WITH GRAVE
+\[u00C1]\('A LATIN CAPITAL LETTER A WITH ACUTE
+\[u00C2]\(^A LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+\[u00C3]\(~A LATIN CAPITAL LETTER A WITH TILDE
+\[u00C4]\(:A LATIN CAPITAL LETTER A WITH DIAERESIS
+\[u00C5]\(oA LATIN CAPITAL LETTER A WITH RING ABOVE
+\[u00C6]\(AE LATIN CAPITAL LETTER AE
+\[u00C7]\(,C LATIN CAPITAL LETTER C WITH CEDILLA
+\[u00C8]\(`E LATIN CAPITAL LETTER E WITH GRAVE
+\[u00C9]\('E LATIN CAPITAL LETTER E WITH ACUTE
+\[u00CA]\(^E LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+\[u00CB]\(:E LATIN CAPITAL LETTER E WITH DIAERESIS
+\[u00CC]\(`I LATIN CAPITAL LETTER I WITH GRAVE
+\[u00CD]\('I LATIN CAPITAL LETTER I WITH ACUTE
+\[u00CE]\(^I LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+\[u00CF]\(:I LATIN CAPITAL LETTER I WITH DIAERESIS
+\[u00D0]\(-D LATIN CAPITAL LETTER ETH
+\[u00D1]\(~N LATIN CAPITAL LETTER N WITH TILDE
+\[u00D2]\(`O LATIN CAPITAL LETTER O WITH GRAVE
+\[u00D3]\('O LATIN CAPITAL LETTER O WITH ACUTE
+\[u00D4]\(^O LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+\[u00D5]\(~O LATIN CAPITAL LETTER O WITH TILDE
+\[u00D6]\(:O LATIN CAPITAL LETTER O WITH DIAERESIS
+\[u00D7]\(mu\[tmu] MULTIPLICATION SIGN
+\[u00D8]\(/O LATIN CAPITAL LETTER O WITH STROKE
+\[u00D9]\(`U LATIN CAPITAL LETTER U WITH GRAVE
+\[u00DA]\('U LATIN CAPITAL LETTER U WITH ACUTE
+\[u00DB]\(^U LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+\[u00DC]\(:U LATIN CAPITAL LETTER U WITH DIAERESIS
+\[u00DD] LATIN CAPITAL LETTER Y WITH ACUTE
+\[u00E0]\(`a LATIN SMALL LETTER A WITH GRAVE
+\[u00E1]\('a LATIN SMALL LETTER A WITH ACUTE
+\[u00E2]\(^a LATIN SMALL LETTER A WITH CIRCUMFLEX
+\[u00E3]\(~a LATIN SMALL LETTER A WITH TILDE
+\[u00E4]\(:a LATIN SMALL LETTER A WITH DIAERESIS
+\[u00E5]\(oa LATIN SMALL LETTER A WITH RING ABOVE
+\[u00E6]\(ae LATIN SMALL LETTER AE
+\[u00E7]\(,c LATIN SMALL LETTER C WITH CEDILLA
+\[u00E8]\(`e LATIN SMALL LETTER E WITH GRAVE
+\[u00E9]\('e LATIN SMALL LETTER E WITH ACUTE
+\[u00EA]\(^e LATIN SMALL LETTER E WITH CIRCUMFLEX
+\[u00EB]\(:e LATIN SMALL LETTER E WITH DIAERESIS
+\[u00EC]\(`i LATIN SMALL LETTER I WITH GRAVE
+\[u00ED]\('i LATIN SMALL LETTER I WITH ACUTE
+\[u00EE]\(^i LATIN SMALL LETTER I WITH CIRCUMFLEX
+\[u00EF]\(:i LATIN SMALL LETTER I WITH DIAERESIS
+\[u00F1]\(~n LATIN SMALL LETTER N WITH TILDE
+\[u00F2]\(`o LATIN SMALL LETTER O WITH GRAVE
+\[u00F3]\('o LATIN SMALL LETTER O WITH ACUTE
+\[u00F4]\(^o LATIN SMALL LETTER O WITH CIRCUMFLEX
+\[u00F5]\(~o LATIN SMALL LETTER O WITH TILDE
+\[u00F6]\(:o LATIN SMALL LETTER O WITH DIAERESIS
+\[u00F7]\(di\[tdi] DIVISION SIGN
+\[u00F8]\(/o LATIN SMALL LETTER O WITH STROKE
+\[u00F9]\(`u LATIN SMALL LETTER U WITH GRAVE
+\[u00FA]\('u LATIN SMALL LETTER U WITH ACUTE
+\[u00FB]\(^u LATIN SMALL LETTER U WITH CIRCUMFLEX
+\[u00FC]\(:u LATIN SMALL LETTER U WITH DIAERESIS
+\[u00FD] LATIN SMALL LETTER Y WITH ACUTE
+\[u00FF]\(:y LATIN SMALL LETTER Y WITH DIAERESIS
+ENDTEST
+.fi
diff --git a/regress/char/unicode/latin1.out_ascii b/regress/char/unicode/latin1.out_ascii
new file mode 100644
index 00000000..1eb8436d
--- /dev/null
+++ b/regress/char/unicode/latin1.out_ascii
@@ -0,0 +1,98 @@
+CHAR-UNICODE-LATIN1(1) General Commands Manual CHAR-UNICODE-LATIN1(1)
+
+
+
+NNAAMMEE
+ char-unicode-latin1 - Unicode characters in the ISO-8859-1 range
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ /c/c CENT SIGN
+ oxox CURRENCY SIGN
+ =Y=Y YEN SIGN
+ || BROKEN BAR
+ "" DIAERESIS
+ (C)(C) COPYRIGHT SIGN
+ _a FEMININE ORDINAL INDICATOR
+ <<<< LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ ~~~ NOT SIGN
+ SOFT HYPHEN
+ (R)(R) REGISTERED SIGN
+ +-+-+- PLUS-MINUS SIGN
+ 2 SUPERSCRIPT TWO
+ 3 SUPERSCRIPT THREE
+ ''' ACUTE ACCENT
+ ,u,u MICRO SIGN
+ .. MIDDLE DOT
+ ,, CEDILLA
+ 1 SUPERSCRIPT ONE
+ _o MASCULINE ORDINAL INDICATOR
+ >>>> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ 1/41/4 VULGAR FRACTION ONE QUARTER
+ 1/21/2 VULGAR FRACTION ONE HALF
+ 3/43/4 VULGAR FRACTION THREE QUARTERS
+ `A`A LATIN CAPITAL LETTER A WITH GRAVE
+ 'A'A LATIN CAPITAL LETTER A WITH ACUTE
+ ^A^A LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+ ~A~A LATIN CAPITAL LETTER A WITH TILDE
+ "A"A LATIN CAPITAL LETTER A WITH DIAERESIS
+ oAoA LATIN CAPITAL LETTER A WITH RING ABOVE
+ AEAE LATIN CAPITAL LETTER AE
+ ,C,C LATIN CAPITAL LETTER C WITH CEDILLA
+ `E`E LATIN CAPITAL LETTER E WITH GRAVE
+ 'E'E LATIN CAPITAL LETTER E WITH ACUTE
+ ^E^E LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+ "E"E LATIN CAPITAL LETTER E WITH DIAERESIS
+ `I`I LATIN CAPITAL LETTER I WITH GRAVE
+ 'I'I LATIN CAPITAL LETTER I WITH ACUTE
+ ^I^I LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+ "I"I LATIN CAPITAL LETTER I WITH DIAERESIS
+ -D-D LATIN CAPITAL LETTER ETH
+ ~N~N LATIN CAPITAL LETTER N WITH TILDE
+ `O`O LATIN CAPITAL LETTER O WITH GRAVE
+ 'O'O LATIN CAPITAL LETTER O WITH ACUTE
+ ^O^O LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+ ~O~O LATIN CAPITAL LETTER O WITH TILDE
+ "O"O LATIN CAPITAL LETTER O WITH DIAERESIS
+ xxx MULTIPLICATION SIGN
+ /O/O LATIN CAPITAL LETTER O WITH STROKE
+ `U`U LATIN CAPITAL LETTER U WITH GRAVE
+ 'U'U LATIN CAPITAL LETTER U WITH ACUTE
+ ^U^U LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+ "U"U LATIN CAPITAL LETTER U WITH DIAERESIS
+ 'Y LATIN CAPITAL LETTER Y WITH ACUTE
+ `a`a LATIN SMALL LETTER A WITH GRAVE
+ 'a'a LATIN SMALL LETTER A WITH ACUTE
+ ^a^a LATIN SMALL LETTER A WITH CIRCUMFLEX
+ ~a~a LATIN SMALL LETTER A WITH TILDE
+ "a"a LATIN SMALL LETTER A WITH DIAERESIS
+ oaoa LATIN SMALL LETTER A WITH RING ABOVE
+ aeae LATIN SMALL LETTER AE
+ ,c,c LATIN SMALL LETTER C WITH CEDILLA
+ `e`e LATIN SMALL LETTER E WITH GRAVE
+ 'e'e LATIN SMALL LETTER E WITH ACUTE
+ ^e^e LATIN SMALL LETTER E WITH CIRCUMFLEX
+ "e"e LATIN SMALL LETTER E WITH DIAERESIS
+ `i`i LATIN SMALL LETTER I WITH GRAVE
+ 'i'i LATIN SMALL LETTER I WITH ACUTE
+ ^i^i LATIN SMALL LETTER I WITH CIRCUMFLEX
+ "i"i LATIN SMALL LETTER I WITH DIAERESIS
+ ~n~n LATIN SMALL LETTER N WITH TILDE
+ `o`o LATIN SMALL LETTER O WITH GRAVE
+ 'o'o LATIN SMALL LETTER O WITH ACUTE
+ ^o^o LATIN SMALL LETTER O WITH CIRCUMFLEX
+ ~o~o LATIN SMALL LETTER O WITH TILDE
+ "o"o LATIN SMALL LETTER O WITH DIAERESIS
+ -:--:--:- DIVISION SIGN
+ /o/o LATIN SMALL LETTER O WITH STROKE
+ `u`u LATIN SMALL LETTER U WITH GRAVE
+ 'u'u LATIN SMALL LETTER U WITH ACUTE
+ ^u^u LATIN SMALL LETTER U WITH CIRCUMFLEX
+ "u"u LATIN SMALL LETTER U WITH DIAERESIS
+ 'y LATIN SMALL LETTER Y WITH ACUTE
+ "y"y LATIN SMALL LETTER Y WITH DIAERESIS
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-LATIN1(1)
diff --git a/regress/char/unicode/latin1.out_html b/regress/char/unicode/latin1.out_html
new file mode 100644
index 00000000..d8fbf958
--- /dev/null
+++ b/regress/char/unicode/latin1.out_html
@@ -0,0 +1,86 @@
+BEGINTEST
+&#162;&#162; CENT SIGN
+&#164;&#164; CURRENCY SIGN
+&#165;&#165; YEN SIGN
+&#166;&#166; BROKEN BAR
+&#168;&#168; DIAERESIS
+&#169;&#169; COPYRIGHT SIGN
+&#170; FEMININE ORDINAL INDICATOR
+&#171;&#171; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+&#172;&#172;&#172; NOT SIGN
+&#173; SOFT HYPHEN
+&#174;&#174; REGISTERED SIGN
+&#177;&#177;&#177; PLUS-MINUS SIGN
+&#178; SUPERSCRIPT TWO
+&#179; SUPERSCRIPT THREE
+&#180;&#180;&#180; ACUTE ACCENT
+&#181;&#181; MICRO SIGN
+&#183;&#183; MIDDLE DOT
+&#184;&#184; CEDILLA
+&#185; SUPERSCRIPT ONE
+&#186; MASCULINE ORDINAL INDICATOR
+&#187;&#187; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+&#188;&#188; VULGAR FRACTION ONE QUARTER
+&#189;&#189; VULGAR FRACTION ONE HALF
+&#190;&#190; VULGAR FRACTION THREE QUARTERS
+&#192;&#192; LATIN CAPITAL LETTER A WITH GRAVE
+&#193;&#193; LATIN CAPITAL LETTER A WITH ACUTE
+&#194;&#194; LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+&#195;&#195; LATIN CAPITAL LETTER A WITH TILDE
+&#196;&#196; LATIN CAPITAL LETTER A WITH DIAERESIS
+&#197;&#197; LATIN CAPITAL LETTER A WITH RING ABOVE
+&#198;&#198; LATIN CAPITAL LETTER AE
+&#199;&#199; LATIN CAPITAL LETTER C WITH CEDILLA
+&#200;&#200; LATIN CAPITAL LETTER E WITH GRAVE
+&#201;&#201; LATIN CAPITAL LETTER E WITH ACUTE
+&#202;&#202; LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+&#203;&#203; LATIN CAPITAL LETTER E WITH DIAERESIS
+&#204;&#204; LATIN CAPITAL LETTER I WITH GRAVE
+&#205;&#205; LATIN CAPITAL LETTER I WITH ACUTE
+&#206;&#206; LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+&#207;&#207; LATIN CAPITAL LETTER I WITH DIAERESIS
+&#208;&#208; LATIN CAPITAL LETTER ETH
+&#209;&#209; LATIN CAPITAL LETTER N WITH TILDE
+&#210;&#210; LATIN CAPITAL LETTER O WITH GRAVE
+&#211;&#211; LATIN CAPITAL LETTER O WITH ACUTE
+&#212;&#212; LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+&#213;&#213; LATIN CAPITAL LETTER O WITH TILDE
+&#214;&#214; LATIN CAPITAL LETTER O WITH DIAERESIS
+&#215;&#215;&#215; MULTIPLICATION SIGN
+&#216;&#216; LATIN CAPITAL LETTER O WITH STROKE
+&#217;&#217; LATIN CAPITAL LETTER U WITH GRAVE
+&#218;&#218; LATIN CAPITAL LETTER U WITH ACUTE
+&#219;&#219; LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+&#220;&#220; LATIN CAPITAL LETTER U WITH DIAERESIS
+&#221; LATIN CAPITAL LETTER Y WITH ACUTE
+&#224;&#224; LATIN SMALL LETTER A WITH GRAVE
+&#225;&#225; LATIN SMALL LETTER A WITH ACUTE
+&#226;&#226; LATIN SMALL LETTER A WITH CIRCUMFLEX
+&#227;&#227; LATIN SMALL LETTER A WITH TILDE
+&#228;&#228; LATIN SMALL LETTER A WITH DIAERESIS
+&#229;&#229; LATIN SMALL LETTER A WITH RING ABOVE
+&#230;&#230; LATIN SMALL LETTER AE
+&#231;&#231; LATIN SMALL LETTER C WITH CEDILLA
+&#232;&#232; LATIN SMALL LETTER E WITH GRAVE
+&#233;&#233; LATIN SMALL LETTER E WITH ACUTE
+&#234;&#234; LATIN SMALL LETTER E WITH CIRCUMFLEX
+&#235;&#235; LATIN SMALL LETTER E WITH DIAERESIS
+&#236;&#236; LATIN SMALL LETTER I WITH GRAVE
+&#237;&#237; LATIN SMALL LETTER I WITH ACUTE
+&#238;&#238; LATIN SMALL LETTER I WITH CIRCUMFLEX
+&#239;&#239; LATIN SMALL LETTER I WITH DIAERESIS
+&#241;&#241; LATIN SMALL LETTER N WITH TILDE
+&#242;&#242; LATIN SMALL LETTER O WITH GRAVE
+&#243;&#243; LATIN SMALL LETTER O WITH ACUTE
+&#244;&#244; LATIN SMALL LETTER O WITH CIRCUMFLEX
+&#245;&#245; LATIN SMALL LETTER O WITH TILDE
+&#246;&#246; LATIN SMALL LETTER O WITH DIAERESIS
+&#247;&#247;&#247; DIVISION SIGN
+&#248;&#248; LATIN SMALL LETTER O WITH STROKE
+&#249;&#249; LATIN SMALL LETTER U WITH GRAVE
+&#250;&#250; LATIN SMALL LETTER U WITH ACUTE
+&#251;&#251; LATIN SMALL LETTER U WITH CIRCUMFLEX
+&#252;&#252; LATIN SMALL LETTER U WITH DIAERESIS
+&#253; LATIN SMALL LETTER Y WITH ACUTE
+&#255;&#255; LATIN SMALL LETTER Y WITH DIAERESIS
+ENDTEST
diff --git a/regress/char/unicode/latin1.out_utf8 b/regress/char/unicode/latin1.out_utf8
new file mode 100644
index 00000000..5fcc6dda
--- /dev/null
+++ b/regress/char/unicode/latin1.out_utf8
@@ -0,0 +1,98 @@
+CHAR-UNICODE-LATIN1(1) General Commands Manual CHAR-UNICODE-LATIN1(1)
+
+
+
+NNAAMMEE
+ char-unicode-latin1 - Unicode characters in the ISO-8859-1 range
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ ¢¢ CENT SIGN
+ ¤¤ CURRENCY SIGN
+ ¥¥ YEN SIGN
+ ¦¦ BROKEN BAR
+ ¨¨ DIAERESIS
+ ©© COPYRIGHT SIGN
+ ª FEMININE ORDINAL INDICATOR
+ «« LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ ¬¬¬ NOT SIGN
+ ­ SOFT HYPHEN
+ ®® REGISTERED SIGN
+ ±±± PLUS-MINUS SIGN
+ ² SUPERSCRIPT TWO
+ ³ SUPERSCRIPT THREE
+ ´´´ ACUTE ACCENT
+ µµ MICRO SIGN
+ ·· MIDDLE DOT
+ ¸¸ CEDILLA
+ ¹ SUPERSCRIPT ONE
+ º MASCULINE ORDINAL INDICATOR
+ »» RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ ¼¼ VULGAR FRACTION ONE QUARTER
+ ½½ VULGAR FRACTION ONE HALF
+ ¾¾ VULGAR FRACTION THREE QUARTERS
+ ÀÀ LATIN CAPITAL LETTER A WITH GRAVE
+ ÁÁ LATIN CAPITAL LETTER A WITH ACUTE
+ ÂÂ LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+ ÃÃ LATIN CAPITAL LETTER A WITH TILDE
+ ÄÄ LATIN CAPITAL LETTER A WITH DIAERESIS
+ ÅÅ LATIN CAPITAL LETTER A WITH RING ABOVE
+ ÆÆ LATIN CAPITAL LETTER AE
+ ÇÇ LATIN CAPITAL LETTER C WITH CEDILLA
+ ÈÈ LATIN CAPITAL LETTER E WITH GRAVE
+ ÉÉ LATIN CAPITAL LETTER E WITH ACUTE
+ ÊÊ LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+ ËË LATIN CAPITAL LETTER E WITH DIAERESIS
+ ÌÌ LATIN CAPITAL LETTER I WITH GRAVE
+ ÍÍ LATIN CAPITAL LETTER I WITH ACUTE
+ ÎÎ LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+ ÏÏ LATIN CAPITAL LETTER I WITH DIAERESIS
+ ÐÐ LATIN CAPITAL LETTER ETH
+ ÑÑ LATIN CAPITAL LETTER N WITH TILDE
+ ÒÒ LATIN CAPITAL LETTER O WITH GRAVE
+ ÓÓ LATIN CAPITAL LETTER O WITH ACUTE
+ ÔÔ LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+ ÕÕ LATIN CAPITAL LETTER O WITH TILDE
+ ÖÖ LATIN CAPITAL LETTER O WITH DIAERESIS
+ ××× MULTIPLICATION SIGN
+ ØØ LATIN CAPITAL LETTER O WITH STROKE
+ ÙÙ LATIN CAPITAL LETTER U WITH GRAVE
+ ÚÚ LATIN CAPITAL LETTER U WITH ACUTE
+ ÛÛ LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+ ÜÜ LATIN CAPITAL LETTER U WITH DIAERESIS
+ Ý LATIN CAPITAL LETTER Y WITH ACUTE
+ àà LATIN SMALL LETTER A WITH GRAVE
+ áá LATIN SMALL LETTER A WITH ACUTE
+ ââ LATIN SMALL LETTER A WITH CIRCUMFLEX
+ ãã LATIN SMALL LETTER A WITH TILDE
+ ää LATIN SMALL LETTER A WITH DIAERESIS
+ åå LATIN SMALL LETTER A WITH RING ABOVE
+ ææ LATIN SMALL LETTER AE
+ çç LATIN SMALL LETTER C WITH CEDILLA
+ èè LATIN SMALL LETTER E WITH GRAVE
+ éé LATIN SMALL LETTER E WITH ACUTE
+ êê LATIN SMALL LETTER E WITH CIRCUMFLEX
+ ëë LATIN SMALL LETTER E WITH DIAERESIS
+ ìì LATIN SMALL LETTER I WITH GRAVE
+ íí LATIN SMALL LETTER I WITH ACUTE
+ îî LATIN SMALL LETTER I WITH CIRCUMFLEX
+ ïï LATIN SMALL LETTER I WITH DIAERESIS
+ ññ LATIN SMALL LETTER N WITH TILDE
+ òò LATIN SMALL LETTER O WITH GRAVE
+ óó LATIN SMALL LETTER O WITH ACUTE
+ ôô LATIN SMALL LETTER O WITH CIRCUMFLEX
+ õõ LATIN SMALL LETTER O WITH TILDE
+ öö LATIN SMALL LETTER O WITH DIAERESIS
+ ÷÷÷ DIVISION SIGN
+ øø LATIN SMALL LETTER O WITH STROKE
+ ùù LATIN SMALL LETTER U WITH GRAVE
+ úú LATIN SMALL LETTER U WITH ACUTE
+ ûû LATIN SMALL LETTER U WITH CIRCUMFLEX
+ üü LATIN SMALL LETTER U WITH DIAERESIS
+ ý LATIN SMALL LETTER Y WITH ACUTE
+ ÿÿ LATIN SMALL LETTER Y WITH DIAERESIS
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-LATIN1(1)
diff --git a/regress/char/unicode/latin1diff.in b/regress/char/unicode/latin1diff.in
new file mode 100644
index 00000000..f0e255b5
--- /dev/null
+++ b/regress/char/unicode/latin1diff.in
@@ -0,0 +1,19 @@
+.TH CHAR-UNICODE-LATIN1DIFF 1 "October 27, 2014" OpenBSD
+.SH NAME
+char-unicode-latin1diff \- Unicode characters in the ISO-8859-1 range
+.SH DESCRIPTION
+.nf
+BEGINTEST
+\[u00A1]\(r! INVERTED EXCLAMATION MARK
+\[u00A3]\(Po POUND SIGN
+\[u00A7]\(sc SECTION SIGN
+\[u00AF]\(a- MACRON
+\[u00B0]\(de DEGREE SIGN
+\[u00B6]\(ps PILCROW SIGN
+\[u00BF]\(r? INVERTED QUESTION MARK
+\[u00DE]\(TP LATIN CAPITAL LETTER THORN
+\[u00DF]\(ss LATIN SMALL LETTER SHARP S
+\[u00F0]\(Sd LATIN SMALL LETTER ETH
+\[u00FE]\(Tp LATIN SMALL LETTER THORN
+ENDTEST
+.fi
diff --git a/regress/char/unicode/latin1diff.out_ascii b/regress/char/unicode/latin1diff.out_ascii
new file mode 100644
index 00000000..94095dd9
--- /dev/null
+++ b/regress/char/unicode/latin1diff.out_ascii
@@ -0,0 +1,25 @@
+CHAR-UNICODE-LATIN1DIFF(1) General Commands Manual CHAR-UNICODE-LATIN1DIFF(1)
+
+
+
+NNAAMMEE
+ char-unicode-latin1diff - Unicode characters in the ISO-8859-1 range
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ !! INVERTED EXCLAMATION MARK
+ GBPGBP POUND SIGN
+ <sec><sec> SECTION SIGN
+ -- MACRON
+ <deg><deg> DEGREE SIGN
+ <par><par> PILCROW SIGN
+ ?? INVERTED QUESTION MARK
+ ThTh LATIN CAPITAL LETTER THORN
+ ssss LATIN SMALL LETTER SHARP S
+ dd LATIN SMALL LETTER ETH
+ thth LATIN SMALL LETTER THORN
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-LATIN1DIFF(1)
diff --git a/regress/char/unicode/latin1diff.out_html b/regress/char/unicode/latin1diff.out_html
new file mode 100644
index 00000000..8d3265c7
--- /dev/null
+++ b/regress/char/unicode/latin1diff.out_html
@@ -0,0 +1,13 @@
+BEGINTEST
+&#161;&#161; INVERTED EXCLAMATION MARK
+&#163;&#163; POUND SIGN
+&#167;&#167; SECTION SIGN
+&#175;&#175; MACRON
+&#176;&#176; DEGREE SIGN
+&#182;&#182; PILCROW SIGN
+&#191;&#191; INVERTED QUESTION MARK
+&#222;&#222; LATIN CAPITAL LETTER THORN
+&#223;&#223; LATIN SMALL LETTER SHARP S
+&#240;&#240; LATIN SMALL LETTER ETH
+&#254;&#254; LATIN SMALL LETTER THORN
+ENDTEST
diff --git a/regress/char/unicode/latin1diff.out_utf8 b/regress/char/unicode/latin1diff.out_utf8
new file mode 100644
index 00000000..58bb0c08
--- /dev/null
+++ b/regress/char/unicode/latin1diff.out_utf8
@@ -0,0 +1,25 @@
+CHAR-UNICODE-LATIN1DIFF(1) General Commands Manual CHAR-UNICODE-LATIN1DIFF(1)
+
+
+
+NNAAMMEE
+ char-unicode-latin1diff - Unicode characters in the ISO-8859-1 range
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ ¡¡ INVERTED EXCLAMATION MARK
+ ££ POUND SIGN
+ §§ SECTION SIGN
+ ¯¯ MACRON
+ °° DEGREE SIGN
+ ¶¶ PILCROW SIGN
+ ¿¿ INVERTED QUESTION MARK
+ ÞÞ LATIN CAPITAL LETTER THORN
+ ßß LATIN SMALL LETTER SHARP S
+ ðð LATIN SMALL LETTER ETH
+ þþ LATIN SMALL LETTER THORN
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-LATIN1DIFF(1)
diff --git a/regress/char/unicode/man.in b/regress/char/unicode/man.in
new file mode 100644
index 00000000..56148b72
--- /dev/null
+++ b/regress/char/unicode/man.in
@@ -0,0 +1,12 @@
+.TH CHAR-UNICODE-MAN 1 "October 13, 2014" OpenBSD
+.SH NAME
+char-unicode-mdoc \- unicode characters in man code
+.SH DESCRIPTION
+Copyright symbol: \[u00A9] = \C'u00A9'
+.PP
+m-dash: \[u2014] = \C'u2014'
+.PP
+nabla: \[u1D6C1] = \C'u1D6C1'
+.PP
+not really Unicode:
+up arrows: \(ua\(uA = \[ua]\[uA] = \C'ua'\C'uA'
diff --git a/regress/char/unicode/man.out_utf8 b/regress/char/unicode/man.out_utf8
new file mode 100644
index 00000000..8ed9d2ee
--- /dev/null
+++ b/regress/char/unicode/man.out_utf8
@@ -0,0 +1,19 @@
+CHAR-UNICODE-MAN(1) General Commands Manual CHAR-UNICODE-MAN(1)
+
+
+
+NNAAMMEE
+ char-unicode-mdoc - unicode characters in man code
+
+DDEESSCCRRIIPPTTIIOONN
+ Copyright symbol: © = ©
+
+ m-dash: — = —
+
+ nabla: 𝛁 = 𝛁
+
+ not really Unicode: up arrows: ↑⇑ = ↑⇑ = ↑⇑
+
+
+
+OpenBSD October 13, 2014 CHAR-UNICODE-MAN(1)
diff --git a/regress/char/unicode/mdoc.in b/regress/char/unicode/mdoc.in
new file mode 100644
index 00000000..2a7af346
--- /dev/null
+++ b/regress/char/unicode/mdoc.in
@@ -0,0 +1,15 @@
+.Dd October 13, 2014
+.Dt CHAR-UNICODE-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm char-unicode-mdoc
+.Nd unicode characters in mdoc code
+.Sh DESCRIPTION
+Copyright symbol: \[u00A9] = \C'u00A9'
+.Pp
+m-dash: \[u2014] = \C'u2014'
+.Pp
+nabla: \[u1D6C1] = \C'u1D6C1'
+.Pp
+not really Unicode:
+up arrows: \(ua\(uA = \[ua]\[uA] = \C'ua'\C'uA'
diff --git a/regress/char/unicode/mdoc.out_utf8 b/regress/char/unicode/mdoc.out_utf8
new file mode 100644
index 00000000..7b0d13aa
--- /dev/null
+++ b/regress/char/unicode/mdoc.out_utf8
@@ -0,0 +1,15 @@
+CHAR-UNICODE-MDOC(1) General Commands Manual CHAR-UNICODE-MDOC(1)
+
+NNAAMMEE
+ cchhaarr--uunniiccooddee--mmddoocc – unicode characters in mdoc code
+
+DDEESSCCRRIIPPTTIIOONN
+ Copyright symbol: © = ©
+
+ m-dash: — = —
+
+ nabla: 𝛁 = 𝛁
+
+ not really Unicode: up arrows: ↑⇑ = ↑⇑ = ↑⇑
+
+OpenBSD October 13, 2014 OpenBSD
diff --git a/regress/char/unicode/named.in b/regress/char/unicode/named.in
new file mode 100644
index 00000000..5644d325
--- /dev/null
+++ b/regress/char/unicode/named.in
@@ -0,0 +1,155 @@
+.TH CHAR-UNICODE-NAMED 1 "October 27, 2014" OpenBSD
+.SH NAME
+char-unicode-named \- Unicode characters having named escapes
+.SH DESCRIPTION
+.nf
+BEGINTEST
+\[u0131]\(.i LATIN SMALL LETTER DOTLESS I
+\[u0132]\(IJ LATIN CAPITAL LIGATURE IJ
+\[u0133]\(ij LATIN SMALL LIGATURE IJ
+\[u0141]\(/L LATIN CAPITAL LETTER L WITH STROKE
+\[u0142]\(/l LATIN SMALL LETTER L WITH STROKE
+\[u0152]\(OE LATIN CAPITAL LIGATURE OE
+\[u0153]\(oe LATIN SMALL LIGATURE OE
+\[u0192]\(Fn LATIN SMALL LETTER F WITH HOOK
+\[u02C7]\(ah CARON
+\[u02D8]\(ab BREVE
+\[u02DA]\(ao RING ABOVE
+\[u02DB]\(ho OGONEK
+\[u02DD]\(a" DOUBLE ACUTE ACCENT
+\[u0391]\(*A GREEK CAPITAL LETTER ALPHA
+\[u0392]\(*B GREEK CAPITAL LETTER BETA
+\[u0394]\(*D GREEK CAPITAL LETTER DELTA
+\[u0395]\(*E GREEK CAPITAL LETTER EPSILON
+\[u0396]\(*Z GREEK CAPITAL LETTER ZETA
+\[u0397]\(*Y GREEK CAPITAL LETTER ETA
+\[u0398]\(*H GREEK CAPITAL LETTER THETA
+\[u0399]\(*I GREEK CAPITAL LETTER IOTA
+\[u039A]\(*K GREEK CAPITAL LETTER KAPPA
+\[u039B]\(*L GREEK CAPITAL LETTER LAMDA
+\[u039C]\(*M GREEK CAPITAL LETTER MU
+\[u039D]\(*N GREEK CAPITAL LETTER NU
+\[u039E]\(*C GREEK CAPITAL LETTER XI
+\[u039F]\(*O GREEK CAPITAL LETTER OMICRON
+\[u03A0]\(*P GREEK CAPITAL LETTER PI
+\[u03A1]\(*R GREEK CAPITAL LETTER RHO
+\[u03A4]\(*T GREEK CAPITAL LETTER TAU
+\[u03A5]\(*U GREEK CAPITAL LETTER UPSILON
+\[u03A6]\(*F GREEK CAPITAL LETTER PHI
+\[u03A7]\(*X GREEK CAPITAL LETTER CHI
+\[u03A8]\(*Q GREEK CAPITAL LETTER PSI
+\[u03A9]\(*W GREEK CAPITAL LETTER OMEGA
+\[u03B1]\(*a GREEK SMALL LETTER ALPHA
+\[u03B2]\(*b GREEK SMALL LETTER BETA
+\[u03B3]\(*g GREEK SMALL LETTER GAMMA
+\[u03B4]\(*d GREEK SMALL LETTER DELTA
+\[u03B5]\(*e GREEK SMALL LETTER EPSILON
+\[u03B6]\(*z GREEK SMALL LETTER ZETA
+\[u03B7]\(*y GREEK SMALL LETTER ETA
+\[u03B8]\(*h GREEK SMALL LETTER THETA
+\[u03B9]\(*i GREEK SMALL LETTER IOTA
+\[u03BA]\(*k GREEK SMALL LETTER KAPPA
+\[u03BB]\(*l GREEK SMALL LETTER LAMDA
+\[u03BC]\(*m GREEK SMALL LETTER MU
+\[u03BD]\(*n GREEK SMALL LETTER NU
+\[u03BE]\(*c GREEK SMALL LETTER XI
+\[u03BF]\(*o GREEK SMALL LETTER OMICRON
+\[u03C0]\(*p GREEK SMALL LETTER PI
+\[u03C1]\(*r GREEK SMALL LETTER RHO
+\[u03C2]\(ts GREEK SMALL LETTER FINAL SIGMA
+\[u03C3]\(*s GREEK SMALL LETTER SIGMA
+\[u03C4]\(*t GREEK SMALL LETTER TAU
+\[u03C5]\(*u GREEK SMALL LETTER UPSILON
+\[u03C6]\(+f GREEK SMALL LETTER PHI
+\[u03C7]\(*x GREEK SMALL LETTER CHI
+\[u03C8]\(*q GREEK SMALL LETTER PSI
+\[u03C9]\(*w GREEK SMALL LETTER OMEGA
+\[u03D1]\(+h GREEK THETA SYMBOL
+\[u03D5]\(*f GREEK PHI SYMBOL
+\[u03D6]\(+p GREEK PI SYMBOL
+\[u03F5]\(+e GREEK LUNATE EPSILON SYMBOL
+\[u2010]\(hy HYPHEN
+\[u2013]\(en EN DASH
+\[u2014]\(em EM DASH
+\[u2018]\(oq LEFT SINGLE QUOTATION MARK
+\[u2019]\(cq RIGHT SINGLE QUOTATION MARK
+\[u201A]\(bq SINGLE LOW-9 QUOTATION MARK
+\[u201C]\(lq LEFT DOUBLE QUOTATION MARK
+\[u201D]\(rq RIGHT DOUBLE QUOTATION MARK
+\[u201E]\(Bq DOUBLE LOW-9 QUOTATION MARK
+\[u2020]\(dg DAGGER
+\[u2021]\(dd DOUBLE DAGGER
+\[u2022]\(bu BULLET
+\[u2030]\(%0 PER MILLE SIGN
+\[u2032]\(fm PRIME
+\[u2033]\(sd DOUBLE PRIME
+\[u2039]\(fo SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+\[u203A]\(fc SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+\[u2044]\(f/ FRACTION SLASH
+\[u20AC]\(Eu\(eu EURO SIGN
+\[u2111]\(Im BLACK-LETTER CAPITAL I
+\[u211C]\(Re BLACK-LETTER CAPITAL R
+\[u2122]\(tm TRADE MARK SIGN
+\[u2135]\(Ah ALEF SYMBOL
+\[u2190]\(<- LEFTWARDS ARROW
+\[u2191]\(ua UPWARDS ARROW
+\[u2192]\(-> RIGHTWARDS ARROW
+\[u2193]\(da DOWNWARDS ARROW
+\[u2194]\(<> LEFT RIGHT ARROW
+\[u21B5]\(CR DOWNWARDS ARROW WITH CORNER LEFTWARDS
+\[u21D0]\(lA LEFTWARDS DOUBLE ARROW
+\[u21D1]\(uA UPWARDS DOUBLE ARROW
+\[u21D2]\(rA RIGHTWARDS DOUBLE ARROW
+\[u21D3]\(dA DOWNWARDS DOUBLE ARROW
+\[u21D4]\(hA LEFT RIGHT DOUBLE ARROW
+\[u2200]\(fa FOR ALL
+\[u2202]\(pd PARTIAL DIFFERENTIAL
+\[u2203]\(te THERE EXISTS
+\[u2205]\(es EMPTY SET
+\[u2208]\(mo ELEMENT OF
+\[u220B]\(st CONTAINS AS MEMBER
+\[u2212]\(mi MINUS SIGN
+\[u2213]\(-+ MINUS-OR-PLUS SIGN
+\[u2217]\(** ASTERISK OPERATOR
+\[u221A]\(sr SQUARE ROOT
+\[u221D]\(pt PROPORTIONAL TO
+\[u221E]\(if INFINITY
+\[u2220]\(/_ ANGLE
+\[u2227]\(AN LOGICAL AND
+\[u2228]\(OR LOGICAL OR
+\[u2229]\(ca INTERSECTION
+\[u222A]\(cu UNION
+\[u222B]\(is INTEGRAL
+\[u2234]\(tf\(3d THEREFORE
+\[u223C]\(ap TILDE OPERATOR
+\[u2243]\(|= ASYMPTOTICALLY EQUAL TO
+\[u2245]\(=~ APPROXIMATELY EQUAL TO
+\[u2248]\(~~\(~= ALMOST EQUAL TO
+\[u2260]\(!= NOT EQUAL TO
+\[u2261]\(== IDENTICAL TO
+\[u2262]\(ne NOT IDENTICAL TO
+\[u2264]\(<= LESS-THAN OR EQUAL TO
+\[u2265]\(>= GREATER-THAN OR EQUAL TO
+\[u2282]\(sb SUBSET OF
+\[u2283]\(sp SUPERSET OF
+\[u2286]\(ib SUBSET OF OR EQUAL TO
+\[u2287]\(ip SUPERSET OF OR EQUAL TO
+\[u2295]\(c+ CIRCLED PLUS
+\[u2297]\(c* CIRCLED TIMES
+\[u22A5]\(pp UP TACK
+\[u22C5]\(md DOT OPERATOR
+\[u2308]\(lc LEFT CEILING
+\[u2309]\(rc RIGHT CEILING
+\[u230A]\(lf LEFT FLOOR
+\[u230B]\(rf RIGHT FLOOR
+\[u23AA]\(bv CURLY BRACKET EXTENSION
+\[u2502]\(br BOX DRAWINGS LIGHT VERTICAL
+\[u25A1]\(sq WHITE SQUARE
+\[u25CA]\(lz LOZENGE
+\[u25CB]\(ci WHITE CIRCLE
+\[u261C]\(lh WHITE LEFT POINTING INDEX
+\[u261E]\(rh WHITE RIGHT POINTING INDEX
+\[u27E8]\(la MATHEMATICAL LEFT ANGLE BRACKET
+\[u27E9]\(ra MATHEMATICAL RIGHT ANGLE BRACKET
+ENDTEST
+.fi
diff --git a/regress/char/unicode/named.out_ascii b/regress/char/unicode/named.out_ascii
new file mode 100644
index 00000000..3f92caf1
--- /dev/null
+++ b/regress/char/unicode/named.out_ascii
@@ -0,0 +1,161 @@
+CHAR-UNICODE-NAMED(1) General Commands Manual CHAR-UNICODE-NAMED(1)
+
+
+
+NNAAMMEE
+ char-unicode-named - Unicode characters having named escapes
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ ii LATIN SMALL LETTER DOTLESS I
+ IJIJ LATIN CAPITAL LIGATURE IJ
+ ijij LATIN SMALL LIGATURE IJ
+ /L/L LATIN CAPITAL LETTER L WITH STROKE
+ /l/l LATIN SMALL LETTER L WITH STROKE
+ OEOE LATIN CAPITAL LIGATURE OE
+ oeoe LATIN SMALL LIGATURE OE
+ ,f,f LATIN SMALL LETTER F WITH HOOK
+ vv CARON
+ '`'` BREVE
+ oo RING ABOVE
+ ,, OGONEK
+ "" DOUBLE ACUTE ACCENT
+ AA GREEK CAPITAL LETTER ALPHA
+ BB GREEK CAPITAL LETTER BETA
+ _/_\_/_\ GREEK CAPITAL LETTER DELTA
+ EE GREEK CAPITAL LETTER EPSILON
+ ZZ GREEK CAPITAL LETTER ZETA
+ HH GREEK CAPITAL LETTER ETA
+ -O-O GREEK CAPITAL LETTER THETA
+ II GREEK CAPITAL LETTER IOTA
+ KK GREEK CAPITAL LETTER KAPPA
+ /\/\ GREEK CAPITAL LETTER LAMDA
+ MM GREEK CAPITAL LETTER MU
+ NN GREEK CAPITAL LETTER NU
+ _H_H GREEK CAPITAL LETTER XI
+ OO GREEK CAPITAL LETTER OMICRON
+ TTTT GREEK CAPITAL LETTER PI
+ PP GREEK CAPITAL LETTER RHO
+ TT GREEK CAPITAL LETTER TAU
+ YY GREEK CAPITAL LETTER UPSILON
+ IOIO GREEK CAPITAL LETTER PHI
+ XX GREEK CAPITAL LETTER CHI
+ IYIY GREEK CAPITAL LETTER PSI
+ _O_O GREEK CAPITAL LETTER OMEGA
+ aa GREEK SMALL LETTER ALPHA
+ BB GREEK SMALL LETTER BETA
+ yy GREEK SMALL LETTER GAMMA
+ dd GREEK SMALL LETTER DELTA
+ ee GREEK SMALL LETTER EPSILON
+ ,C,C GREEK SMALL LETTER ZETA
+ nn GREEK SMALL LETTER ETA
+ -0-0 GREEK SMALL LETTER THETA
+ ii GREEK SMALL LETTER IOTA
+ kk GREEK SMALL LETTER KAPPA
+ >\>\ GREEK SMALL LETTER LAMDA
+ ,u,u GREEK SMALL LETTER MU
+ vv GREEK SMALL LETTER NU
+ ,E,E GREEK SMALL LETTER XI
+ oo GREEK SMALL LETTER OMICRON
+ -n-n GREEK SMALL LETTER PI
+ pp GREEK SMALL LETTER RHO
+ ss GREEK SMALL LETTER FINAL SIGMA
+ -o-o GREEK SMALL LETTER SIGMA
+ ~t~t GREEK SMALL LETTER TAU
+ uu GREEK SMALL LETTER UPSILON
+ |o|o GREEK SMALL LETTER PHI
+ xx GREEK SMALL LETTER CHI
+ |u|u GREEK SMALL LETTER PSI
+ ww GREEK SMALL LETTER OMEGA
+ -0-0 GREEK THETA SYMBOL
+ |o|o GREEK PHI SYMBOL
+ -w-w GREEK PI SYMBOL
+ ee GREEK LUNATE EPSILON SYMBOL
+ -- HYPHEN
+ -- EN DASH
+ ---- EM DASH
+ `` LEFT SINGLE QUOTATION MARK
+ '' RIGHT SINGLE QUOTATION MARK
+ ,, SINGLE LOW-9 QUOTATION MARK
+ "" LEFT DOUBLE QUOTATION MARK
+ "" RIGHT DOUBLE QUOTATION MARK
+ ,,,, DOUBLE LOW-9 QUOTATION MARK
+ |-|- DAGGER
+ |=|= DOUBLE DAGGER
+ +o+o BULLET
+ %o%o PER MILLE SIGN
+ '' PRIME
+ '''' DOUBLE PRIME
+ << SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ >> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ // FRACTION SLASH
+ EUREUREUR EURO SIGN
+ II BLACK-LETTER CAPITAL I
+ RR BLACK-LETTER CAPITAL R
+ tmtm TRADE MARK SIGN
+ NN ALEF SYMBOL
+ <-<- LEFTWARDS ARROW
+ |^|^ UPWARDS ARROW
+ ->-> RIGHTWARDS ARROW
+ |v|v DOWNWARDS ARROW
+ <-><-> LEFT RIGHT ARROW
+ _|_| DOWNWARDS ARROW WITH CORNER LEFTWARDS
+ <=<= LEFTWARDS DOUBLE ARROW
+ =^=^ UPWARDS DOUBLE ARROW
+ =>=> RIGHTWARDS DOUBLE ARROW
+ =v=v DOWNWARDS DOUBLE ARROW
+ <=><=> LEFT RIGHT DOUBLE ARROW
+ -V-V FOR ALL
+ aa PARTIAL DIFFERENTIAL
+ 33 THERE EXISTS
+ {}{} EMPTY SET
+ EE ELEMENT OF
+ -)-) CONTAINS AS MEMBER
+ -- MINUS SIGN
+ -+-+ MINUS-OR-PLUS SIGN
+ ** ASTERISK OPERATOR
+ \/\/ SQUARE ROOT
+ ococ PROPORTIONAL TO
+ oooo INFINITY
+ _/_/ ANGLE
+ ^^ LOGICAL AND
+ vv LOGICAL OR
+ (^)(^) INTERSECTION
+ UU UNION
+ ',I',I INTEGRAL
+ .:..:..:. THEREFORE
+ ~~ TILDE OPERATOR
+ -~-~ ASYMPTOTICALLY EQUAL TO
+ =~=~ APPROXIMATELY EQUAL TO
+ ~~~~~= ALMOST EQUAL TO
+ !=!= NOT EQUAL TO
+ ==== IDENTICAL TO
+ !==!== NOT IDENTICAL TO
+ <=<= LESS-THAN OR EQUAL TO
+ >=>= GREATER-THAN OR EQUAL TO
+ (=(= SUBSET OF
+ =)=) SUPERSET OF
+ (=_(=_ SUBSET OF OR EQUAL TO
+ =_)=_) SUPERSET OF OR EQUAL TO
+ O+O+ CIRCLED PLUS
+ OxOx CIRCLED TIMES
+ _|_| UP TACK
+ .. DOT OPERATOR
+ |~|~ LEFT CEILING
+ ~|~| RIGHT CEILING
+ |_|_ LEFT FLOOR
+ _|_| RIGHT FLOOR
+ || CURLY BRACKET EXTENSION
+ || BOX DRAWINGS LIGHT VERTICAL
+ [][] WHITE SQUARE
+ <><> LOZENGE
+ OO WHITE CIRCLE
+ <=<= WHITE LEFT POINTING INDEX
+ =>=> WHITE RIGHT POINTING INDEX
+ << MATHEMATICAL LEFT ANGLE BRACKET
+ >> MATHEMATICAL RIGHT ANGLE BRACKET
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-NAMED(1)
diff --git a/regress/char/unicode/named.out_html b/regress/char/unicode/named.out_html
new file mode 100644
index 00000000..c4de9a5b
--- /dev/null
+++ b/regress/char/unicode/named.out_html
@@ -0,0 +1,149 @@
+BEGINTEST
+&#305;&#305; LATIN SMALL LETTER DOTLESS I
+&#306;&#306; LATIN CAPITAL LIGATURE IJ
+&#307;&#307; LATIN SMALL LIGATURE IJ
+&#321;&#321; LATIN CAPITAL LETTER L WITH STROKE
+&#322;&#322; LATIN SMALL LETTER L WITH STROKE
+&#338;&#338; LATIN CAPITAL LIGATURE OE
+&#339;&#339; LATIN SMALL LIGATURE OE
+&#402;&#402; LATIN SMALL LETTER F WITH HOOK
+&#711;&#711; CARON
+&#728;&#728; BREVE
+&#730;&#730; RING ABOVE
+&#731;&#731; OGONEK
+&#733;&#733; DOUBLE ACUTE ACCENT
+&#913;&#913; GREEK CAPITAL LETTER ALPHA
+&#914;&#914; GREEK CAPITAL LETTER BETA
+&#916;&#916; GREEK CAPITAL LETTER DELTA
+&#917;&#917; GREEK CAPITAL LETTER EPSILON
+&#918;&#918; GREEK CAPITAL LETTER ZETA
+&#919;&#919; GREEK CAPITAL LETTER ETA
+&#920;&#920; GREEK CAPITAL LETTER THETA
+&#921;&#921; GREEK CAPITAL LETTER IOTA
+&#922;&#922; GREEK CAPITAL LETTER KAPPA
+&#923;&#923; GREEK CAPITAL LETTER LAMDA
+&#924;&#924; GREEK CAPITAL LETTER MU
+&#925;&#925; GREEK CAPITAL LETTER NU
+&#926;&#926; GREEK CAPITAL LETTER XI
+&#927;&#927; GREEK CAPITAL LETTER OMICRON
+&#928;&#928; GREEK CAPITAL LETTER PI
+&#929;&#929; GREEK CAPITAL LETTER RHO
+&#932;&#932; GREEK CAPITAL LETTER TAU
+&#933;&#933; GREEK CAPITAL LETTER UPSILON
+&#934;&#934; GREEK CAPITAL LETTER PHI
+&#935;&#935; GREEK CAPITAL LETTER CHI
+&#936;&#936; GREEK CAPITAL LETTER PSI
+&#937;&#937; GREEK CAPITAL LETTER OMEGA
+&#945;&#945; GREEK SMALL LETTER ALPHA
+&#946;&#946; GREEK SMALL LETTER BETA
+&#947;&#947; GREEK SMALL LETTER GAMMA
+&#948;&#948; GREEK SMALL LETTER DELTA
+&#949;&#949; GREEK SMALL LETTER EPSILON
+&#950;&#950; GREEK SMALL LETTER ZETA
+&#951;&#951; GREEK SMALL LETTER ETA
+&#952;&#952; GREEK SMALL LETTER THETA
+&#953;&#953; GREEK SMALL LETTER IOTA
+&#954;&#954; GREEK SMALL LETTER KAPPA
+&#955;&#955; GREEK SMALL LETTER LAMDA
+&#956;&#956; GREEK SMALL LETTER MU
+&#957;&#957; GREEK SMALL LETTER NU
+&#958;&#958; GREEK SMALL LETTER XI
+&#959;&#959; GREEK SMALL LETTER OMICRON
+&#960;&#960; GREEK SMALL LETTER PI
+&#961;&#961; GREEK SMALL LETTER RHO
+&#962;&#962; GREEK SMALL LETTER FINAL SIGMA
+&#963;&#963; GREEK SMALL LETTER SIGMA
+&#964;&#964; GREEK SMALL LETTER TAU
+&#965;&#965; GREEK SMALL LETTER UPSILON
+&#966;&#966; GREEK SMALL LETTER PHI
+&#967;&#967; GREEK SMALL LETTER CHI
+&#968;&#968; GREEK SMALL LETTER PSI
+&#969;&#969; GREEK SMALL LETTER OMEGA
+&#977;&#977; GREEK THETA SYMBOL
+&#981;&#981; GREEK PHI SYMBOL
+&#982;&#982; GREEK PI SYMBOL
+&#1013;&#1013; GREEK LUNATE EPSILON SYMBOL
+&#8208;&#8208; HYPHEN
+&#8211;&#8211; EN DASH
+&#8212;&#8212; EM DASH
+&#8216;&#8216; LEFT SINGLE QUOTATION MARK
+&#8217;&#8217; RIGHT SINGLE QUOTATION MARK
+&#8218;&#8218; SINGLE LOW-9 QUOTATION MARK
+&#8220;&#8220; LEFT DOUBLE QUOTATION MARK
+&#8221;&#8221; RIGHT DOUBLE QUOTATION MARK
+&#8222;&#8222; DOUBLE LOW-9 QUOTATION MARK
+&#8224;&#8224; DAGGER
+&#8225;&#8225; DOUBLE DAGGER
+&#8226;&#8226; BULLET
+&#8240;&#8240; PER MILLE SIGN
+&#8242;&#8242; PRIME
+&#8243;&#8243; DOUBLE PRIME
+&#8249;&#8249; SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+&#8250;&#8250; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+&#8260;&#8260; FRACTION SLASH
+&#8364;&#8364;&#8364; EURO SIGN
+&#8465;&#8465; BLACK-LETTER CAPITAL I
+&#8476;&#8476; BLACK-LETTER CAPITAL R
+&#8482;&#8482; TRADE MARK SIGN
+&#8501;&#8501; ALEF SYMBOL
+&#8592;&#8592; LEFTWARDS ARROW
+&#8593;&#8593; UPWARDS ARROW
+&#8594;&#8594; RIGHTWARDS ARROW
+&#8595;&#8595; DOWNWARDS ARROW
+&#8596;&#8596; LEFT RIGHT ARROW
+&#8629;&#8629; DOWNWARDS ARROW WITH CORNER LEFTWARDS
+&#8656;&#8656; LEFTWARDS DOUBLE ARROW
+&#8657;&#8657; UPWARDS DOUBLE ARROW
+&#8658;&#8658; RIGHTWARDS DOUBLE ARROW
+&#8659;&#8659; DOWNWARDS DOUBLE ARROW
+&#8660;&#8660; LEFT RIGHT DOUBLE ARROW
+&#8704;&#8704; FOR ALL
+&#8706;&#8706; PARTIAL DIFFERENTIAL
+&#8707;&#8707; THERE EXISTS
+&#8709;&#8709; EMPTY SET
+&#8712;&#8712; ELEMENT OF
+&#8715;&#8715; CONTAINS AS MEMBER
+&#8722;&#8722; MINUS SIGN
+&#8723;&#8723; MINUS-OR-PLUS SIGN
+&#8727;&#8727; ASTERISK OPERATOR
+&#8730;&#8730; SQUARE ROOT
+&#8733;&#8733; PROPORTIONAL TO
+&#8734;&#8734; INFINITY
+&#8736;&#8736; ANGLE
+&#8743;&#8743; LOGICAL AND
+&#8744;&#8744; LOGICAL OR
+&#8745;&#8745; INTERSECTION
+&#8746;&#8746; UNION
+&#8747;&#8747; INTEGRAL
+&#8756;&#8756;&#8756; THEREFORE
+&#8764;&#8764; TILDE OPERATOR
+&#8771;&#8771; ASYMPTOTICALLY EQUAL TO
+&#8773;&#8773; APPROXIMATELY EQUAL TO
+&#8776;&#8776;&#8776; ALMOST EQUAL TO
+&#8800;&#8800; NOT EQUAL TO
+&#8801;&#8801; IDENTICAL TO
+&#8802;&#8802; NOT IDENTICAL TO
+&#8804;&#8804; LESS-THAN OR EQUAL TO
+&#8805;&#8805; GREATER-THAN OR EQUAL TO
+&#8834;&#8834; SUBSET OF
+&#8835;&#8835; SUPERSET OF
+&#8838;&#8838; SUBSET OF OR EQUAL TO
+&#8839;&#8839; SUPERSET OF OR EQUAL TO
+&#8853;&#8853; CIRCLED PLUS
+&#8855;&#8855; CIRCLED TIMES
+&#8869;&#8869; UP TACK
+&#8901;&#8901; DOT OPERATOR
+&#8968;&#8968; LEFT CEILING
+&#8969;&#8969; RIGHT CEILING
+&#8970;&#8970; LEFT FLOOR
+&#8971;&#8971; RIGHT FLOOR
+&#9130;&#9130; CURLY BRACKET EXTENSION
+&#9474;&#9474; BOX DRAWINGS LIGHT VERTICAL
+&#9633;&#9633; WHITE SQUARE
+&#9674;&#9674; LOZENGE
+&#9675;&#9675; WHITE CIRCLE
+&#9756;&#9756; WHITE LEFT POINTING INDEX
+&#9758;&#9758; WHITE RIGHT POINTING INDEX
+&#10216;&#10216; MATHEMATICAL LEFT ANGLE BRACKET
+&#10217;&#10217; MATHEMATICAL RIGHT ANGLE BRACKET
+ENDTEST
diff --git a/regress/char/unicode/named.out_utf8 b/regress/char/unicode/named.out_utf8
new file mode 100644
index 00000000..3900ceb5
--- /dev/null
+++ b/regress/char/unicode/named.out_utf8
@@ -0,0 +1,161 @@
+CHAR-UNICODE-NAMED(1) General Commands Manual CHAR-UNICODE-NAMED(1)
+
+
+
+NNAAMMEE
+ char-unicode-named - Unicode characters having named escapes
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ ıı LATIN SMALL LETTER DOTLESS I
+ IJIJ LATIN CAPITAL LIGATURE IJ
+ ijij LATIN SMALL LIGATURE IJ
+ ŁŁ LATIN CAPITAL LETTER L WITH STROKE
+ łł LATIN SMALL LETTER L WITH STROKE
+ ŒŒ LATIN CAPITAL LIGATURE OE
+ œœ LATIN SMALL LIGATURE OE
+ ƒƒ LATIN SMALL LETTER F WITH HOOK
+ ˇˇ CARON
+ ˘˘ BREVE
+ ˚˚ RING ABOVE
+ ˛˛ OGONEK
+ ˝˝ DOUBLE ACUTE ACCENT
+ ΑΑ GREEK CAPITAL LETTER ALPHA
+ ΒΒ GREEK CAPITAL LETTER BETA
+ ΔΔ GREEK CAPITAL LETTER DELTA
+ ΕΕ GREEK CAPITAL LETTER EPSILON
+ ΖΖ GREEK CAPITAL LETTER ZETA
+ ΗΗ GREEK CAPITAL LETTER ETA
+ ΘΘ GREEK CAPITAL LETTER THETA
+ ΙΙ GREEK CAPITAL LETTER IOTA
+ ΚΚ GREEK CAPITAL LETTER KAPPA
+ ΛΛ GREEK CAPITAL LETTER LAMDA
+ ΜΜ GREEK CAPITAL LETTER MU
+ ΝΝ GREEK CAPITAL LETTER NU
+ ΞΞ GREEK CAPITAL LETTER XI
+ ΟΟ GREEK CAPITAL LETTER OMICRON
+ ΠΠ GREEK CAPITAL LETTER PI
+ ΡΡ GREEK CAPITAL LETTER RHO
+ ΤΤ GREEK CAPITAL LETTER TAU
+ ΥΥ GREEK CAPITAL LETTER UPSILON
+ ΦΦ GREEK CAPITAL LETTER PHI
+ ΧΧ GREEK CAPITAL LETTER CHI
+ ΨΨ GREEK CAPITAL LETTER PSI
+ ΩΩ GREEK CAPITAL LETTER OMEGA
+ αα GREEK SMALL LETTER ALPHA
+ ββ GREEK SMALL LETTER BETA
+ γγ GREEK SMALL LETTER GAMMA
+ δδ GREEK SMALL LETTER DELTA
+ εε GREEK SMALL LETTER EPSILON
+ ζζ GREEK SMALL LETTER ZETA
+ ηη GREEK SMALL LETTER ETA
+ θθ GREEK SMALL LETTER THETA
+ ιι GREEK SMALL LETTER IOTA
+ κκ GREEK SMALL LETTER KAPPA
+ λλ GREEK SMALL LETTER LAMDA
+ μμ GREEK SMALL LETTER MU
+ νν GREEK SMALL LETTER NU
+ ξξ GREEK SMALL LETTER XI
+ οο GREEK SMALL LETTER OMICRON
+ ππ GREEK SMALL LETTER PI
+ ρρ GREEK SMALL LETTER RHO
+ ςς GREEK SMALL LETTER FINAL SIGMA
+ σσ GREEK SMALL LETTER SIGMA
+ ττ GREEK SMALL LETTER TAU
+ υυ GREEK SMALL LETTER UPSILON
+ φφ GREEK SMALL LETTER PHI
+ χχ GREEK SMALL LETTER CHI
+ ψψ GREEK SMALL LETTER PSI
+ ωω GREEK SMALL LETTER OMEGA
+ ϑϑ GREEK THETA SYMBOL
+ ϕϕ GREEK PHI SYMBOL
+ ϖϖ GREEK PI SYMBOL
+ ϵϵ GREEK LUNATE EPSILON SYMBOL
+ ‐‐ HYPHEN
+ –– EN DASH
+ —— EM DASH
+ ‘‘ LEFT SINGLE QUOTATION MARK
+ ’’ RIGHT SINGLE QUOTATION MARK
+ ‚‚ SINGLE LOW-9 QUOTATION MARK
+ ““ LEFT DOUBLE QUOTATION MARK
+ ”” RIGHT DOUBLE QUOTATION MARK
+ „„ DOUBLE LOW-9 QUOTATION MARK
+ †† DAGGER
+ ‡‡ DOUBLE DAGGER
+ •• BULLET
+ ‰‰ PER MILLE SIGN
+ ′′ PRIME
+ ″″ DOUBLE PRIME
+ ‹‹ SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ ›› SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ ⁄⁄ FRACTION SLASH
+ €€€ EURO SIGN
+ ℑℑ BLACK-LETTER CAPITAL I
+ ℜℜ BLACK-LETTER CAPITAL R
+ ™™ TRADE MARK SIGN
+ ℵℵ ALEF SYMBOL
+ ←← LEFTWARDS ARROW
+ ↑↑ UPWARDS ARROW
+ →→ RIGHTWARDS ARROW
+ ↓↓ DOWNWARDS ARROW
+ ↔↔ LEFT RIGHT ARROW
+ ↵↵ DOWNWARDS ARROW WITH CORNER LEFTWARDS
+ ⇐⇐ LEFTWARDS DOUBLE ARROW
+ ⇑⇑ UPWARDS DOUBLE ARROW
+ ⇒⇒ RIGHTWARDS DOUBLE ARROW
+ ⇓⇓ DOWNWARDS DOUBLE ARROW
+ ⇔⇔ LEFT RIGHT DOUBLE ARROW
+ ∀∀ FOR ALL
+ ∂∂ PARTIAL DIFFERENTIAL
+ ∃∃ THERE EXISTS
+ ∅∅ EMPTY SET
+ ∈∈ ELEMENT OF
+ ∋∋ CONTAINS AS MEMBER
+ −− MINUS SIGN
+ ∓∓ MINUS-OR-PLUS SIGN
+ ∗∗ ASTERISK OPERATOR
+ √√ SQUARE ROOT
+ ∝∝ PROPORTIONAL TO
+ ∞∞ INFINITY
+ ∠∠ ANGLE
+ ∧∧ LOGICAL AND
+ ∨∨ LOGICAL OR
+ ∩∩ INTERSECTION
+ ∪∪ UNION
+ ∫∫ INTEGRAL
+ ∴∴∴ THEREFORE
+ ∼∼ TILDE OPERATOR
+ ≃≃ ASYMPTOTICALLY EQUAL TO
+ ≅≅ APPROXIMATELY EQUAL TO
+ ≈≈≈ ALMOST EQUAL TO
+ ≠≠ NOT EQUAL TO
+ ≡≡ IDENTICAL TO
+ ≢≢ NOT IDENTICAL TO
+ ≤≤ LESS-THAN OR EQUAL TO
+ ≥≥ GREATER-THAN OR EQUAL TO
+ ⊂⊂ SUBSET OF
+ ⊃⊃ SUPERSET OF
+ ⊆⊆ SUBSET OF OR EQUAL TO
+ ⊇⊇ SUPERSET OF OR EQUAL TO
+ ⊕⊕ CIRCLED PLUS
+ ⊗⊗ CIRCLED TIMES
+ ⊥⊥ UP TACK
+ ⋅⋅ DOT OPERATOR
+ ⌈⌈ LEFT CEILING
+ ⌉⌉ RIGHT CEILING
+ ⌊⌊ LEFT FLOOR
+ ⌋⌋ RIGHT FLOOR
+ ⎪⎪ CURLY BRACKET EXTENSION
+ ││ BOX DRAWINGS LIGHT VERTICAL
+ □□ WHITE SQUARE
+ ◊◊ LOZENGE
+ ○○ WHITE CIRCLE
+ ☜☜ WHITE LEFT POINTING INDEX
+ ☞☞ WHITE RIGHT POINTING INDEX
+ ⟨⟨ MATHEMATICAL LEFT ANGLE BRACKET
+ ⟩⟩ MATHEMATICAL RIGHT ANGLE BRACKET
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-NAMED(1)
diff --git a/regress/char/unicode/namediff.in b/regress/char/unicode/namediff.in
new file mode 100644
index 00000000..672478e4
--- /dev/null
+++ b/regress/char/unicode/namediff.in
@@ -0,0 +1,43 @@
+.TH CHAR-UNICODE-NAMEDIFF 1 "October 27, 2014" OpenBSD
+.SH NAME
+char-unicode-namediff \- Unicode characters having named escapes
+.SH DESCRIPTION
+.nf
+BEGINTEST
+\[u0237]\(.j LATIN SMALL LETTER DOTLESS J
+\[u02D9]\(a. DOT ABOVE
+\[u0393]\(*G GREEK CAPITAL LETTER GAMMA
+\[u03A3]\(*S GREEK CAPITAL LETTER SIGMA
+\[u203E]\(rn OVERLINE
+\[u210F]\(-h PLANCK CONSTANT OVER TWO PI
+\[u2195]\(va UP DOWN ARROW
+\[u21D5]\(vA UP DOWN DOUBLE ARROW
+\[u2207]\(gr NABLA
+\[u2209]\(nm NOT AN ELEMENT OF
+\[u220F]\[product] N-ARY PRODUCT
+\[u2210]\[coproduct] N-ARY COPRODUCT
+\[u2211]\[sum] N-ARY SUMMATION
+\[u2284]\(nb NOT A SUBSET OF
+\[u2285]\(nc NOT A SUPERSET OF
+\[u239B]\[parenlefttp] LEFT PARENTHESIS UPPER HOOK
+\[u239C]\[parenleftex] LEFT PARENTHESIS EXTENSION
+\[u239D]\[parenleftbt] LEFT PARENTHESIS LOWER HOOK
+\[u239E]\[parenrighttp] RIGHT PARENTHESIS UPPER HOOK
+\[u239F]\[parenrightex] RIGHT PARENTHESIS EXTENSION
+\[u23A0]\[parenrightbt] RIGHT PARENTHESIS LOWER HOOK
+\[u23A1]\[bracketlefttp] LEFT SQUARE BRACKET UPPER CORNER
+\[u23A2]\[bracketleftex] LEFT SQUARE BRACKET EXTENSION
+\[u23A3]\[bracketleftbt] LEFT SQUARE BRACKET LOWER CORNER
+\[u23A4]\[bracketrighttp] RIGHT SQUARE BRACKET UPPER CORNER
+\[u23A5]\[bracketrightex] RIGHT SQUARE BRACKET EXTENSION
+\[u23A6]\[bracketrightbt] RIGHT SQUARE BRACKET LOWER CORNER
+\[u23A7]\[bracelefttp] LEFT CURLY BRACKET UPPER HOOK
+\[u23A8]\[braceleftmid] LEFT CURLY BRACKET MIDDLE PIECE
+\[u23A9]\[braceleftbt] LEFT CURLY BRACKET LOWER HOOK
+\[u23AA]\[braceex]\[braceleftex]\[bracerightex] CURLY BRACKET EXTENSION
+\[u23AB]\[bracerighttp] RIGHT CURLY BRACKET UPPER HOOK
+\[u23AC]\[bracerightmid] RIGHT CURLY BRACKET MIDDLE PIECE
+\[u23AD]\[bracerightbt] RIGHT CURLY BRACKET LOWER HOOK
+\[u2713]\(OK CHECK MARK
+ENDTEST
+.fi
diff --git a/regress/char/unicode/namediff.out_ascii b/regress/char/unicode/namediff.out_ascii
new file mode 100644
index 00000000..cd8313a3
--- /dev/null
+++ b/regress/char/unicode/namediff.out_ascii
@@ -0,0 +1,49 @@
+CHAR-UNICODE-NAMEDIFF(1) General Commands Manual CHAR-UNICODE-NAMEDIFF(1)
+
+
+
+NNAAMMEE
+ char-unicode-namediff - Unicode characters having named escapes
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ jj LATIN SMALL LETTER DOTLESS J
+ .. DOT ABOVE
+ GG GREEK CAPITAL LETTER GAMMA
+ SS GREEK CAPITAL LETTER SIGMA
+ -- OVERLINE
+ /h/h PLANCK CONSTANT OVER TWO PI
+ ^v^v UP DOWN ARROW
+ ^=v^=v UP DOWN DOUBLE ARROW
+ VV NABLA
+ !E!E NOT AN ELEMENT OF
+ TTTT N-ARY PRODUCT
+ UU N-ARY COPRODUCT
+ EE N-ARY SUMMATION
+ (!=(!= NOT A SUBSET OF
+ !=)!=) NOT A SUPERSET OF
+ // LEFT PARENTHESIS UPPER HOOK
+ || LEFT PARENTHESIS EXTENSION
+ \\ LEFT PARENTHESIS LOWER HOOK
+ \\ RIGHT PARENTHESIS UPPER HOOK
+ || RIGHT PARENTHESIS EXTENSION
+ // RIGHT PARENTHESIS LOWER HOOK
+ || LEFT SQUARE BRACKET UPPER CORNER
+ || LEFT SQUARE BRACKET EXTENSION
+ || LEFT SQUARE BRACKET LOWER CORNER
+ || RIGHT SQUARE BRACKET UPPER CORNER
+ || RIGHT SQUARE BRACKET EXTENSION
+ || RIGHT SQUARE BRACKET LOWER CORNER
+ ,-,- LEFT CURLY BRACKET UPPER HOOK
+ {{ LEFT CURLY BRACKET MIDDLE PIECE
+ `-`- LEFT CURLY BRACKET LOWER HOOK
+ |||| CURLY BRACKET EXTENSION
+ -.-. RIGHT CURLY BRACKET UPPER HOOK
+ }} RIGHT CURLY BRACKET MIDDLE PIECE
+ -'-' RIGHT CURLY BRACKET LOWER HOOK
+ \/\/ CHECK MARK
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-NAMEDIFF(1)
diff --git a/regress/char/unicode/namediff.out_html b/regress/char/unicode/namediff.out_html
new file mode 100644
index 00000000..d682ffbe
--- /dev/null
+++ b/regress/char/unicode/namediff.out_html
@@ -0,0 +1,37 @@
+BEGINTEST
+&#567;&#567; LATIN SMALL LETTER DOTLESS J
+&#729;&#729; DOT ABOVE
+&#915;&#915; GREEK CAPITAL LETTER GAMMA
+&#931;&#931; GREEK CAPITAL LETTER SIGMA
+&#8254;&#8254; OVERLINE
+&#8463;&#8463; PLANCK CONSTANT OVER TWO PI
+&#8597;&#8597; UP DOWN ARROW
+&#8661;&#8661; UP DOWN DOUBLE ARROW
+&#8711;&#8711; NABLA
+&#8713;&#8713; NOT AN ELEMENT OF
+&#8719;&#8719; N-ARY PRODUCT
+&#8720;&#8720; N-ARY COPRODUCT
+&#8721;&#8721; N-ARY SUMMATION
+&#8836;&#8836; NOT A SUBSET OF
+&#8837;&#8837; NOT A SUPERSET OF
+&#9115;&#9115; LEFT PARENTHESIS UPPER HOOK
+&#9116;&#9116; LEFT PARENTHESIS EXTENSION
+&#9117;&#9117; LEFT PARENTHESIS LOWER HOOK
+&#9118;&#9118; RIGHT PARENTHESIS UPPER HOOK
+&#9119;&#9119; RIGHT PARENTHESIS EXTENSION
+&#9120;&#9120; RIGHT PARENTHESIS LOWER HOOK
+&#9121;&#9121; LEFT SQUARE BRACKET UPPER CORNER
+&#9122;&#9122; LEFT SQUARE BRACKET EXTENSION
+&#9123;&#9123; LEFT SQUARE BRACKET LOWER CORNER
+&#9124;&#9124; RIGHT SQUARE BRACKET UPPER CORNER
+&#9125;&#9125; RIGHT SQUARE BRACKET EXTENSION
+&#9126;&#9126; RIGHT SQUARE BRACKET LOWER CORNER
+&#9127;&#9127; LEFT CURLY BRACKET UPPER HOOK
+&#9128;&#9128; LEFT CURLY BRACKET MIDDLE PIECE
+&#9129;&#9129; LEFT CURLY BRACKET LOWER HOOK
+&#9130;&#9130;&#9130;&#9130; CURLY BRACKET EXTENSION
+&#9131;&#9131; RIGHT CURLY BRACKET UPPER HOOK
+&#9132;&#9132; RIGHT CURLY BRACKET MIDDLE PIECE
+&#9133;&#9133; RIGHT CURLY BRACKET LOWER HOOK
+&#10003;&#10003; CHECK MARK
+ENDTEST
diff --git a/regress/char/unicode/namediff.out_utf8 b/regress/char/unicode/namediff.out_utf8
new file mode 100644
index 00000000..9ac104bf
--- /dev/null
+++ b/regress/char/unicode/namediff.out_utf8
@@ -0,0 +1,49 @@
+CHAR-UNICODE-NAMEDIFF(1) General Commands Manual CHAR-UNICODE-NAMEDIFF(1)
+
+
+
+NNAAMMEE
+ char-unicode-namediff - Unicode characters having named escapes
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ ȷȷ LATIN SMALL LETTER DOTLESS J
+ ˙˙ DOT ABOVE
+ ΓΓ GREEK CAPITAL LETTER GAMMA
+ ΣΣ GREEK CAPITAL LETTER SIGMA
+ ‾‾ OVERLINE
+ ℏℏ PLANCK CONSTANT OVER TWO PI
+ ↕↕ UP DOWN ARROW
+ ⇕⇕ UP DOWN DOUBLE ARROW
+ ∇∇ NABLA
+ ∉∉ NOT AN ELEMENT OF
+ ∏∏ N-ARY PRODUCT
+ ∐∐ N-ARY COPRODUCT
+ ∑∑ N-ARY SUMMATION
+ ⊄⊄ NOT A SUBSET OF
+ ⊅⊅ NOT A SUPERSET OF
+ ⎛⎛ LEFT PARENTHESIS UPPER HOOK
+ ⎜⎜ LEFT PARENTHESIS EXTENSION
+ ⎝⎝ LEFT PARENTHESIS LOWER HOOK
+ ⎞⎞ RIGHT PARENTHESIS UPPER HOOK
+ ⎟⎟ RIGHT PARENTHESIS EXTENSION
+ ⎠⎠ RIGHT PARENTHESIS LOWER HOOK
+ ⎡⎡ LEFT SQUARE BRACKET UPPER CORNER
+ ⎢⎢ LEFT SQUARE BRACKET EXTENSION
+ ⎣⎣ LEFT SQUARE BRACKET LOWER CORNER
+ ⎤⎤ RIGHT SQUARE BRACKET UPPER CORNER
+ ⎥⎥ RIGHT SQUARE BRACKET EXTENSION
+ ⎦⎦ RIGHT SQUARE BRACKET LOWER CORNER
+ ⎧⎧ LEFT CURLY BRACKET UPPER HOOK
+ ⎨⎨ LEFT CURLY BRACKET MIDDLE PIECE
+ ⎩⎩ LEFT CURLY BRACKET LOWER HOOK
+ ⎪⎪⎪⎪ CURLY BRACKET EXTENSION
+ ⎫⎫ RIGHT CURLY BRACKET UPPER HOOK
+ ⎬⎬ RIGHT CURLY BRACKET MIDDLE PIECE
+ ⎭⎭ RIGHT CURLY BRACKET LOWER HOOK
+ ✓✓ CHECK MARK
+ ENDTEST
+
+
+
+OpenBSD October 27, 2014 CHAR-UNICODE-NAMEDIFF(1)
diff --git a/regress/char/unicode/nogroff.in b/regress/char/unicode/nogroff.in
new file mode 100644
index 00000000..10e5f516
--- /dev/null
+++ b/regress/char/unicode/nogroff.in
@@ -0,0 +1,43 @@
+.TH CHAR-UNICODE-NOGROFF 1 "October 28, 2014" OpenBSD
+.SH NAME
+char-unicode-nogroff \- characters handled differently by groff
+.SH DESCRIPTION
+.nf
+BEGINTEST
+\[u0000]\N'0' <control> NULL
+\[u0001]\N'1' <control> START OF HEADING
+\[u0007]\N'7' <control> BELL
+\[u0008]\N'8' <control> BACKSPACE
+\[u0009]\N'9' <control> CHARACTER TABULATION
+\[u000A]\N'10' <control> LINE FEED
+\[u000B]\N'11' <control> LINE TABULATION
+\[u000C]\N'12' <control> FORM FEED
+\[u000D]\N'13' <control> CARRIAGE RETURN
+\[u001B]\N'27' <control> ESCAPE
+\[u007F]\N'127' <control> DELETE
+\[u0080]\N'128' <control> 0x80
+\[u0081]\N'129' <control> 0x81
+\[u0082]\N'130' <control> BREAK PERMITTED HERE
+\[u0083]\N'131' <control> NO BREAK HERE
+\[u009E]\N'158' <control> PRIVACY MESSAGE
+\[u009F]\N'159' <control> APPLICATION PROGRAM COMMAND
+\[u226A]\(<< MUCH LESS-THAN
+\[u226B]\(>> MUCH GREATER-THAN
+\[uFB00]\(ff LATIN SMALL LIGATURE FF
+\[uFB01]\(fi LATIN SMALL LIGATURE FI
+\[uFB02]\(fl LATIN SMALL LIGATURE FL
+\[uFB03]\(Fi LATIN SMALL LIGATURE FFI
+\[uFB04]\(Fl LATIN SMALL LIGATURE FFL
+\[uFFFD] REPLACEMENT CHARACTER
+\[uFFFE] <undefined>
+\[uFFFF] <undefined>
+\[u10000] LINEAR B SYLLABLE B008 A
+\[uFFFFD] <Plane 15 Private Use, Last>
+\[uFFFFE] <undefined>
+\[uFFFFF] <undefined>
+\[u100000] <Plane 16 Private Use, First>
+\[u10FFFD] <Plane 16 Private Use, Last>
+\[u10FFFE] <undefined>
+\[u10FFFF] <undefined>
+ENDTEST
+.fi
diff --git a/regress/char/unicode/nogroff.out_ascii b/regress/char/unicode/nogroff.out_ascii
new file mode 100644
index 00000000..d03b87e8
--- /dev/null
+++ b/regress/char/unicode/nogroff.out_ascii
@@ -0,0 +1,49 @@
+CHAR-UNICODE-NOGROFF(1) General Commands Manual CHAR-UNICODE-NOGROFF(1)
+
+
+
+NNAAMMEE
+ char-unicode-nogroff - characters handled differently by groff
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ <NUL><NUL> <control> NULL
+ <SOH><SOH> <control> START OF HEADING
+ <BEL><BEL> <control> BELL
+ <BS><BS> <control> BACKSPACE
+ <control> CHARACTER TABULATION
+ <LF><LF> <control> LINE FEED
+ <VT><VT> <control> LINE TABULATION
+ <FF><FF> <control> FORM FEED
+ <CR><CR> <control> CARRIAGE RETURN
+ <ESC><ESC> <control> ESCAPE
+ <DEL><DEL> <control> DELETE
+ <80><80> <control> 0x80
+ <81><81> <control> 0x81
+ <82><82> <control> BREAK PERMITTED HERE
+ <83><83> <control> NO BREAK HERE
+ <9E><9E> <control> PRIVACY MESSAGE
+ <9F><9F> <control> APPLICATION PROGRAM COMMAND
+ <<<< MUCH LESS-THAN
+ >>>> MUCH GREATER-THAN
+ ffff LATIN SMALL LIGATURE FF
+ fifi LATIN SMALL LIGATURE FI
+ flfl LATIN SMALL LIGATURE FL
+ ffiffi LATIN SMALL LIGATURE FFI
+ fflffl LATIN SMALL LIGATURE FFL
+ <?> REPLACEMENT CHARACTER
+ <?> <undefined>
+ <?> <undefined>
+ <?> LINEAR B SYLLABLE B008 A
+ <?> <Plane 15 Private Use, Last>
+ <?> <undefined>
+ <?> <undefined>
+ <?> <Plane 16 Private Use, First>
+ <?> <Plane 16 Private Use, Last>
+ <?> <undefined>
+ <?> <undefined>
+ ENDTEST
+
+
+
+OpenBSD October 28, 2014 CHAR-UNICODE-NOGROFF(1)
diff --git a/regress/char/unicode/nogroff.out_html b/regress/char/unicode/nogroff.out_html
new file mode 100644
index 00000000..56e1fe7e
--- /dev/null
+++ b/regress/char/unicode/nogroff.out_html
@@ -0,0 +1,37 @@
+BEGINTEST
+&#65533;&#65533; &lt;control&gt; NULL
+&#65533;&#65533; &lt;control&gt; START OF HEADING
+&#65533;&#65533; &lt;control&gt; BELL
+&#65533;&#65533; &lt;control&gt; BACKSPACE
+ &lt;control&gt; CHARACTER TABULATION
+&#65533;&#65533; &lt;control&gt; LINE FEED
+&#65533;&#65533; &lt;control&gt; LINE TABULATION
+&#65533;&#65533; &lt;control&gt; FORM FEED
+&#65533;&#65533; &lt;control&gt; CARRIAGE RETURN
+&#65533;&#65533; &lt;control&gt; ESCAPE
+&#65533;&#65533; &lt;control&gt; DELETE
+&#65533;&#65533; &lt;control&gt; 0x80
+&#65533;&#65533; &lt;control&gt; 0x81
+&#65533;&#65533; &lt;control&gt; BREAK PERMITTED HERE
+&#65533;&#65533; &lt;control&gt; NO BREAK HERE
+&#65533;&#65533; &lt;control&gt; PRIVACY MESSAGE
+&#65533;&#65533; &lt;control&gt; APPLICATION PROGRAM COMMAND
+&#8810;&#8810; MUCH LESS-THAN
+&#8811;&#8811; MUCH GREATER-THAN
+&#64256;&#64256; LATIN SMALL LIGATURE FF
+&#64257;&#64257; LATIN SMALL LIGATURE FI
+&#64258;&#64258; LATIN SMALL LIGATURE FL
+&#64259;&#64259; LATIN SMALL LIGATURE FFI
+&#64260;&#64260; LATIN SMALL LIGATURE FFL
+&#65533; REPLACEMENT CHARACTER
+&#65534; &lt;undefined&gt;
+&#65535; &lt;undefined&gt;
+&#65536; LINEAR B SYLLABLE B008 A
+&#1048573; &lt;Plane 15 Private Use, Last&gt;
+&#1048574; &lt;undefined&gt;
+&#1048575; &lt;undefined&gt;
+&#1048576; &lt;Plane 16 Private Use, First&gt;
+&#1114109; &lt;Plane 16 Private Use, Last&gt;
+&#1114110; &lt;undefined&gt;
+&#1114111; &lt;undefined&gt;
+ENDTEST
diff --git a/regress/char/unicode/nogroff.out_utf8 b/regress/char/unicode/nogroff.out_utf8
new file mode 100644
index 00000000..c6169b9c
--- /dev/null
+++ b/regress/char/unicode/nogroff.out_utf8
@@ -0,0 +1,49 @@
+CHAR-UNICODE-NOGROFF(1) General Commands Manual CHAR-UNICODE-NOGROFF(1)
+
+
+
+NNAAMMEE
+ char-unicode-nogroff - characters handled differently by groff
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+ �� <control> NULL
+ �� <control> START OF HEADING
+ �� <control> BELL
+ �� <control> BACKSPACE
+ <control> CHARACTER TABULATION
+ �� <control> LINE FEED
+ �� <control> LINE TABULATION
+ �� <control> FORM FEED
+ �� <control> CARRIAGE RETURN
+ �� <control> ESCAPE
+ �� <control> DELETE
+ �� <control> 0x80
+ �� <control> 0x81
+ �� <control> BREAK PERMITTED HERE
+ �� <control> NO BREAK HERE
+ �� <control> PRIVACY MESSAGE
+ �� <control> APPLICATION PROGRAM COMMAND
+ ≪≪ MUCH LESS-THAN
+ ≫≫ MUCH GREATER-THAN
+ ffff LATIN SMALL LIGATURE FF
+ fifi LATIN SMALL LIGATURE FI
+ flfl LATIN SMALL LIGATURE FL
+ ffiffi LATIN SMALL LIGATURE FFI
+ fflffl LATIN SMALL LIGATURE FFL
+ � REPLACEMENT CHARACTER
+ ￾ <undefined>
+ ￿ <undefined>
+ 𐀀 LINEAR B SYLLABLE B008 A
+ 󿿽 <Plane 15 Private Use, Last>
+ 󿿾 <undefined>
+ 󿿿 <undefined>
+ 􀀀 <Plane 16 Private Use, First>
+ 􏿽 <Plane 16 Private Use, Last>
+ 􏿾 <undefined>
+ 􏿿 <undefined>
+ ENDTEST
+
+
+
+OpenBSD October 28, 2014 CHAR-UNICODE-NOGROFF(1)
diff --git a/regress/eqn/Makefile b/regress/eqn/Makefile
new file mode 100644
index 00000000..ef5effd1
--- /dev/null
+++ b/regress/eqn/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2015/01/28 21:10:28 schwarze Exp $
+
+SUBDIR = fromto define matrix nullary over size subsup unary
+
+.include "../Makefile.sub"
+.include <bsd.subdir.mk>
diff --git a/regress/eqn/Makefile.inc b/regress/eqn/Makefile.inc
new file mode 100644
index 00000000..d7937db5
--- /dev/null
+++ b/regress/eqn/Makefile.inc
@@ -0,0 +1,28 @@
+# $OpenBSD: Makefile.inc,v 1.2 2015/02/03 19:37:25 schwarze Exp $
+
+EQN = /usr/local/bin/eqn
+
+SKIP_GROFF ?= ${REGRESS_TARGETS}
+SKIP_TMAN ?= ALL
+
+
+# OpenBSD only: maintainer targets and custom extraction
+
+_FULLHTMLFILES = ${HTML_TARGETS:S/$/.html/}
+
+html-clean:
+.if !empty(_FULLHTMLFILES)
+ @rm -f ${_HTMLFILES} ${_FULLHTMLFILES}
+.endif
+
+.for t in ${HTML_TARGETS}
+${t}.out_html: ${t}.in
+ ${MANDOC} ${MOPTS} -Thtml ${.ALLSRC} | \
+ ${.CURDIR}/../extract.pl > ${.TARGET}
+.endfor
+
+.include "../Makefile.inc"
+
+.in.mandoc_html:
+ @${MANDOC} ${MOPTS} -Thtml ${.IMPSRC} > ${.TARGET:S/mandoc_html$/html/}
+ @${.CURDIR}/../extract.pl < ${.TARGET:S/mandoc_html$/html/} > ${.TARGET}
diff --git a/regress/eqn/define/Makefile b/regress/eqn/define/Makefile
new file mode 100644
index 00000000..4be9cf5e
--- /dev/null
+++ b/regress/eqn/define/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2015/01/28 21:10:28 schwarze Exp $
+
+REGRESS_TARGETS = invalid
+LINT_TARGETS = invalid
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/define/invalid.in b/regress/eqn/define/invalid.in
new file mode 100644
index 00000000..aa8bcb8c
--- /dev/null
+++ b/regress/eqn/define/invalid.in
@@ -0,0 +1,36 @@
+.Dd January 28, 2015
+.Dt DEFINE-INVALID 1
+.Os OpenBSD
+.Sh NAME
+.Nm define-invalid
+.Nd invalid define and undef statements
+.Sh DESCRIPTION
+define without variable name:
+.EQ
+define bruch 'over' 1 bruch 2 undef bruch bruch define
+.EN
+eol
+.Pp
+define without value:
+.EQ
+define bruch 'over' 1 bruch 2 undef bruch bruch define bruch
+.EN
+eol
+.Pp
+define without value:
+.EQ
+define bruch 'over' 1 bruch 2 undef bruch bruch undef
+.EN
+eol
+.Pp
+tdefine without variable name:
+.EQ
+tdefine
+.EN
+eol
+.Pp
+tdefine without value:
+.EQ
+tdefine bruch
+.EN
+eol
diff --git a/regress/eqn/define/invalid.out_ascii b/regress/eqn/define/invalid.out_ascii
new file mode 100644
index 00000000..0725dde2
--- /dev/null
+++ b/regress/eqn/define/invalid.out_ascii
@@ -0,0 +1,17 @@
+DEFINE-INVALID(1) General Commands Manual DEFINE-INVALID(1)
+
+NNAAMMEE
+ ddeeffiinnee--iinnvvaalliidd - invalid define and undef statements
+
+DDEESSCCRRIIPPTTIIOONN
+ define without variable name: 1/2 bruch eol
+
+ define without value: 1/2 bruch eol
+
+ define without value: 1/2 bruch eol
+
+ tdefine without variable name: eol
+
+ tdefine without value: eol
+
+OpenBSD January 28, 2015 OpenBSD
diff --git a/regress/eqn/define/invalid.out_lint b/regress/eqn/define/invalid.out_lint
new file mode 100644
index 00000000..3f230400
--- /dev/null
+++ b/regress/eqn/define/invalid.out_lint
@@ -0,0 +1,5 @@
+mandoc: invalid.in:9:1: WARNING: skipping empty request: define
+mandoc: invalid.in:15:1: WARNING: skipping empty request: define bruch
+mandoc: invalid.in:21:1: WARNING: skipping empty request: undef
+mandoc: invalid.in:27:1: WARNING: skipping empty request: tdefine
+mandoc: invalid.in:33:1: WARNING: skipping empty request: tdefine
diff --git a/regress/eqn/fromto/Makefile b/regress/eqn/fromto/Makefile
new file mode 100644
index 00000000..a2012e8f
--- /dev/null
+++ b/regress/eqn/fromto/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2015/01/01 15:34:43 schwarze Exp $
+
+REGRESS_TARGETS = basic noarg
+HTML_TARGETS = basic noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/fromto/basic.in b/regress/eqn/fromto/basic.in
new file mode 100644
index 00000000..5d42605a
--- /dev/null
+++ b/regress/eqn/fromto/basic.in
@@ -0,0 +1,12 @@
+.Dd January 1, 2015
+.Dt FROMTO-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm fromto-basic
+.Nd vertical stacking
+.Sh DESCRIPTION
+initial text
+.EQ
+sum from { i = 1 } to inf 1 over i sup 2
+.EN
+final text
diff --git a/regress/eqn/fromto/basic.out_ascii b/regress/eqn/fromto/basic.out_ascii
new file mode 100644
index 00000000..1c3105d4
--- /dev/null
+++ b/regress/eqn/fromto/basic.out_ascii
@@ -0,0 +1,9 @@
+FROMTO-BASIC(1) General Commands Manual FROMTO-BASIC(1)
+
+NNAAMMEE
+ ffrroommttoo--bbaassiicc - vertical stacking
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text E_(i = 1)^oo 1/i^2 final text
+
+OpenBSD January 1, 2015 OpenBSD
diff --git a/regress/eqn/fromto/basic.out_html b/regress/eqn/fromto/basic.out_html
new file mode 100644
index 00000000..700edcc2
--- /dev/null
+++ b/regress/eqn/fromto/basic.out_html
@@ -0,0 +1 @@
+<mrow><munderover><mi>&#8721;</mi><mrow><mi>i</mi><mi>=</mi><mi>1</mi></mrow><mi>&#8734;</mi></munderover><mfrac><mi>1</mi><msup><mi>i</mi><mi>2</mi></msup></mfrac></mrow>
diff --git a/regress/eqn/fromto/noarg.in b/regress/eqn/fromto/noarg.in
new file mode 100644
index 00000000..e37d2e93
--- /dev/null
+++ b/regress/eqn/fromto/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 1, 2015
+.Dt FROMTO-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm fromto-noarg
+.Nd vertical stacking lacks final argument
+.Sh DESCRIPTION
+initial text
+.EQ
+x from a to to
+.EN
+final text
diff --git a/regress/eqn/fromto/noarg.out_ascii b/regress/eqn/fromto/noarg.out_ascii
new file mode 100644
index 00000000..06d2ae81
--- /dev/null
+++ b/regress/eqn/fromto/noarg.out_ascii
@@ -0,0 +1,9 @@
+FROMTO-NOARG(1) General Commands Manual FROMTO-NOARG(1)
+
+NNAAMMEE
+ ffrroommttoo--nnooaarrgg - vertical stacking lacks final argument
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text x_a^^ final text
+
+OpenBSD January 1, 2015 OpenBSD
diff --git a/regress/eqn/fromto/noarg.out_html b/regress/eqn/fromto/noarg.out_html
new file mode 100644
index 00000000..1caf3a3d
--- /dev/null
+++ b/regress/eqn/fromto/noarg.out_html
@@ -0,0 +1 @@
+<mrow><munderover><mi>x</mi><mover><mi>a</mi></mover></munderover></mrow>
diff --git a/regress/eqn/matrix/Makefile b/regress/eqn/matrix/Makefile
new file mode 100644
index 00000000..a48306f2
--- /dev/null
+++ b/regress/eqn/matrix/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $
+
+REGRESS_TARGETS = basic
+HTML_TARGETS = basic
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/matrix/basic.in b/regress/eqn/matrix/basic.in
new file mode 100644
index 00000000..d7beea0d
--- /dev/null
+++ b/regress/eqn/matrix/basic.in
@@ -0,0 +1,17 @@
+.Dd October 10, 2014
+.Dt MATRIX-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm matrix-basic
+.Nd matrixes in equations
+.Sh DESCRIPTION
+initial text
+.EQ
+left (
+matrix { ccol { a sub 11 above a sub 21 } ccol { a sub 12 above a sub 22 } }
+right )
+left (
+pile { b sub 1 above b sub 2 }
+right )
+.EN
+final text
diff --git a/regress/eqn/matrix/basic.out_ascii b/regress/eqn/matrix/basic.out_ascii
new file mode 100644
index 00000000..b5100906
--- /dev/null
+++ b/regress/eqn/matrix/basic.out_ascii
@@ -0,0 +1,9 @@
+MATRIX-BASIC(1) General Commands Manual MATRIX-BASIC(1)
+
+NNAAMMEE
+ mmaattrriixx--bbaassiicc - matrixes in equations
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text ((a_11 a_21) (a_12 a_22)) (b_1 b_2) final text
+
+OpenBSD October 10, 2014 OpenBSD
diff --git a/regress/eqn/matrix/basic.out_html b/regress/eqn/matrix/basic.out_html
new file mode 100644
index 00000000..d33b6b2d
--- /dev/null
+++ b/regress/eqn/matrix/basic.out_html
@@ -0,0 +1 @@
+<mrow><mfenced open="(" close=")"><mrow><mtable><mtr><mtd><msub><mi>a</mi><mi>11</mi></msub></mtd><mtd><msub><mi>a</mi><mi>12</mi></msub></mtd></mtr><mtr><mtd><msub><mi>a</mi><mi>21</mi></msub></mtd><mtd><msub><mi>a</mi><mi>22</mi></msub></mtd></mtr></mtable></mrow></mfenced><mfenced open="(" close=")"><mrow><mtable><mtr><mtd><msub><mi>b</mi><mi>1</mi></msub></mtd></mtr><mtr><mtd><msub><mi>b</mi><mi>2</mi></msub></mtd></mtr></mtable></mrow></mfenced></mrow>
diff --git a/regress/eqn/nullary/Makefile b/regress/eqn/nullary/Makefile
new file mode 100644
index 00000000..ec5dfa06
--- /dev/null
+++ b/regress/eqn/nullary/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $
+
+REGRESS_TARGETS = roman
+HTML_TARGETS = roman
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/nullary/roman.in b/regress/eqn/nullary/roman.in
new file mode 100644
index 00000000..f4a081f1
--- /dev/null
+++ b/regress/eqn/nullary/roman.in
@@ -0,0 +1,14 @@
+.Dd October 12, 2014
+.Dt NULLARY-ROMAN 1
+.Os OpenBSD
+.Sh NAME
+.Nm nullary-roman
+.Nd equation tokens set in roman font
+.Sh DESCRIPTION
+initial text
+.EQ
+sin cos tan sinh cosh tanh arc
+max min lim log ln exp
+Re Im and if for det
+.EN
+final text
diff --git a/regress/eqn/nullary/roman.out_ascii b/regress/eqn/nullary/roman.out_ascii
new file mode 100644
index 00000000..cc6ff3a8
--- /dev/null
+++ b/regress/eqn/nullary/roman.out_ascii
@@ -0,0 +1,10 @@
+NULLARY-ROMAN(1) General Commands Manual NULLARY-ROMAN(1)
+
+NNAAMMEE
+ nnuullllaarryy--rroommaann - equation tokens set in roman font
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text sin cos tan sinh cosh tanh arc max min lim log ln exp Re Im
+ and if for det final text
+
+OpenBSD October 12, 2014 OpenBSD
diff --git a/regress/eqn/nullary/roman.out_html b/regress/eqn/nullary/roman.out_html
new file mode 100644
index 00000000..115daa05
--- /dev/null
+++ b/regress/eqn/nullary/roman.out_html
@@ -0,0 +1 @@
+<mrow><mi>sin</mi><mi>cos</mi><mi>tan</mi><mi>sinh</mi><mi>cosh</mi><mi>tanh</mi><mi>arc</mi><mi>max</mi><mi>min</mi><mi>lim</mi><mi>log</mi><mi>ln</mi><mi>exp</mi><mi>Re</mi><mi>Im</mi><mi>and</mi><mi>if</mi><mi>for</mi><mi>det</mi></mrow>
diff --git a/regress/eqn/over/Makefile b/regress/eqn/over/Makefile
new file mode 100644
index 00000000..8b864c25
--- /dev/null
+++ b/regress/eqn/over/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.2 2015/01/01 15:34:43 schwarze Exp $
+
+REGRESS_TARGETS = noarg precedence
+HTML_TARGETS = noarg precedence
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/over/noarg.in b/regress/eqn/over/noarg.in
new file mode 100644
index 00000000..ac93fcca
--- /dev/null
+++ b/regress/eqn/over/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 1, 2015
+.Dt OVER-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm over-noarg
+.Nd fraction operator without arguments
+.Sh DESCRIPTION
+initial text
+.EQ
+over over
+.EN
+final text
diff --git a/regress/eqn/over/noarg.out_ascii b/regress/eqn/over/noarg.out_ascii
new file mode 100644
index 00000000..4057f6bd
--- /dev/null
+++ b/regress/eqn/over/noarg.out_ascii
@@ -0,0 +1,9 @@
+OVER-NOARG(1) General Commands Manual OVER-NOARG(1)
+
+NNAAMMEE
+ oovveerr--nnooaarrgg - fraction operator without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text // final text
+
+OpenBSD January 1, 2015 OpenBSD
diff --git a/regress/eqn/over/noarg.out_html b/regress/eqn/over/noarg.out_html
new file mode 100644
index 00000000..565b988c
--- /dev/null
+++ b/regress/eqn/over/noarg.out_html
@@ -0,0 +1 @@
+<mrow><mfrac><mfrac><mi></mi></mfrac></mfrac></mrow>
diff --git a/regress/eqn/over/noarg.out_lint b/regress/eqn/over/noarg.out_lint
new file mode 100644
index 00000000..aabfc30b
--- /dev/null
+++ b/regress/eqn/over/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:9:1: WARNING: missing eqn box, using "": over
diff --git a/regress/eqn/over/precedence.in b/regress/eqn/over/precedence.in
new file mode 100644
index 00000000..2386ff8c
--- /dev/null
+++ b/regress/eqn/over/precedence.in
@@ -0,0 +1,12 @@
+.Dd October 10, 2014
+.Dt OVER-PRECEDENCE 1
+.Os OpenBSD
+.Sh NAME
+.Nm over-precedence
+.Nd precedence of the fraction operator
+.Sh DESCRIPTION
+initial text
+.EQ
+1 + x + x sup 2 over 2 + x sup 3 over { 2 * 3 }
+.EN
+final text
diff --git a/regress/eqn/over/precedence.out_ascii b/regress/eqn/over/precedence.out_ascii
new file mode 100644
index 00000000..3e930019
--- /dev/null
+++ b/regress/eqn/over/precedence.out_ascii
@@ -0,0 +1,9 @@
+OVER-PRECEDENCE(1) General Commands Manual OVER-PRECEDENCE(1)
+
+NNAAMMEE
+ oovveerr--pprreecceeddeennccee - precedence of the fraction operator
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text 1 + x + x^2/2 + x^3/(2 * 3) final text
+
+OpenBSD October 10, 2014 OpenBSD
diff --git a/regress/eqn/over/precedence.out_html b/regress/eqn/over/precedence.out_html
new file mode 100644
index 00000000..c0128021
--- /dev/null
+++ b/regress/eqn/over/precedence.out_html
@@ -0,0 +1 @@
+<mrow><mi>1</mi><mi>+</mi><mi>x</mi><mi>+</mi><mfrac><msup><mi>x</mi><mi>2</mi></msup><mi>2</mi></mfrac><mi>+</mi><mfrac><msup><mi>x</mi><mi>3</mi></msup><mrow><mi>2</mi><mi>*</mi><mi>3</mi></mrow></mfrac></mrow>
diff --git a/regress/eqn/size/Makefile b/regress/eqn/size/Makefile
new file mode 100644
index 00000000..eba7d657
--- /dev/null
+++ b/regress/eqn/size/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $
+
+REGRESS_TARGETS = basic
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/size/basic.in b/regress/eqn/size/basic.in
new file mode 100644
index 00000000..af9b20e8
--- /dev/null
+++ b/regress/eqn/size/basic.in
@@ -0,0 +1,12 @@
+.Dd October 10, 2014
+.Dt SIZE-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm size-basic
+.Nd font sizes
+.Sh DESCRIPTION
+initial text
+.EQ
+x size 12 x size 14 x size 16 x
+.EN
+final text
diff --git a/regress/eqn/size/basic.out_ascii b/regress/eqn/size/basic.out_ascii
new file mode 100644
index 00000000..3177a1b5
--- /dev/null
+++ b/regress/eqn/size/basic.out_ascii
@@ -0,0 +1,9 @@
+SIZE-BASIC(1) General Commands Manual SIZE-BASIC(1)
+
+NNAAMMEE
+ ssiizzee--bbaassiicc - font sizes
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text x x x x final text
+
+OpenBSD October 10, 2014 OpenBSD
diff --git a/regress/eqn/subsup/Makefile b/regress/eqn/subsup/Makefile
new file mode 100644
index 00000000..4e11b33d
--- /dev/null
+++ b/regress/eqn/subsup/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2015/01/01 15:34:43 schwarze Exp $
+
+REGRESS_TARGETS = combine noarg sub_group
+HTML_TARGETS = combine noarg sub_group
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/subsup/combine.in b/regress/eqn/subsup/combine.in
new file mode 100644
index 00000000..1fdedd4e
--- /dev/null
+++ b/regress/eqn/subsup/combine.in
@@ -0,0 +1,12 @@
+.Dd October 10, 2014
+.Dt SUBSUP-COMBINE 1
+.Os OpenBSD
+.Sh NAME
+.Nm subsup-combine
+.Nd combination of subscripts and superscripts
+.Sh DESCRIPTION
+initial text
+.EQ
+x sub 1 sup 2 + e sup x sub 2
+.EN
+final text
diff --git a/regress/eqn/subsup/combine.out_ascii b/regress/eqn/subsup/combine.out_ascii
new file mode 100644
index 00000000..945a4ad3
--- /dev/null
+++ b/regress/eqn/subsup/combine.out_ascii
@@ -0,0 +1,9 @@
+SUBSUP-COMBINE(1) General Commands Manual SUBSUP-COMBINE(1)
+
+NNAAMMEE
+ ssuubbssuupp--ccoommbbiinnee - combination of subscripts and superscripts
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text x_1^2 + e^x_2 final text
+
+OpenBSD October 10, 2014 OpenBSD
diff --git a/regress/eqn/subsup/combine.out_html b/regress/eqn/subsup/combine.out_html
new file mode 100644
index 00000000..6e2c7de2
--- /dev/null
+++ b/regress/eqn/subsup/combine.out_html
@@ -0,0 +1 @@
+<mrow><msubsup><mi>x</mi><mi>1</mi><mi>2</mi></msubsup><mi>+</mi><msup><mi>e</mi><msub><mi>x</mi><mi>2</mi></msub></msup></mrow>
diff --git a/regress/eqn/subsup/noarg.in b/regress/eqn/subsup/noarg.in
new file mode 100644
index 00000000..adc32d8f
--- /dev/null
+++ b/regress/eqn/subsup/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 1, 2015
+.Dt SUBSUP-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm subsup-noarg
+.Nd empty subscripts and superscripts
+.Sh DESCRIPTION
+initial text
+.EQ
+x sub 1 sup sup
+.EN
+final text
diff --git a/regress/eqn/subsup/noarg.out_ascii b/regress/eqn/subsup/noarg.out_ascii
new file mode 100644
index 00000000..ad99680b
--- /dev/null
+++ b/regress/eqn/subsup/noarg.out_ascii
@@ -0,0 +1,9 @@
+SUBSUP-NOARG(1) General Commands Manual SUBSUP-NOARG(1)
+
+NNAAMMEE
+ ssuubbssuupp--nnooaarrgg - empty subscripts and superscripts
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text x_1^^ final text
+
+OpenBSD January 1, 2015 OpenBSD
diff --git a/regress/eqn/subsup/noarg.out_html b/regress/eqn/subsup/noarg.out_html
new file mode 100644
index 00000000..07416891
--- /dev/null
+++ b/regress/eqn/subsup/noarg.out_html
@@ -0,0 +1 @@
+<mrow><msubsup><mi>x</mi><msup><mi>1</mi></msup></msubsup></mrow>
diff --git a/regress/eqn/subsup/sub_group.in b/regress/eqn/subsup/sub_group.in
new file mode 100644
index 00000000..67a2de2b
--- /dev/null
+++ b/regress/eqn/subsup/sub_group.in
@@ -0,0 +1,12 @@
+.Dd October 10, 2014
+.Dt SUBSUP-SUB_GROUP 1
+.Os OpenBSD
+.Sh NAME
+.Nm subsup-sub_group
+.Nd grouping of subscripts
+.Sh DESCRIPTION
+initial text
+.EQ
+x sub i + x sub j sub 1 + { M sub i } sub j
+.EN
+final text
diff --git a/regress/eqn/subsup/sub_group.out_ascii b/regress/eqn/subsup/sub_group.out_ascii
new file mode 100644
index 00000000..8de3c874
--- /dev/null
+++ b/regress/eqn/subsup/sub_group.out_ascii
@@ -0,0 +1,9 @@
+SUBSUP-SUB_GROUP(1) General Commands Manual SUBSUP-SUB_GROUP(1)
+
+NNAAMMEE
+ ssuubbssuupp--ssuubb__ggrroouupp - grouping of subscripts
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text x_i + x_j_1 + (M_i)_j final text
+
+OpenBSD October 10, 2014 OpenBSD
diff --git a/regress/eqn/subsup/sub_group.out_html b/regress/eqn/subsup/sub_group.out_html
new file mode 100644
index 00000000..dad7c406
--- /dev/null
+++ b/regress/eqn/subsup/sub_group.out_html
@@ -0,0 +1 @@
+<mrow><msub><mi>x</mi><mi>i</mi></msub><mi>+</mi><msub><mi>x</mi><msub><mi>j</mi><mi>1</mi></msub></msub><mi>+</mi><msub><mrow><msub><mi>M</mi><mi>i</mi></msub></mrow><mi>j</mi></msub></mrow>
diff --git a/regress/eqn/unary/Makefile b/regress/eqn/unary/Makefile
new file mode 100644
index 00000000..f68a5ce7
--- /dev/null
+++ b/regress/eqn/unary/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2015/01/01 12:53:46 schwarze Exp $
+
+REGRESS_TARGETS = diacrit sqrt
+HTML_TARGETS = diacrit sqrt
+
+.include <bsd.regress.mk>
diff --git a/regress/eqn/unary/diacrit.in b/regress/eqn/unary/diacrit.in
new file mode 100644
index 00000000..bb50774b
--- /dev/null
+++ b/regress/eqn/unary/diacrit.in
@@ -0,0 +1,13 @@
+.Dd October 10, 2014
+.Dt UNARY-DIACRIT 1
+.Os OpenBSD
+.Sh NAME
+.Nm unary-diacrit
+.Nd diacritical marks in equations
+.Sh DESCRIPTION
+initial text
+.EQ
+x dot x dotdot x hat x tilde x vec x dyad
+{ x + y } bar { x + y } under
+.EN
+final text
diff --git a/regress/eqn/unary/diacrit.out_ascii b/regress/eqn/unary/diacrit.out_ascii
new file mode 100644
index 00000000..54a35c3c
--- /dev/null
+++ b/regress/eqn/unary/diacrit.out_ascii
@@ -0,0 +1,9 @@
+UNARY-DIACRIT(1) General Commands Manual UNARY-DIACRIT(1)
+
+NNAAMMEE
+ uunnaarryy--ddiiaaccrriitt - diacritical marks in equations
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text x. x" x^ x~ x-> x<-> (x + y) (x + y)_ final text
+
+OpenBSD October 10, 2014 OpenBSD
diff --git a/regress/eqn/unary/diacrit.out_html b/regress/eqn/unary/diacrit.out_html
new file mode 100644
index 00000000..076c6663
--- /dev/null
+++ b/regress/eqn/unary/diacrit.out_html
@@ -0,0 +1 @@
+<mrow><mover><mi>x</mi><mo>&#729;</mo></mover><mover><mi>x</mi><mo>&#168;</mo></mover><mover><mi>x</mi><mo>^</mo></mover><mover><mi>x</mi><mo>~</mo></mover><mover><mi>x</mi><mo>&#8594;</mo></mover><mover><mi>x</mi><mo>&#8596;</mo></mover><mover><mrow><mi>x</mi><mi>+</mi><mi>y</mi></mrow><mo></mo></mover><munder><mrow><mi>x</mi><mi>+</mi><mi>y</mi></mrow><mo>_</mo></munder></mrow>
diff --git a/regress/eqn/unary/sqrt.in b/regress/eqn/unary/sqrt.in
new file mode 100644
index 00000000..359c3d7b
--- /dev/null
+++ b/regress/eqn/unary/sqrt.in
@@ -0,0 +1,12 @@
+.Dd October 10, 2014
+.Dt UNARY-SQRT 1
+.Os OpenBSD
+.Sh NAME
+.Nm unary-sqrt
+.Nd square root
+.Sh DESCRIPTION
+initial text
+.EQ
+r = sqrt { x sup 2 + y sup 2 }
+.EN
+final text
diff --git a/regress/eqn/unary/sqrt.out_ascii b/regress/eqn/unary/sqrt.out_ascii
new file mode 100644
index 00000000..104df229
--- /dev/null
+++ b/regress/eqn/unary/sqrt.out_ascii
@@ -0,0 +1,9 @@
+UNARY-SQRT(1) General Commands Manual UNARY-SQRT(1)
+
+NNAAMMEE
+ uunnaarryy--ssqqrrtt - square root
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text r = sqrt(x^2 + y^2) final text
+
+OpenBSD October 10, 2014 OpenBSD
diff --git a/regress/eqn/unary/sqrt.out_html b/regress/eqn/unary/sqrt.out_html
new file mode 100644
index 00000000..b868474d
--- /dev/null
+++ b/regress/eqn/unary/sqrt.out_html
@@ -0,0 +1 @@
+<mrow><mi>r</mi><mi>=</mi><msqrt><mrow><msup><mi>x</mi><mi>2</mi></msup><mi>+</mi><msup><mi>y</mi><mi>2</mi></msup></mrow></msqrt></mrow>
diff --git a/regress/man/B/Makefile b/regress/man/B/Makefile
new file mode 100644
index 00000000..8e4d72a9
--- /dev/null
+++ b/regress/man/B/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2014/08/14 02:00:52 schwarze Exp $
+
+REGRESS_TARGETS = args
+LINT_TARGETS = args
+
+.include <bsd.regress.mk>
diff --git a/regress/man/B/args.in b/regress/man/B/args.in
new file mode 100644
index 00000000..57493d5d
--- /dev/null
+++ b/regress/man/B/args.in
@@ -0,0 +1,20 @@
+.TH B-ARGS 1 "July 30, 2014" OpenBSD
+.SH NAME
+B-args \- arguments to font macros
+.SH DESCRIPTION
+This is
+.B bold
+text.
+It also works with
+.B several words on a line
+and with
+.B
+next line
+scope.
+.nf
+In no-fill mode:
+.B two words
+and another line.
+.fi
+It has no effect at the end of the file:
+.B
diff --git a/regress/man/B/args.out_ascii b/regress/man/B/args.out_ascii
new file mode 100644
index 00000000..e5102675
--- /dev/null
+++ b/regress/man/B/args.out_ascii
@@ -0,0 +1,18 @@
+B-ARGS(1) General Commands Manual B-ARGS(1)
+
+
+
+NNAAMMEE
+ B-args - arguments to font macros
+
+DDEESSCCRRIIPPTTIIOONN
+ This is bboolldd text. It also works with sseevveerraall wwoorrddss oonn aa lliinnee and with
+ nneexxtt lliinnee scope.
+ In no-fill mode:
+ ttwwoo wwoorrddss
+ and another line.
+ It has no effect at the end of the file:
+
+
+
+OpenBSD July 30, 2014 B-ARGS(1)
diff --git a/regress/man/B/args.out_lint b/regress/man/B/args.out_lint
new file mode 100644
index 00000000..0239c0a3
--- /dev/null
+++ b/regress/man/B/args.out_lint
@@ -0,0 +1 @@
+mandoc: args.in:20:2: WARNING: line scope broken: EOF breaks B
diff --git a/regress/man/BI/Makefile b/regress/man/BI/Makefile
new file mode 100644
index 00000000..b23aeead
--- /dev/null
+++ b/regress/man/BI/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.3 2015/04/06 22:06:06 schwarze Exp $
+
+REGRESS_TARGETS = emptyargs literal
+
+.include <bsd.regress.mk>
diff --git a/regress/man/BI/emptyargs.in b/regress/man/BI/emptyargs.in
new file mode 100644
index 00000000..acbf4986
--- /dev/null
+++ b/regress/man/BI/emptyargs.in
@@ -0,0 +1,10 @@
+.TH BI-EMPTYARGS 1 "April 6, 2015" OpenBSD
+.SH NAME
+BI-emptyargs \- empty arguments to font alternation macros
+.SH DESCRIPTION
+leading text
+.TP 6n
+.BI bold italic "" ""
+.BI bold "" "" italic
+.PP
+trailing text
diff --git a/regress/man/BI/emptyargs.out_ascii b/regress/man/BI/emptyargs.out_ascii
new file mode 100644
index 00000000..3469b7e0
--- /dev/null
+++ b/regress/man/BI/emptyargs.out_ascii
@@ -0,0 +1,18 @@
+BI-EMPTYARGS(1) General Commands Manual BI-EMPTYARGS(1)
+
+
+
+NNAAMMEE
+ BI-emptyargs - empty arguments to font alternation macros
+
+DDEESSCCRRIIPPTTIIOONN
+ leading text
+
+ bboolldd_i_t_a_l_i_c
+ bboolldd_i_t_a_l_i_c
+
+ trailing text
+
+
+
+OpenBSD April 6, 2015 BI-EMPTYARGS(1)
diff --git a/regress/man/BI/literal.in b/regress/man/BI/literal.in
new file mode 100644
index 00000000..ebd22a67
--- /dev/null
+++ b/regress/man/BI/literal.in
@@ -0,0 +1,12 @@
+.TH GETTEXT 3 "May 2001" "GNU gettext 0.18"
+.SH NAME
+gettext, dgettext, dcgettext \- translate message
+.SH SYNOPSIS
+.nf
+.B #include <libintl.h>
+.sp
+.BI "char * gettext (const char * " msgid );
+.BI "char * dgettext (const char * " domainname ", const char * " msgid );
+.BI "char * dcgettext (const char * " domainname ", const char * " msgid ,
+.BI " int " category );
+.fi
diff --git a/regress/man/BI/literal.out_ascii b/regress/man/BI/literal.out_ascii
new file mode 100644
index 00000000..d5682a8e
--- /dev/null
+++ b/regress/man/BI/literal.out_ascii
@@ -0,0 +1,18 @@
+GETTEXT(3) Library Functions Manual GETTEXT(3)
+
+
+
+NNAAMMEE
+ gettext, dgettext, dcgettext - translate message
+
+SSYYNNOOPPSSIISS
+ ##iinncclluuddee <<lliibbiinnttll..hh>>
+
+ cchhaarr ** ggeetttteexxtt ((ccoonnsstt cchhaarr ** _m_s_g_i_d));;
+ cchhaarr ** ddggeetttteexxtt ((ccoonnsstt cchhaarr ** _d_o_m_a_i_n_n_a_m_e,, ccoonnsstt cchhaarr ** _m_s_g_i_d));;
+ cchhaarr ** ddccggeetttteexxtt ((ccoonnsstt cchhaarr ** _d_o_m_a_i_n_n_a_m_e,, ccoonnsstt cchhaarr ** _m_s_g_i_d,,
+ iinntt _c_a_t_e_g_o_r_y));;
+
+
+
+GNU gettext 0.18 May 2001 GETTEXT(3)
diff --git a/regress/man/EX/Makefile b/regress/man/EX/Makefile
new file mode 100644
index 00000000..8837c524
--- /dev/null
+++ b/regress/man/EX/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2012/06/02 20:07:09 schwarze Exp $
+
+REGRESS_TARGETS=spacing nested args
+
+.include <bsd.regress.mk>
diff --git a/regress/man/EX/args.in b/regress/man/EX/args.in
new file mode 100644
index 00000000..ac88a38a
--- /dev/null
+++ b/regress/man/EX/args.in
@@ -0,0 +1,12 @@
+.TH EX-ARGS 1 "June 3, 2012" OpenBSD
+.SH NAME
+EX-args \- example macro with arguments
+.SH DESCRIPTION
+regular
+text
+.EX arg1 arg2 arg3
+literal
+text
+.EE arg1 arg2 arg3
+regular
+text
diff --git a/regress/man/EX/args.out_ascii b/regress/man/EX/args.out_ascii
new file mode 100644
index 00000000..c30bfb31
--- /dev/null
+++ b/regress/man/EX/args.out_ascii
@@ -0,0 +1,16 @@
+EX-ARGS(1) General Commands Manual EX-ARGS(1)
+
+
+
+NNAAMMEE
+ EX-args - example macro with arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ literal
+ text
+ regular text
+
+
+
+OpenBSD June 3, 2012 EX-ARGS(1)
diff --git a/regress/man/EX/nested.in b/regress/man/EX/nested.in
new file mode 100644
index 00000000..8ecf0ca2
--- /dev/null
+++ b/regress/man/EX/nested.in
@@ -0,0 +1,18 @@
+.TH EX-NESTED 1 "June 3, 2012" OpenBSD
+.SH NAME
+EX-nested \- nested example macros
+.SH DESCRIPTION
+regular
+text
+.EX
+outer
+example
+.EX
+inner
+example
+.EE
+outer
+example
+.EE
+regular
+text
diff --git a/regress/man/EX/nested.out_ascii b/regress/man/EX/nested.out_ascii
new file mode 100644
index 00000000..3d639b28
--- /dev/null
+++ b/regress/man/EX/nested.out_ascii
@@ -0,0 +1,19 @@
+EX-NESTED(1) General Commands Manual EX-NESTED(1)
+
+
+
+NNAAMMEE
+ EX-nested - nested example macros
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ outer
+ example
+ inner
+ example
+ outer example
+ regular text
+
+
+
+OpenBSD June 3, 2012 EX-NESTED(1)
diff --git a/regress/man/EX/spacing.in b/regress/man/EX/spacing.in
new file mode 100644
index 00000000..aa307d05
--- /dev/null
+++ b/regress/man/EX/spacing.in
@@ -0,0 +1,35 @@
+.TH EX-SPACING 1 "June 3, 2012" OpenBSD
+.SH NAME
+EX-spacing \- spacing around the example macro
+.SH DESCRIPTION
+regular
+text
+.EX
+example
+text
+.EE
+regular
+text
+.nf
+literal
+text
+.EX
+example
+text
+.EE
+regular
+text
+.PP
+.EX
+after PP, before nf
+.EE
+.nf
+.EX
+after nf, before fi
+.EE
+.fi
+after fi, before PP
+.EE
+.PP
+regular
+text
diff --git a/regress/man/EX/spacing.out_ascii b/regress/man/EX/spacing.out_ascii
new file mode 100644
index 00000000..0dd2527f
--- /dev/null
+++ b/regress/man/EX/spacing.out_ascii
@@ -0,0 +1,27 @@
+EX-SPACING(1) General Commands Manual EX-SPACING(1)
+
+
+
+NNAAMMEE
+ EX-spacing - spacing around the example macro
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ example
+ text
+ regular text
+ literal
+ text
+ example
+ text
+ regular text
+
+ after PP, before nf
+ after nf, before fi
+ after fi, before PP
+
+ regular text
+
+
+
+OpenBSD June 3, 2012 EX-SPACING(1)
diff --git a/regress/man/HP/Makefile b/regress/man/HP/Makefile
new file mode 100644
index 00000000..e0d2a3b4
--- /dev/null
+++ b/regress/man/HP/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2014/04/08 04:45:50 schwarze Exp $
+
+REGRESS_TARGETS = break literal macrotag manyargs spacing
+
+.include <bsd.regress.mk>
diff --git a/regress/man/HP/break.in b/regress/man/HP/break.in
new file mode 100644
index 00000000..d760b8f2
--- /dev/null
+++ b/regress/man/HP/break.in
@@ -0,0 +1,10 @@
+.TH HP-BREAK 1 "September 21, 2011" OpenBSD
+.SH NAME
+HP-break \- breaking the head line of hanged paragraphs
+.SH DESCRIPTION
+.HP 12n
+This is an extremely long head line of a hanged paragraph;
+it is so long that it won't even fit on the line.
+.fi
+The body of the hanged paragraph is quite long as well
+and will again break the line.
diff --git a/regress/man/HP/break.out_ascii b/regress/man/HP/break.out_ascii
new file mode 100644
index 00000000..bb9cca2c
--- /dev/null
+++ b/regress/man/HP/break.out_ascii
@@ -0,0 +1,16 @@
+HP-BREAK(1) General Commands Manual HP-BREAK(1)
+
+
+
+NNAAMMEE
+ HP-break - breaking the head line of hanged paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ This is an extremely long head line of a hanged paragraph; it is so
+ long that it won't even fit on the line.
+ The body of the hanged paragraph is quite long as well and
+ will again break the line.
+
+
+
+OpenBSD September 21, 2011 HP-BREAK(1)
diff --git a/regress/man/HP/literal.in b/regress/man/HP/literal.in
new file mode 100644
index 00000000..e7caee1c
--- /dev/null
+++ b/regress/man/HP/literal.in
@@ -0,0 +1,26 @@
+.TH HP-LITERAL 1 "January 4, 2011" OpenBSD
+.SH NAME
+HP-literal \- hanged paragraphs in literal context
+.SH DESCRIPTION
+regular
+text
+.HP 10n
+tag
+indented
+text
+.PP
+regular
+text
+.nf
+literal
+text
+.HP 10n
+tag
+indented
+text
+.PP
+literal
+text
+.fi
+regular
+text
diff --git a/regress/man/HP/literal.out_ascii b/regress/man/HP/literal.out_ascii
new file mode 100644
index 00000000..ff7aabf7
--- /dev/null
+++ b/regress/man/HP/literal.out_ascii
@@ -0,0 +1,27 @@
+HP-LITERAL(1) General Commands Manual HP-LITERAL(1)
+
+
+
+NNAAMMEE
+ HP-literal - hanged paragraphs in literal context
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag indented text
+
+ regular text
+ literal
+ text
+
+ tag
+ indented
+ text
+
+ literal
+ text
+ regular text
+
+
+
+OpenBSD January 4, 2011 HP-LITERAL(1)
diff --git a/regress/man/HP/macrotag.in b/regress/man/HP/macrotag.in
new file mode 100644
index 00000000..6582498c
--- /dev/null
+++ b/regress/man/HP/macrotag.in
@@ -0,0 +1,13 @@
+.TH HP-MACROTAG 1 "September 20, 2011" OpenBSD
+.SH NAME
+HP-macrotag \- macro in the head of a tagged paragraph
+.SH DESCRIPTION
+regular
+text
+.HP
+.B longindent
+indented
+text
+.PP
+regular
+text
diff --git a/regress/man/HP/macrotag.out_ascii b/regress/man/HP/macrotag.out_ascii
new file mode 100644
index 00000000..64541ab3
--- /dev/null
+++ b/regress/man/HP/macrotag.out_ascii
@@ -0,0 +1,17 @@
+HP-MACROTAG(1) General Commands Manual HP-MACROTAG(1)
+
+
+
+NNAAMMEE
+ HP-macrotag - macro in the head of a tagged paragraph
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ lloonnggiinnddeenntt indented text
+
+ regular text
+
+
+
+OpenBSD September 20, 2011 HP-MACROTAG(1)
diff --git a/regress/man/HP/manyargs.in b/regress/man/HP/manyargs.in
new file mode 100644
index 00000000..b49e6649
--- /dev/null
+++ b/regress/man/HP/manyargs.in
@@ -0,0 +1,45 @@
+.TH HP-MANYARGS 1 "January 4, 2011" OpenBSD
+.SH NAME
+HP-manyargs \- too many header args for hanged blocks
+.SH DESCRIPTION
+regular
+text
+.HP 10n
+tag1
+indented
+text
+.PP
+regular
+text
+.HP 10n tag1
+tag2
+indented
+text
+.PP
+regular
+text
+.HP 10n tag2 tag1
+tag3
+indented
+text
+.nf
+literal
+text
+.HP 10n
+tag1
+indented
+text
+.PP
+literal
+text
+.HP 10n tag1
+tag2
+indented
+text
+.PP
+literal
+text
+.HP 10n tag2 tag1
+tag3
+indented
+text
diff --git a/regress/man/HP/manyargs.out_ascii b/regress/man/HP/manyargs.out_ascii
new file mode 100644
index 00000000..be399855
--- /dev/null
+++ b/regress/man/HP/manyargs.out_ascii
@@ -0,0 +1,43 @@
+HP-MANYARGS(1) General Commands Manual HP-MANYARGS(1)
+
+
+
+NNAAMMEE
+ HP-manyargs - too many header args for hanged blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag1 indented text
+
+ regular text
+
+ tag2 indented text
+
+ regular text
+
+ tag3 indented text
+ literal
+ text
+
+ tag1
+ indented
+ text
+
+ literal
+ text
+
+ tag2
+ indented
+ text
+
+ literal
+ text
+
+ tag3
+ indented
+ text
+
+
+
+OpenBSD January 4, 2011 HP-MANYARGS(1)
diff --git a/regress/man/HP/spacing.in b/regress/man/HP/spacing.in
new file mode 100644
index 00000000..0faec1b5
--- /dev/null
+++ b/regress/man/HP/spacing.in
@@ -0,0 +1,59 @@
+.TH HP-SPACING 1 "December 23, 2014" OpenBSD
+.SH NAME
+HP-spacing \- spacing in hanged lists
+.SH DESCRIPTION
+Normal text.
+.HP
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.sp 1v
+Vertical spacing an a third line.
+.br
+A fourth line.
+.HP -10n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP -4n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP 0n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP 1n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP 2n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP 4n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP 8n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP 16n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.br
+And a second line.
+.HP 78n
+Each hanged paragraph gets a sufficient amount of text
+to wrap to the next line.
+.LP
+Normal text.
diff --git a/regress/man/HP/spacing.out_ascii b/regress/man/HP/spacing.out_ascii
new file mode 100644
index 00000000..a2233044
--- /dev/null
+++ b/regress/man/HP/spacing.out_ascii
@@ -0,0 +1,58 @@
+HP-SPACING(1) General Commands Manual HP-SPACING(1)
+
+
+
+NNAAMMEE
+ HP-spacing - spacing in hanged lists
+
+DDEESSCCRRIIPPTTIIOONN
+ Normal text.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Vertical spacing an a third line.
+ A fourth line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+next line.
+And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next line.
+ And a second line.
+
+ Each hanged paragraph gets a sufficient amount of text to wrap to the
+ next
+ line.
+
+ Normal text.
+
+
+
+OpenBSD December 23, 2014 HP-SPACING(1)
diff --git a/regress/man/IP/Makefile b/regress/man/IP/Makefile
new file mode 100644
index 00000000..9edc12e1
--- /dev/null
+++ b/regress/man/IP/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.8 2014/07/02 05:51:49 schwarze Exp $
+
+REGRESS_TARGETS = empty literal longhead manyargs spacing width
+LINT_TARGETS = empty
+
+.include <bsd.regress.mk>
diff --git a/regress/man/IP/empty.in b/regress/man/IP/empty.in
new file mode 100644
index 00000000..42afeefa
--- /dev/null
+++ b/regress/man/IP/empty.in
@@ -0,0 +1,26 @@
+.TH IP-EMPTY 1 "July 17, 2012" OpenBSD
+.SH NAME
+IP-empty \- empty indented paragraphs
+.SH DESCRIPTION
+regular
+text
+.IP
+indented
+text
+.PP
+Empty IP is deleted:
+.IP
+.IP tag1 10n
+.IP tag2
+indented
+text
+.PP
+Empty IP is deleted, RS does not cause additional spacing:
+.IP
+.RS
+.IP tag
+indented
+text
+.RE
+regular
+text
diff --git a/regress/man/IP/empty.out_ascii b/regress/man/IP/empty.out_ascii
new file mode 100644
index 00000000..24ab17fa
--- /dev/null
+++ b/regress/man/IP/empty.out_ascii
@@ -0,0 +1,26 @@
+IP-EMPTY(1) General Commands Manual IP-EMPTY(1)
+
+
+
+NNAAMMEE
+ IP-empty - empty indented paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ indented text
+
+ Empty IP is deleted:
+
+ tag1
+
+ tag2 indented text
+
+ Empty IP is deleted, RS does not cause additional spacing:
+
+ tag indented text
+ regular text
+
+
+
+OpenBSD July 17, 2012 IP-EMPTY(1)
diff --git a/regress/man/IP/empty.out_lint b/regress/man/IP/empty.out_lint
new file mode 100644
index 00000000..9f677652
--- /dev/null
+++ b/regress/man/IP/empty.out_lint
@@ -0,0 +1,2 @@
+mandoc: empty.in:12:2: WARNING: skipping paragraph macro: IP empty
+mandoc: empty.in:19:2: WARNING: skipping paragraph macro: IP empty
diff --git a/regress/man/IP/literal.in b/regress/man/IP/literal.in
new file mode 100644
index 00000000..468f1a91
--- /dev/null
+++ b/regress/man/IP/literal.in
@@ -0,0 +1,24 @@
+.TH IP-LITERAL 1 "January 4, 2011" OpenBSD
+.SH NAME
+IP-literal \- indented paragraphs in literal context
+.SH DESCRIPTION
+regular
+text
+.IP tag 10n
+indented
+text
+.PP
+regular
+text
+.nf
+literal
+text
+.IP tag 10n
+indented
+text
+.PP
+literal
+text
+.fi
+regular
+text
diff --git a/regress/man/IP/literal.out_ascii b/regress/man/IP/literal.out_ascii
new file mode 100644
index 00000000..f7e9bb8d
--- /dev/null
+++ b/regress/man/IP/literal.out_ascii
@@ -0,0 +1,26 @@
+IP-LITERAL(1) General Commands Manual IP-LITERAL(1)
+
+
+
+NNAAMMEE
+ IP-literal - indented paragraphs in literal context
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag indented text
+
+ regular text
+ literal
+ text
+
+ tag indented
+ text
+
+ literal
+ text
+ regular text
+
+
+
+OpenBSD January 4, 2011 IP-LITERAL(1)
diff --git a/regress/man/IP/longhead.in b/regress/man/IP/longhead.in
new file mode 100644
index 00000000..f24922c0
--- /dev/null
+++ b/regress/man/IP/longhead.in
@@ -0,0 +1,10 @@
+.TH IP-LONGHEAD 1 "April 8, 2014" OpenBSD
+.SH NAME
+IP-longhead \- indented paragraph with a long head
+.SH DESCRIPTION
+normal text
+.IP "This indented paragraph has ridiculously long text \
+in its head, such that it doesn't even fit on the line" 6n
+paragraph body
+.PP
+normal text
diff --git a/regress/man/IP/longhead.out_ascii b/regress/man/IP/longhead.out_ascii
new file mode 100644
index 00000000..ce0ef109
--- /dev/null
+++ b/regress/man/IP/longhead.out_ascii
@@ -0,0 +1,19 @@
+IP-LONGHEAD(1) General Commands Manual IP-LONGHEAD(1)
+
+
+
+NNAAMMEE
+ IP-longhead - indented paragraph with a long head
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ This indented paragraph has ridiculously long text in its head, such
+ that it doesn't even fit on the line
+ paragraph body
+
+ normal text
+
+
+
+OpenBSD April 8, 2014 IP-LONGHEAD(1)
diff --git a/regress/man/IP/manyargs.in b/regress/man/IP/manyargs.in
new file mode 100644
index 00000000..4a683829
--- /dev/null
+++ b/regress/man/IP/manyargs.in
@@ -0,0 +1,39 @@
+.TH IP-MANYARGS 1 "January 4, 2011" OpenBSD
+.SH NAME
+IP-manyargs \- too many header args for indented blocks
+.SH DESCRIPTION
+regular
+text
+.IP tag1 10n
+indented
+text
+.PP
+regular
+text
+.IP tag2 10n tag1
+indented
+text
+.PP
+regular
+text
+.IP tag3 10n tag2 tag1
+indented
+text
+.nf
+literal
+text
+.IP tag1 10n
+indented
+text
+.PP
+literal
+text
+.IP tag2 10n tag1
+indented
+text
+.PP
+literal
+text
+.IP tag3 10n tag2 tag1
+indented
+text
diff --git a/regress/man/IP/manyargs.out_ascii b/regress/man/IP/manyargs.out_ascii
new file mode 100644
index 00000000..ab05c32d
--- /dev/null
+++ b/regress/man/IP/manyargs.out_ascii
@@ -0,0 +1,40 @@
+IP-MANYARGS(1) General Commands Manual IP-MANYARGS(1)
+
+
+
+NNAAMMEE
+ IP-manyargs - too many header args for indented blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag1 indented text
+
+ regular text
+
+ tag2 indented text
+
+ regular text
+
+ tag3 indented text
+ literal
+ text
+
+ tag1 indented
+ text
+
+ literal
+ text
+
+ tag2 indented
+ text
+
+ literal
+ text
+
+ tag3 indented
+ text
+
+
+
+OpenBSD January 4, 2011 IP-MANYARGS(1)
diff --git a/regress/man/IP/spacing.in b/regress/man/IP/spacing.in
new file mode 100644
index 00000000..e1239b5b
--- /dev/null
+++ b/regress/man/IP/spacing.in
@@ -0,0 +1,31 @@
+.TH IP-SPACING 1 "September 21, 2015" OpenBSD
+.SH NAME
+IP-spacing \- spacing in indentend paragraphs
+.SH DESCRIPTION
+Normal text.
+.IP tag
+Indented text.
+.IP four
+Indented text.
+.IP ffive
+Indented text.
+.IP sixsix
+Indented text.
+.IP seseven
+Indented text.
+.IP "a much longer tag"
+Indented text.
+.LP
+Tags with trailing space:
+.IP "tag "
+Three plus one makes four.
+.IP "tag "
+Three plus two makes five.
+.IP "tag "
+Three plus three makes six.
+.IP "tag "
+Three plus four makes seven.
+.IP "tag "
+Three plus five makes eight.
+.LP
+Normal text.
diff --git a/regress/man/IP/spacing.out_ascii b/regress/man/IP/spacing.out_ascii
new file mode 100644
index 00000000..0aeb8291
--- /dev/null
+++ b/regress/man/IP/spacing.out_ascii
@@ -0,0 +1,41 @@
+IP-SPACING(1) General Commands Manual IP-SPACING(1)
+
+
+
+NNAAMMEE
+ IP-spacing - spacing in indentend paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ Normal text.
+
+ tag Indented text.
+
+ four Indented text.
+
+ ffive Indented text.
+
+ sixsix Indented text.
+
+ seseven
+ Indented text.
+
+ a much longer tag
+ Indented text.
+
+ Tags with trailing space:
+
+ tag Three plus one makes four.
+
+ tag Three plus two makes five.
+
+ tag Three plus three makes six.
+
+ tag Three plus four makes seven.
+
+ tag Three plus five makes eight.
+
+ Normal text.
+
+
+
+OpenBSD September 21, 2015 IP-SPACING(1)
diff --git a/regress/man/IP/width.in b/regress/man/IP/width.in
new file mode 100644
index 00000000..1c919a38
--- /dev/null
+++ b/regress/man/IP/width.in
@@ -0,0 +1,78 @@
+.TH IP-WIDTH 1 "December 23, 2014" OpenBSD
+.SH NAME
+IP-width \- indentation width of indented paragraphs
+.SH DESCRIPTION
+Regular mode:
+.IP tag -10n
+indented
+.br
+text
+.IP tag -4n
+indented
+.br
+text
+.IP tag 0n
+indented
+.br
+text
+.IP tag 1n
+indented
+.br
+text
+.IP tag 2n
+indented
+.br
+text
+.IP tag 3n
+indented
+.br
+text
+.IP tag 4n
+indented
+.br
+text
+.IP tag 5n
+indented
+.br
+text
+.IP tag xxx
+indented
+.br
+text
+.IP tag 100n
+indented
+.br
+text
+.PP
+Literal mode:
+.nf
+.IP tag -10n
+indented
+text
+.IP tag -4n
+indented
+text
+.IP tag 0n
+indented
+text
+.IP tag 1n
+indented
+text
+.IP tag 2n
+indented
+text
+.IP tag 3n
+indented
+text
+.IP tag 4n
+indented
+text
+.IP tag 5n
+indented
+text
+.IP tag xxx
+indented
+text
+.IP tag 100n
+indented
+text
diff --git a/regress/man/IP/width.out_ascii b/regress/man/IP/width.out_ascii
new file mode 100644
index 00000000..a867ba70
--- /dev/null
+++ b/regress/man/IP/width.out_ascii
@@ -0,0 +1,87 @@
+IP-WIDTH(1) General Commands Manual IP-WIDTH(1)
+
+
+
+NNAAMMEE
+ IP-width - indentation width of indented paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ Regular mode:
+
+ tag
+indented
+text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ Literal mode:
+
+ tag
+indented
+text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+
+
+OpenBSD December 23, 2014 IP-WIDTH(1)
diff --git a/regress/man/Makefile b/regress/man/Makefile
new file mode 100644
index 00000000..882d8cba
--- /dev/null
+++ b/regress/man/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.17 2015/03/20 16:09:25 schwarze Exp $
+
+SUBDIR = B BI EX HP IP OP PD PP RS SH SS TH TP TS UR nf blank
+
+.include "../Makefile.sub"
+.include <bsd.subdir.mk>
diff --git a/regress/man/Makefile.inc b/regress/man/Makefile.inc
new file mode 100644
index 00000000..6b294ca9
--- /dev/null
+++ b/regress/man/Makefile.inc
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile.inc,v 1.3 2015/02/03 19:37:25 schwarze Exp $
+
+SKIP_TMAN ?= ALL
+
+.include "../Makefile.inc"
diff --git a/regress/man/OP/Makefile b/regress/man/OP/Makefile
new file mode 100644
index 00000000..fa4f7e9c
--- /dev/null
+++ b/regress/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/man/OP/args.in b/regress/man/OP/args.in
new file mode 100644
index 00000000..3fed8337
--- /dev/null
+++ b/regress/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/man/OP/args.out_ascii b/regress/man/OP/args.out_ascii
new file mode 100644
index 00000000..ca3e3c03
--- /dev/null
+++ b/regress/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/man/OP/args.out_lint b/regress/man/OP/args.out_lint
new file mode 100644
index 00000000..c468d9d0
--- /dev/null
+++ b/regress/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/man/PD/Makefile b/regress/man/PD/Makefile
new file mode 100644
index 00000000..049cbec4
--- /dev/null
+++ b/regress/man/PD/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2015/03/20 14:47:20 schwarze Exp $
+
+REGRESS_TARGETS = args nextline spacing
+LINT_TARGETS = args
+
+.include <bsd.regress.mk>
diff --git a/regress/man/PD/args.in b/regress/man/PD/args.in
new file mode 100644
index 00000000..97bd7993
--- /dev/null
+++ b/regress/man/PD/args.in
@@ -0,0 +1,28 @@
+.TH PD-ARGS 1 "December 23, 2014" OpenBSD
+.SH NAME
+PD-args \- unusual arguments to the PD macro
+.SH DESCRIPTION
+initial text
+.PP
+default spacing
+.PD 2
+.PP
+argument(2)
+.PD
+.PP
+no argument at all
+.PD 2v
+.PP
+argument(2v)
+.PD 2p
+.PP
+argument(2p)
+.PD 1cx
+.PP
+argument(1cx)
+.PD xxx
+.PP
+argument(xxx)
+.PD 0 zzz
+.PP
+excessive argument
diff --git a/regress/man/PD/args.out_ascii b/regress/man/PD/args.out_ascii
new file mode 100644
index 00000000..24f98d55
--- /dev/null
+++ b/regress/man/PD/args.out_ascii
@@ -0,0 +1,31 @@
+PD-ARGS(1) General Commands Manual PD-ARGS(1)
+
+
+
+NNAAMMEE
+ PD-args - unusual arguments to the PD macro
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ default spacing
+
+
+ argument(2)
+
+ no argument at all
+
+
+ argument(2v)
+ argument(2p)
+
+
+ argument(1cx)
+
+
+ argument(xxx)
+ excessive argument
+
+
+
+OpenBSD December 23, 2014 PD-ARGS(1)
diff --git a/regress/man/PD/args.out_lint b/regress/man/PD/args.out_lint
new file mode 100644
index 00000000..9e42b46e
--- /dev/null
+++ b/regress/man/PD/args.out_lint
@@ -0,0 +1 @@
+mandoc: args.in:26:7: ERROR: skipping excess arguments: PD ... zzz
diff --git a/regress/man/PD/nextline.in b/regress/man/PD/nextline.in
new file mode 100644
index 00000000..a417f9d8
--- /dev/null
+++ b/regress/man/PD/nextline.in
@@ -0,0 +1,42 @@
+.TH PD-NEXTLINE 1 "March 20, 2015" OpenBSD
+.SH NAME
+PD-nextline \- paragraph distance macro in next-line scope
+.SH DESCRIPTION
+some text
+.SH
+.PD 0v
+NEXT SECTION
+first paragraph
+.PP
+second paragraph
+.PD 1v
+.PP
+third paragraph
+.SS
+.PD 0v
+Subsection
+first paragraph
+.PP
+second paragraph
+.PD 1v
+.PP
+third paragraph
+.TP 6n
+.PD 0v
+tag
+list text
+.TP
+tag
+list text
+.PD 1v
+.TP
+tag
+list text
+.PP
+normal text
+.B
+.PD 0v
+bold text
+normal text
+.PP
+final paragraph
diff --git a/regress/man/PD/nextline.out_ascii b/regress/man/PD/nextline.out_ascii
new file mode 100644
index 00000000..f0e73326
--- /dev/null
+++ b/regress/man/PD/nextline.out_ascii
@@ -0,0 +1,33 @@
+PD-NEXTLINE(1) General Commands Manual PD-NEXTLINE(1)
+
+
+
+NNAAMMEE
+ PD-nextline - paragraph distance macro in next-line scope
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+NNEEXXTT SSEECCTTIIOONN
+ first paragraph
+ second paragraph
+
+ third paragraph
+
+ SSuubbsseeccttiioonn
+ first paragraph
+ second paragraph
+
+ third paragraph
+
+ tag list text
+ tag list text
+
+ tag list text
+
+ normal text bboolldd tteexxtt normal text
+ final paragraph
+
+
+
+OpenBSD March 20, 2015 PD-NEXTLINE(1)
diff --git a/regress/man/PD/spacing.in b/regress/man/PD/spacing.in
new file mode 100644
index 00000000..9b324149
--- /dev/null
+++ b/regress/man/PD/spacing.in
@@ -0,0 +1,62 @@
+.TH PD-SPACING 1 "July 28, 2012" OpenBSD
+.SH NAME
+PD-spacing \- effect of the PD macro on vertical spacing
+.SH DESCRIPTION
+initial text
+.PP
+paragraph
+.HP
+hanged
+paragraph
+.IP indented
+paragraph
+.TP
+tagged
+paragraph
+.SS subsection
+subsection text
+.PD 2
+.SH DOUBLE SPACING
+initial text
+.PP
+paragraph
+.HP
+hanged
+paragraph
+.IP indented
+paragraph
+.TP
+tagged
+paragraph
+.SS subsection
+subsection text
+.PD 0
+.SH NO SPACING
+initial text
+.PP
+paragraph
+.HP
+hanged
+paragraph
+.IP indented
+paragraph
+.TP
+tagged
+paragraph
+.SS subsection
+subsection text
+.PD 1
+.SH NORMAL SPACING
+initial text
+.PP
+paragraph
+.HP
+hanged
+paragraph
+.IP indented
+paragraph
+.TP
+tagged
+paragraph
+.SS subsection
+subsection text
diff --git a/regress/man/PD/spacing.out_ascii b/regress/man/PD/spacing.out_ascii
new file mode 100644
index 00000000..72612304
--- /dev/null
+++ b/regress/man/PD/spacing.out_ascii
@@ -0,0 +1,70 @@
+PD-SPACING(1) General Commands Manual PD-SPACING(1)
+
+
+
+NNAAMMEE
+ PD-spacing - effect of the PD macro on vertical spacing
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ paragraph
+
+ hanged paragraph
+
+ indented
+ paragraph
+
+ tagged paragraph
+
+ ssuubbsseeccttiioonn
+ subsection text
+
+
+DDOOUUBBLLEE SSPPAACCIINNGG
+ initial text
+
+
+ paragraph
+
+
+ hanged paragraph
+
+
+ indented
+ paragraph
+
+
+ tagged paragraph
+
+
+ ssuubbsseeccttiioonn
+ subsection text
+NNOO SSPPAACCIINNGG
+ initial text
+ paragraph
+ hanged paragraph
+ indented
+ paragraph
+ tagged paragraph
+ ssuubbsseeccttiioonn
+ subsection text
+
+NNOORRMMAALL SSPPAACCIINNGG
+ initial text
+
+ paragraph
+
+ hanged paragraph
+
+ indented
+ paragraph
+
+ tagged paragraph
+
+ ssuubbsseeccttiioonn
+ subsection text
+
+
+
+OpenBSD July 28, 2012 PD-SPACING(1)
diff --git a/regress/man/PP/Makefile b/regress/man/PP/Makefile
new file mode 100644
index 00000000..7655d294
--- /dev/null
+++ b/regress/man/PP/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/04 16:11:41 schwarze Exp $
+
+REGRESS_TARGETS = args empty
+LINT_TARGETS = args empty
+
+.include <bsd.regress.mk>
diff --git a/regress/man/PP/args.in b/regress/man/PP/args.in
new file mode 100644
index 00000000..e608d9b9
--- /dev/null
+++ b/regress/man/PP/args.in
@@ -0,0 +1,11 @@
+.TH PP-ARG 1 "July 4, 2014" OpenBSD
+.SH NAME
+PP-arg \- paragraphs macros with arguments
+.SH DESCRIPTION
+PP with argument:
+.PP arg
+LP with arguments:
+.LP arg1 arg2
+P with argument:
+.P arg
+final text
diff --git a/regress/man/PP/args.out_ascii b/regress/man/PP/args.out_ascii
new file mode 100644
index 00000000..10cb1774
--- /dev/null
+++ b/regress/man/PP/args.out_ascii
@@ -0,0 +1,19 @@
+PP-ARG(1) General Commands Manual PP-ARG(1)
+
+
+
+NNAAMMEE
+ PP-arg - paragraphs macros with arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ PP with argument:
+
+ LP with arguments:
+
+ P with argument:
+
+ final text
+
+
+
+OpenBSD July 4, 2014 PP-ARG(1)
diff --git a/regress/man/PP/args.out_lint b/regress/man/PP/args.out_lint
new file mode 100644
index 00000000..f2862245
--- /dev/null
+++ b/regress/man/PP/args.out_lint
@@ -0,0 +1,3 @@
+mandoc: args.in:6:2: ERROR: skipping all arguments: PP arg
+mandoc: args.in:8:2: ERROR: skipping all arguments: LP arg1 ...
+mandoc: args.in:10:2: ERROR: skipping all arguments: P arg
diff --git a/regress/man/PP/empty.in b/regress/man/PP/empty.in
new file mode 100644
index 00000000..a6ac538f
--- /dev/null
+++ b/regress/man/PP/empty.in
@@ -0,0 +1,15 @@
+.TH PP-EMPTY 1 "May 24, 2010" OpenBSD
+.SH NAME
+PP-empty \- handling of empty paragraphs
+.SH DESCRIPTION
+.PP
+empty PP between two PPs:
+.PP
+.PP
+empty PP between PP and IP:
+.PP
+.IP head
+empty PP between IP and PP:
+.PP
+.PP
+the end
diff --git a/regress/man/PP/empty.out_ascii b/regress/man/PP/empty.out_ascii
new file mode 100644
index 00000000..ec770f2d
--- /dev/null
+++ b/regress/man/PP/empty.out_ascii
@@ -0,0 +1,19 @@
+PP-EMPTY(1) General Commands Manual PP-EMPTY(1)
+
+
+
+NNAAMMEE
+ PP-empty - handling of empty paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ empty PP between two PPs:
+
+ empty PP between PP and IP:
+
+ head empty PP between IP and PP:
+
+ the end
+
+
+
+OpenBSD May 24, 2010 PP-EMPTY(1)
diff --git a/regress/man/PP/empty.out_lint b/regress/man/PP/empty.out_lint
new file mode 100644
index 00000000..6af9e658
--- /dev/null
+++ b/regress/man/PP/empty.out_lint
@@ -0,0 +1,3 @@
+mandoc: empty.in:7:2: WARNING: skipping paragraph macro: PP empty
+mandoc: empty.in:10:2: WARNING: skipping paragraph macro: PP empty
+mandoc: empty.in:13:2: WARNING: skipping paragraph macro: PP empty
diff --git a/regress/man/RS/Makefile b/regress/man/RS/Makefile
new file mode 100644
index 00000000..4c62bb30
--- /dev/null
+++ b/regress/man/RS/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.11 2015/04/06 13:34:54 schwarze Exp $
+
+REGRESS_TARGETS = breaking broken empty literal lonelyRE
+REGRESS_TARGETS += nested noRE nowidth REarg width
+LINT_TARGETS = empty lonelyRE noRE REarg
+
+.include <bsd.regress.mk>
diff --git a/regress/man/RS/REarg.in b/regress/man/RS/REarg.in
new file mode 100644
index 00000000..05eadd8e
--- /dev/null
+++ b/regress/man/RS/REarg.in
@@ -0,0 +1,26 @@
+.TH RS-REARG 1 "January 24, 2015" OpenBSD
+.SH NAME
+RS-REarg \- arguments to the RE macro
+.SH DESCRIPTION
+level 1
+.RS 4n 2i
+level 2
+.RS 2n
+level 3
+.RE 2a
+back to 2
+.RE 1b
+back to 1
+.RS 4n
+level 2
+.RS 2n
+level 3
+.RE 1c
+back to 1
+.RS 4n
+level 2
+.RS 2n
+level 3
+.RE 0d
+back to 1
+.RE 1e
diff --git a/regress/man/RS/REarg.out_ascii b/regress/man/RS/REarg.out_ascii
new file mode 100644
index 00000000..747e037b
--- /dev/null
+++ b/regress/man/RS/REarg.out_ascii
@@ -0,0 +1,23 @@
+RS-REARG(1) General Commands Manual RS-REARG(1)
+
+
+
+NNAAMMEE
+ RS-REarg - arguments to the RE macro
+
+DDEESSCCRRIIPPTTIIOONN
+ level 1
+ level 2
+ level 3
+ back to 2
+ back to 1
+ level 2
+ level 3
+ back to 1
+ level 2
+ level 3
+ back to 1
+
+
+
+OpenBSD January 24, 2015 RS-REARG(1)
diff --git a/regress/man/RS/REarg.out_lint b/regress/man/RS/REarg.out_lint
new file mode 100644
index 00000000..3b516d96
--- /dev/null
+++ b/regress/man/RS/REarg.out_lint
@@ -0,0 +1,7 @@
+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
+mandoc: REarg.in:24:6: ERROR: skipping excess arguments: RE ... d
+mandoc: REarg.in:26:6: ERROR: skipping excess arguments: RE ... e
+mandoc: REarg.in:26:2: ERROR: fewer RS blocks open, skipping: RE 1
diff --git a/regress/man/RS/breaking.in b/regress/man/RS/breaking.in
new file mode 100644
index 00000000..441c5524
--- /dev/null
+++ b/regress/man/RS/breaking.in
@@ -0,0 +1,23 @@
+.TH RS-BREAKING 1 "7 July 2012" OpenBSD
+.SH NAME
+RS-breaking \- some block gets broken by an RS block
+.SH DESCRIPTION
+preceding text
+.TP 4n
+*
+item
+.RS 8n
+indented text
+.RE
+middle text
+.TP 4n
+*
+.RS 8n
+indented text
+.RE
+.\" middle text
+.\" .TP 4n
+.\" .RS 8n
+.\" indented text
+.\" .RE
+trailing text
diff --git a/regress/man/RS/breaking.out_ascii b/regress/man/RS/breaking.out_ascii
new file mode 100644
index 00000000..687e2990
--- /dev/null
+++ b/regress/man/RS/breaking.out_ascii
@@ -0,0 +1,21 @@
+RS-BREAKING(1) General Commands Manual RS-BREAKING(1)
+
+
+
+NNAAMMEE
+ RS-breaking - some block gets broken by an RS block
+
+DDEESSCCRRIIPPTTIIOONN
+ preceding text
+
+ * item
+ indented text
+ middle text
+
+ *
+ indented text
+ trailing text
+
+
+
+OpenBSD 7 July 2012 RS-BREAKING(1)
diff --git a/regress/man/RS/broken.in b/regress/man/RS/broken.in
new file mode 100644
index 00000000..ea81c0c3
--- /dev/null
+++ b/regress/man/RS/broken.in
@@ -0,0 +1,45 @@
+.TH RS-BROKEN 1 "January 24, 2015" OpenBSD
+.SH NAME
+RS-broken \- indented blocks broken by other blocks
+.SH DESCRIPTION
+broken by PP:
+.RS 2n
+indented
+.PP
+still indented
+.RE
+broken by IP:
+.RS
+indented
+.IP tag 6n
+first line
+.br
+second line
+.PP
+still indented
+.RE
+broken by TP:
+.RS
+indented
+.TP 6n
+tag
+first line
+.br
+second line
+.PP
+still indented
+.RE
+broken by HP:
+.RS
+indented
+.HP 2n
+Let's have a longer text here such that we can see the line break.
+.PP
+still indented
+.RE
+trailing PP:
+.RS
+indented
+.PP
+.RE
+final text
diff --git a/regress/man/RS/broken.out_ascii b/regress/man/RS/broken.out_ascii
new file mode 100644
index 00000000..ab219ac1
--- /dev/null
+++ b/regress/man/RS/broken.out_ascii
@@ -0,0 +1,41 @@
+RS-BROKEN(1) General Commands Manual RS-BROKEN(1)
+
+
+
+NNAAMMEE
+ RS-broken - indented blocks broken by other blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ broken by PP:
+ indented
+
+ still indented
+ broken by IP:
+ indented
+
+ tag first line
+ second line
+
+ still indented
+ broken by TP:
+ indented
+
+ tag first line
+ second line
+
+ still indented
+ broken by HP:
+ indented
+
+ Let's have a longer text here such that we can see the line
+ break.
+
+ still indented
+ trailing PP:
+ indented
+
+ final text
+
+
+
+OpenBSD January 24, 2015 RS-BROKEN(1)
diff --git a/regress/man/RS/empty.in b/regress/man/RS/empty.in
new file mode 100644
index 00000000..a7cd5829
--- /dev/null
+++ b/regress/man/RS/empty.in
@@ -0,0 +1,16 @@
+.TH RS-EMPTY 1 "July 17, 2012" OpenBSD
+.SH NAME
+RS-empty \- empty margin reset blocks
+.SH DESCRIPTION
+regular
+text
+.RS 8n
+.RE
+regular
+text
+.RS 8n
+indented
+text
+.RE
+regular
+text
diff --git a/regress/man/RS/empty.out_ascii b/regress/man/RS/empty.out_ascii
new file mode 100644
index 00000000..7dee40c7
--- /dev/null
+++ b/regress/man/RS/empty.out_ascii
@@ -0,0 +1,16 @@
+RS-EMPTY(1) General Commands Manual RS-EMPTY(1)
+
+
+
+NNAAMMEE
+ RS-empty - empty margin reset blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ regular text
+ indented text
+ regular text
+
+
+
+OpenBSD July 17, 2012 RS-EMPTY(1)
diff --git a/regress/man/RS/empty.out_lint b/regress/man/RS/empty.out_lint
new file mode 100644
index 00000000..fe983c38
--- /dev/null
+++ b/regress/man/RS/empty.out_lint
@@ -0,0 +1 @@
+mandoc: empty.in:7:2: WARNING: empty block: RS
diff --git a/regress/man/RS/literal.in b/regress/man/RS/literal.in
new file mode 100644
index 00000000..bd57c610
--- /dev/null
+++ b/regress/man/RS/literal.in
@@ -0,0 +1,18 @@
+.TH RS-LITERAL 1 "January 5, 2013" OpenBSD
+.SH NAME
+RS-literal \- indented literal text
+.SH DESCRIPTION
+regular
+text
+.nf
+literal
+text
+.RS
+This is a short line.
+This is a very long line that would wrap if it weren't in literal context.
+.RE
+.PP
+literal text
+.fi
+regular
+text
diff --git a/regress/man/RS/literal.out_ascii b/regress/man/RS/literal.out_ascii
new file mode 100644
index 00000000..a96741f3
--- /dev/null
+++ b/regress/man/RS/literal.out_ascii
@@ -0,0 +1,20 @@
+RS-LITERAL(1) General Commands Manual RS-LITERAL(1)
+
+
+
+NNAAMMEE
+ RS-literal - indented literal text
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ literal
+ text
+ This is a short line.
+ This is a very long line that would wrap if it weren't in literal context.
+
+ literal text
+ regular text
+
+
+
+OpenBSD January 5, 2013 RS-LITERAL(1)
diff --git a/regress/man/RS/lonelyRE.in b/regress/man/RS/lonelyRE.in
new file mode 100644
index 00000000..2f166dae
--- /dev/null
+++ b/regress/man/RS/lonelyRE.in
@@ -0,0 +1,21 @@
+.TH RS-LONELYRE 1 "November 10, 2013" OpenBSD
+.SH NAME
+RS-lonelyRE \- closing RS that is not open
+.SH DESCRIPTION
+.RS
+indented text
+.RE
+.TP 6n
+tag
+body
+.RE
+out of body
+.IP tag 6n
+body
+.RE
+out of body
+.HP 6n
+Here we need some text that is long enough to span more than one
+output line, such that we can see the hanging indentation.
+.RE
+out of body
diff --git a/regress/man/RS/lonelyRE.out_ascii b/regress/man/RS/lonelyRE.out_ascii
new file mode 100644
index 00000000..1b062d10
--- /dev/null
+++ b/regress/man/RS/lonelyRE.out_ascii
@@ -0,0 +1,23 @@
+RS-LONELYRE(1) General Commands Manual RS-LONELYRE(1)
+
+
+
+NNAAMMEE
+ RS-lonelyRE - closing RS that is not open
+
+DDEESSCCRRIIPPTTIIOONN
+ indented text
+
+ tag body
+ out of body
+
+ tag body
+ out of body
+
+ Here we need some text that is long enough to span more than one output
+ line, such that we can see the hanging indentation.
+ out of body
+
+
+
+OpenBSD November 10, 2013 RS-LONELYRE(1)
diff --git a/regress/man/RS/lonelyRE.out_lint b/regress/man/RS/lonelyRE.out_lint
new file mode 100644
index 00000000..8cb30028
--- /dev/null
+++ b/regress/man/RS/lonelyRE.out_lint
@@ -0,0 +1,3 @@
+mandoc: lonelyRE.in:11:2: ERROR: skipping end of block that is not open: RE
+mandoc: lonelyRE.in:15:2: ERROR: skipping end of block that is not open: RE
+mandoc: lonelyRE.in:20:2: ERROR: skipping end of block that is not open: RE
diff --git a/regress/man/RS/nested.in b/regress/man/RS/nested.in
new file mode 100644
index 00000000..7650e43f
--- /dev/null
+++ b/regress/man/RS/nested.in
@@ -0,0 +1,54 @@
+.TH RS-NESTED 1 "April 4, 2015" OpenBSD
+.SH NAME
+RS-nested \- various blocks nested inside reset blocks
+.SH DESCRIPTION
+regular
+text
+.RS
+outer
+text (default indent)
+.RS
+inner
+text (default indent)
+.RE
+outer
+text
+.RE
+regular text
+.IP tag 6n
+tagged text (6n)
+.RS
+outer text (saved 6n)
+.RS
+inner text (default indent)
+.RE
+outer text
+.RE
+regular text
+.RS 4n
+outer text (4n)
+.RS 2n
+inner text (2n)
+.RE
+outer text
+.IP indent 8n
+text (8n)
+.TP 6n
+tag
+text (6n)
+.HP 12n
+hanged
+This is very long text.
+Let's see where it will break the line,
+and which indent the next line will have - hopefully 12n.
+.PP
+outer text
+.RE
+nesting HP and RS inside RS:
+.RS
+outer text
+.HP 2n
+.RS 4n
+inner text
+.RE
+.RE
diff --git a/regress/man/RS/nested.out_ascii b/regress/man/RS/nested.out_ascii
new file mode 100644
index 00000000..f64bc5af
--- /dev/null
+++ b/regress/man/RS/nested.out_ascii
@@ -0,0 +1,41 @@
+RS-NESTED(1) General Commands Manual RS-NESTED(1)
+
+
+
+NNAAMMEE
+ RS-nested - various blocks nested inside reset blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ outer text (default indent)
+ inner text (default indent)
+ outer text
+ regular text
+
+ tag tagged text (6n)
+ outer text (saved 6n)
+ inner text (default indent)
+ outer text
+ regular text
+ outer text (4n)
+ inner text (2n)
+ outer text
+
+ indent text (8n)
+
+ tag text (6n)
+
+ hanged This is very long text. Let's see where it will break the
+ line, and which indent the next line will have -
+ hopefully 12n.
+
+ outer text
+ nesting HP and RS inside RS:
+ outer text
+
+
+ inner text
+
+
+
+OpenBSD April 4, 2015 RS-NESTED(1)
diff --git a/regress/man/RS/noRE.in b/regress/man/RS/noRE.in
new file mode 100644
index 00000000..45ecbc26
--- /dev/null
+++ b/regress/man/RS/noRE.in
@@ -0,0 +1,9 @@
+.TH RS-NORE 1 "June 20, 2014" OpenBSD
+.SH NAME
+RS-noRE \- unclosed indented block
+.SH DESCRIPTION
+regular
+text
+.RS 8n
+indented
+text
diff --git a/regress/man/RS/noRE.out_ascii b/regress/man/RS/noRE.out_ascii
new file mode 100644
index 00000000..efd11787
--- /dev/null
+++ b/regress/man/RS/noRE.out_ascii
@@ -0,0 +1,14 @@
+RS-NORE(1) General Commands Manual RS-NORE(1)
+
+
+
+NNAAMMEE
+ RS-noRE - unclosed indented block
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ indented text
+
+
+
+OpenBSD June 20, 2014 RS-NORE(1)
diff --git a/regress/man/RS/noRE.out_lint b/regress/man/RS/noRE.out_lint
new file mode 100644
index 00000000..3c4c0a13
--- /dev/null
+++ b/regress/man/RS/noRE.out_lint
@@ -0,0 +1 @@
+mandoc: noRE.in:7:2: ERROR: appending missing end of block: RS
diff --git a/regress/man/RS/nowidth.in b/regress/man/RS/nowidth.in
new file mode 100644
index 00000000..ee53489a
--- /dev/null
+++ b/regress/man/RS/nowidth.in
@@ -0,0 +1,20 @@
+.TH RS-NESTED 1 "April 6, 2015" OpenBSD
+.SH NAME
+RS-nowidth \- indentation blocks not specifying a width
+.SH DESCRIPTION
+regular text
+.RS
+top-level indented list
+.RE
+regular text
+.TP 2n
+\(bu
+bullet list
+.RS
+indented text
+.RE
+regular text
+.RS
+top-level indented list
+.RE
+regular text
diff --git a/regress/man/RS/nowidth.out_ascii b/regress/man/RS/nowidth.out_ascii
new file mode 100644
index 00000000..c72f18f2
--- /dev/null
+++ b/regress/man/RS/nowidth.out_ascii
@@ -0,0 +1,21 @@
+RS-NESTED(1) General Commands Manual RS-NESTED(1)
+
+
+
+NNAAMMEE
+ RS-nowidth - indentation blocks not specifying a width
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ top-level indented list
+ regular text
+
+ +o bullet list
+ indented text
+ regular text
+ top-level indented list
+ regular text
+
+
+
+OpenBSD April 6, 2015 RS-NESTED(1)
diff --git a/regress/man/RS/width.in b/regress/man/RS/width.in
new file mode 100644
index 00000000..e723b583
--- /dev/null
+++ b/regress/man/RS/width.in
@@ -0,0 +1,30 @@
+.TH RS-WIDTH 1 "December 23, 2014" OpenBSD
+.SH NAME
+RS-width \- negative and excessive indentation
+.SH DESCRIPTION
+regular
+text
+.RS -14n
+indented
+text
+.RE
+regular
+text
+.RS -4n
+indented
+text
+.RE
+regular
+text
+.RS 4n
+indented
+text
+.RE
+regular
+text
+.RS 100n
+indented
+text
+.RE
+regular
+text
diff --git a/regress/man/RS/width.out_ascii b/regress/man/RS/width.out_ascii
new file mode 100644
index 00000000..12cd6824
--- /dev/null
+++ b/regress/man/RS/width.out_ascii
@@ -0,0 +1,22 @@
+RS-WIDTH(1) General Commands Manual RS-WIDTH(1)
+
+
+
+NNAAMMEE
+ RS-width - negative and excessive indentation
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+indented text
+ regular text
+ indented text
+ regular text
+ indented text
+ regular text
+ indented
+ text
+ regular text
+
+
+
+OpenBSD December 23, 2014 RS-WIDTH(1)
diff --git a/regress/man/SH/Makefile b/regress/man/SH/Makefile
new file mode 100644
index 00000000..f94a4cae
--- /dev/null
+++ b/regress/man/SH/Makefile
@@ -0,0 +1,16 @@
+# $OpenBSD: Makefile,v 1.4 2015/04/04 18:52:12 schwarze Exp $
+
+REGRESS_TARGETS = broken broken_eline empty_before longarg noarg
+LINT_TARGETS = broken broken_eline empty_before noarg
+
+# groff-1.22.3 defects:
+# - .SH without args just before EOF causes two additional blank lines.
+# - Empty .SH heads cause additional vertical spacing.
+# - If .TP or .IP breaks .SH, the tag becomes bold.
+# - If .HP breaks .SH, a line is broken after the next input line.
+# - If .RS/RE/nf/fi breaks .SH, the next input line becomes bold.
+# - .UR does not break .SH.
+
+SKIP_GROFF = broken broken_eline noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/man/SH/broken.in b/regress/man/SH/broken.in
new file mode 100644
index 00000000..3d963ae1
--- /dev/null
+++ b/regress/man/SH/broken.in
@@ -0,0 +1,6 @@
+.TH SH-BROKEN 1 "July 30, 2014" OpenBSD
+.SH NAME
+SH-broken \- section header line scope broken by end of file
+.SH DESCRIPTION
+some text
+.SH
diff --git a/regress/man/SH/broken.out_ascii b/regress/man/SH/broken.out_ascii
new file mode 100644
index 00000000..eec4694e
--- /dev/null
+++ b/regress/man/SH/broken.out_ascii
@@ -0,0 +1,13 @@
+SH-BROKEN(1) General Commands Manual SH-BROKEN(1)
+
+
+
+NNAAMMEE
+ SH-broken - section header line scope broken by end of file
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+OpenBSD July 30, 2014 SH-BROKEN(1)
diff --git a/regress/man/SH/broken.out_lint b/regress/man/SH/broken.out_lint
new file mode 100644
index 00000000..70ab7537
--- /dev/null
+++ b/regress/man/SH/broken.out_lint
@@ -0,0 +1 @@
+mandoc: broken.in:6:2: WARNING: line scope broken: EOF breaks SH
diff --git a/regress/man/SH/broken_eline.in b/regress/man/SH/broken_eline.in
new file mode 100644
index 00000000..262be276
--- /dev/null
+++ b/regress/man/SH/broken_eline.in
@@ -0,0 +1,7 @@
+.TH SH-BROKEN_ELINE 1 "July 30, 2014" OpenBSD
+.SH NAME
+SH-broken_eline \- section and element line scope broken by eof
+.SH DESCRIPTION
+some text
+.SH
+.B
diff --git a/regress/man/SH/broken_eline.out_ascii b/regress/man/SH/broken_eline.out_ascii
new file mode 100644
index 00000000..6590e858
--- /dev/null
+++ b/regress/man/SH/broken_eline.out_ascii
@@ -0,0 +1,13 @@
+SH-BROKEN_ELINE(1) General Commands Manual SH-BROKEN_ELINE(1)
+
+
+
+NNAAMMEE
+ SH-broken_eline - section and element line scope broken by eof
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+OpenBSD July 30, 2014 SH-BROKEN_ELINE(1)
diff --git a/regress/man/SH/broken_eline.out_lint b/regress/man/SH/broken_eline.out_lint
new file mode 100644
index 00000000..089bf875
--- /dev/null
+++ b/regress/man/SH/broken_eline.out_lint
@@ -0,0 +1,2 @@
+mandoc: broken_eline.in:7:2: WARNING: line scope broken: EOF breaks B
+mandoc: broken_eline.in:6:2: WARNING: line scope broken: EOF breaks SH
diff --git a/regress/man/SH/empty_before.in b/regress/man/SH/empty_before.in
new file mode 100644
index 00000000..af1e4ac7
--- /dev/null
+++ b/regress/man/SH/empty_before.in
@@ -0,0 +1,6 @@
+.TH SH-EMPTY_BEFORE 1 "August 18, 2014" OpenBSD
+.PP
+.SH NAME
+SH-empty_before \- empty paragraph before first section header
+.SH DESCRIPTION
+some text
diff --git a/regress/man/SH/empty_before.out_ascii b/regress/man/SH/empty_before.out_ascii
new file mode 100644
index 00000000..14218a13
--- /dev/null
+++ b/regress/man/SH/empty_before.out_ascii
@@ -0,0 +1,13 @@
+SH-EMPTY_BEFORE(1) General Commands Manual SH-EMPTY_BEFORE(1)
+
+
+
+NNAAMMEE
+ SH-empty_before - empty paragraph before first section header
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+OpenBSD August 18, 2014 SH-EMPTY_BEFORE(1)
diff --git a/regress/man/SH/empty_before.out_lint b/regress/man/SH/empty_before.out_lint
new file mode 100644
index 00000000..b10c421a
--- /dev/null
+++ b/regress/man/SH/empty_before.out_lint
@@ -0,0 +1 @@
+mandoc: empty_before.in:2:2: WARNING: skipping paragraph macro: PP empty
diff --git a/regress/man/SH/longarg.in b/regress/man/SH/longarg.in
new file mode 100644
index 00000000..54fa474f
--- /dev/null
+++ b/regress/man/SH/longarg.in
@@ -0,0 +1,9 @@
+.TH SH-LONGARG 1 "April 4, 2015" OpenBSD
+.SH NAME
+SH-longarg \- long section header lines
+.SH
+DESCRIPTION
+initial text
+.SH "This section has a really ridiculously long title\
+ which won't even fit on the line."
+custom section text
diff --git a/regress/man/SH/longarg.out_ascii b/regress/man/SH/longarg.out_ascii
new file mode 100644
index 00000000..cb45e2a3
--- /dev/null
+++ b/regress/man/SH/longarg.out_ascii
@@ -0,0 +1,17 @@
+SH-LONGARG(1) General Commands Manual SH-LONGARG(1)
+
+
+
+NNAAMMEE
+ SH-longarg - long section header lines
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+TThhiiss sseeccttiioonn hhaass aa rreeaallllyy rriiddiiccuulloouussllyy lloonngg ttiittllee wwhhiicchh wwoonn''tt eevveenn ffiitt oonn tthhee
+ lliinnee..
+ custom section text
+
+
+
+OpenBSD April 4, 2015 SH-LONGARG(1)
diff --git a/regress/man/SH/noarg.in b/regress/man/SH/noarg.in
new file mode 100644
index 00000000..58ccac7c
--- /dev/null
+++ b/regress/man/SH/noarg.in
@@ -0,0 +1,42 @@
+.TH SH-NOARG 1 "March 20, 2015" OpenBSD
+.SH NAME
+SH-noarg \- empty header lines
+.SH
+.SH
+DESCRIPTION
+initial text
+.SH
+.SS Subsection
+subsection text
+.SH
+.TP 6n
+tag
+tagged list
+.SH
+.IP tag 6n
+indented list
+.SH
+.HP 6n
+This is a hanged paragraph.
+A bit more text is needed to see the effect.
+.SH
+.PP
+normal paragraph
+.SH
+.RS 6n
+indented paragraph
+.SH
+.RE
+after the end of the indented paragraph
+.SH
+.UR www.openbsd.org
+hyperlink
+.SH
+.UE
+after the end of the hyperlink
+.SH
+.nf
+no-fill mode
+.SH
+.fi
+back in fill mode
diff --git a/regress/man/SH/noarg.out_ascii b/regress/man/SH/noarg.out_ascii
new file mode 100644
index 00000000..bc3490df
--- /dev/null
+++ b/regress/man/SH/noarg.out_ascii
@@ -0,0 +1,32 @@
+SH-NOARG(1) General Commands Manual SH-NOARG(1)
+
+
+
+NNAAMMEE
+ SH-noarg - empty header lines
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ SSuubbsseeccttiioonn
+ subsection text
+
+ tag tagged list
+
+ tag indented list
+
+ This is a hanged paragraph. A bit more text is needed to see the
+ effect.
+
+ normal paragraph
+ indented paragraph
+ after the end of the indented paragraph hyperlink <www.openbsd.org>
+ after the end of the hyperlink
+
+ no-fill mode
+
+ back in fill mode
+
+
+
+OpenBSD March 20, 2015 SH-NOARG(1)
diff --git a/regress/man/SH/noarg.out_lint b/regress/man/SH/noarg.out_lint
new file mode 100644
index 00000000..a1bb39b4
--- /dev/null
+++ b/regress/man/SH/noarg.out_lint
@@ -0,0 +1,13 @@
+mandoc: noarg.in:4:2: WARNING: line scope broken: SH breaks SH
+mandoc: noarg.in:8:2: WARNING: line scope broken: SS breaks SH
+mandoc: noarg.in:11:2: WARNING: line scope broken: TP breaks SH
+mandoc: noarg.in:15:2: WARNING: line scope broken: IP breaks SH
+mandoc: noarg.in:18:2: WARNING: line scope broken: HP breaks SH
+mandoc: noarg.in:22:2: WARNING: line scope broken: PP breaks SH
+mandoc: noarg.in:25:2: WARNING: line scope broken: RS breaks SH
+mandoc: noarg.in:28:2: WARNING: line scope broken: RE breaks SH
+mandoc: noarg.in:29:2: ERROR: skipping end of block that is not open: RE
+mandoc: noarg.in:31:2: WARNING: line scope broken: UR breaks SH
+mandoc: noarg.in:34:2: WARNING: line scope broken: UE breaks SH
+mandoc: noarg.in:35:2: ERROR: skipping end of block that is not open: UE
+mandoc: noarg.in:41:2: WARNING: fill mode already enabled, skipping: fi
diff --git a/regress/man/SS/Makefile b/regress/man/SS/Makefile
new file mode 100644
index 00000000..e76a4ee9
--- /dev/null
+++ b/regress/man/SS/Makefile
@@ -0,0 +1,16 @@
+# $OpenBSD: Makefile,v 1.2 2015/04/04 18:52:12 schwarze Exp $
+
+REGRESS_TARGETS = broken broken_eline longarg noarg
+LINT_TARGETS = broken broken_eline noarg
+
+# groff-1.22.3 defects:
+# - .SS without args just before EOF causes two additional blank lines.
+# - Empty .SS heads cause additional vertical spacing.
+# - If .TP or .IP breaks .SS, the tag becomes bold.
+# - If .HP breaks .SS, a line is broken after the next input line.
+# - If .RS/RE/nf/fi breaks .SS, the next input line becomes bold.
+# - .UR does not break .SS.
+
+SKIP_GROFF = broken broken_eline noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/man/SS/broken.in b/regress/man/SS/broken.in
new file mode 100644
index 00000000..784d2c46
--- /dev/null
+++ b/regress/man/SS/broken.in
@@ -0,0 +1,6 @@
+.TH SS-BROKEN 1 "July 30, 2014" OpenBSD
+.SH NAME
+SS-broken \- section header line scope broken by end of file
+.SH DESCRIPTION
+some text
+.SS
diff --git a/regress/man/SS/broken.out_ascii b/regress/man/SS/broken.out_ascii
new file mode 100644
index 00000000..948c0a93
--- /dev/null
+++ b/regress/man/SS/broken.out_ascii
@@ -0,0 +1,13 @@
+SS-BROKEN(1) General Commands Manual SS-BROKEN(1)
+
+
+
+NNAAMMEE
+ SS-broken - section header line scope broken by end of file
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+OpenBSD July 30, 2014 SS-BROKEN(1)
diff --git a/regress/man/SS/broken.out_lint b/regress/man/SS/broken.out_lint
new file mode 100644
index 00000000..b3f7aea0
--- /dev/null
+++ b/regress/man/SS/broken.out_lint
@@ -0,0 +1 @@
+mandoc: broken.in:6:2: WARNING: line scope broken: EOF breaks SS
diff --git a/regress/man/SS/broken_eline.in b/regress/man/SS/broken_eline.in
new file mode 100644
index 00000000..d5ba6324
--- /dev/null
+++ b/regress/man/SS/broken_eline.in
@@ -0,0 +1,7 @@
+.TH SS-BROKEN_ELINE 1 "July 30, 2014" OpenBSD
+.SH NAME
+SS-broken_eline \- subsection and element line scope broken by eof
+.SH DESCRIPTION
+some text
+.SS
+.B
diff --git a/regress/man/SS/broken_eline.out_ascii b/regress/man/SS/broken_eline.out_ascii
new file mode 100644
index 00000000..79528f45
--- /dev/null
+++ b/regress/man/SS/broken_eline.out_ascii
@@ -0,0 +1,13 @@
+SS-BROKEN_ELINE(1) General Commands Manual SS-BROKEN_ELINE(1)
+
+
+
+NNAAMMEE
+ SS-broken_eline - subsection and element line scope broken by eof
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+OpenBSD July 30, 2014 SS-BROKEN_ELINE(1)
diff --git a/regress/man/SS/broken_eline.out_lint b/regress/man/SS/broken_eline.out_lint
new file mode 100644
index 00000000..1128b738
--- /dev/null
+++ b/regress/man/SS/broken_eline.out_lint
@@ -0,0 +1,2 @@
+mandoc: broken_eline.in:7:2: WARNING: line scope broken: EOF breaks B
+mandoc: broken_eline.in:6:2: WARNING: line scope broken: EOF breaks SS
diff --git a/regress/man/SS/longarg.in b/regress/man/SS/longarg.in
new file mode 100644
index 00000000..ba218e4d
--- /dev/null
+++ b/regress/man/SS/longarg.in
@@ -0,0 +1,9 @@
+.TH SS-LONGARG 1 "April 4, 2015" OpenBSD
+.SH NAME
+SS-longarg \- long subsection header lines
+.SH
+DESCRIPTION
+initial text
+.SS
+This subsection has a ridiculously long title which won't even fit on the line.
+subsection text
diff --git a/regress/man/SS/longarg.out_ascii b/regress/man/SS/longarg.out_ascii
new file mode 100644
index 00000000..0f4a2cb6
--- /dev/null
+++ b/regress/man/SS/longarg.out_ascii
@@ -0,0 +1,17 @@
+SS-LONGARG(1) General Commands Manual SS-LONGARG(1)
+
+
+
+NNAAMMEE
+ SS-longarg - long subsection header lines
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ TThhiiss ssuubbsseeccttiioonn hhaass aa rriiddiiccuulloouussllyy lloonngg ttiittllee wwhhiicchh wwoonn''tt eevveenn ffiitt oonn tthhee
+ lliinnee..
+ subsection text
+
+
+
+OpenBSD April 4, 2015 SS-LONGARG(1)
diff --git a/regress/man/SS/noarg.in b/regress/man/SS/noarg.in
new file mode 100644
index 00000000..85470b01
--- /dev/null
+++ b/regress/man/SS/noarg.in
@@ -0,0 +1,42 @@
+.TH SS-NOARG 1 "March 20, 2015" OpenBSD
+.SH NAME
+SS-noarg \- empty subsection header lines
+.SS
+.SH
+DESCRIPTION
+initial text
+.SS
+.SS Subsection
+subsection text
+.SS
+.TP 6n
+tag
+tagged list
+.SS
+.IP tag 6n
+indented list
+.SS
+.HP 6n
+This is a hanged paragraph.
+A bit more text is needed to see the effect.
+.SS
+.PP
+normal paragraph
+.SS
+.RS 6n
+indented paragraph
+.SS
+.RE
+after the end of the indented paragraph
+.SS
+.UR www.openbsd.org
+hyperlink
+.SS
+.UE
+after the end of the hyperlink
+.SS
+.nf
+no-fill mode
+.SS
+.fi
+back in fill mode
diff --git a/regress/man/SS/noarg.out_ascii b/regress/man/SS/noarg.out_ascii
new file mode 100644
index 00000000..60fd85ff
--- /dev/null
+++ b/regress/man/SS/noarg.out_ascii
@@ -0,0 +1,32 @@
+SS-NOARG(1) General Commands Manual SS-NOARG(1)
+
+
+
+NNAAMMEE
+ SS-noarg - empty subsection header lines
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ SSuubbsseeccttiioonn
+ subsection text
+
+ tag tagged list
+
+ tag indented list
+
+ This is a hanged paragraph. A bit more text is needed to see the
+ effect.
+
+ normal paragraph
+ indented paragraph
+ after the end of the indented paragraph hyperlink <www.openbsd.org>
+ after the end of the hyperlink
+
+ no-fill mode
+
+ back in fill mode
+
+
+
+OpenBSD March 20, 2015 SS-NOARG(1)
diff --git a/regress/man/SS/noarg.out_lint b/regress/man/SS/noarg.out_lint
new file mode 100644
index 00000000..17151792
--- /dev/null
+++ b/regress/man/SS/noarg.out_lint
@@ -0,0 +1,13 @@
+mandoc: noarg.in:4:2: WARNING: line scope broken: SH breaks SS
+mandoc: noarg.in:8:2: WARNING: line scope broken: SS breaks SS
+mandoc: noarg.in:11:2: WARNING: line scope broken: TP breaks SS
+mandoc: noarg.in:15:2: WARNING: line scope broken: IP breaks SS
+mandoc: noarg.in:18:2: WARNING: line scope broken: HP breaks SS
+mandoc: noarg.in:22:2: WARNING: line scope broken: PP breaks SS
+mandoc: noarg.in:25:2: WARNING: line scope broken: RS breaks SS
+mandoc: noarg.in:28:2: WARNING: line scope broken: RE breaks SS
+mandoc: noarg.in:29:2: ERROR: skipping end of block that is not open: RE
+mandoc: noarg.in:31:2: WARNING: line scope broken: UR breaks SS
+mandoc: noarg.in:34:2: WARNING: line scope broken: UE breaks SS
+mandoc: noarg.in:35:2: ERROR: skipping end of block that is not open: UE
+mandoc: noarg.in:41:2: WARNING: fill mode already enabled, skipping: fi
diff --git a/regress/man/TH/Makefile b/regress/man/TH/Makefile
new file mode 100644
index 00000000..b1647349
--- /dev/null
+++ b/regress/man/TH/Makefile
@@ -0,0 +1,13 @@
+# $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 sixargs case
+LINT_TARGETS += emptydate baddate longdate nobody
+
+SKIP_GROFF = noTH longtit longvol longdate
+SKIP_ASCII = noTH
+
+.include <bsd.regress.mk>
diff --git a/regress/man/TH/baddate.in b/regress/man/TH/baddate.in
new file mode 100644
index 00000000..c8819696
--- /dev/null
+++ b/regress/man/TH/baddate.in
@@ -0,0 +1,5 @@
+.TH TH-BADDATE 1 "three bad words" source
+.SH NAME
+TH-baddate \- the date has three words, but bad ones
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/baddate.out_ascii b/regress/man/TH/baddate.out_ascii
new file mode 100644
index 00000000..5c14639b
--- /dev/null
+++ b/regress/man/TH/baddate.out_ascii
@@ -0,0 +1,13 @@
+TH-BADDATE(1) General Commands Manual TH-BADDATE(1)
+
+
+
+NNAAMMEE
+ TH-baddate - the date has three words, but bad ones
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source three bad words TH-BADDATE(1)
diff --git a/regress/man/TH/baddate.out_lint b/regress/man/TH/baddate.out_lint
new file mode 100644
index 00000000..57f24404
--- /dev/null
+++ b/regress/man/TH/baddate.out_lint
@@ -0,0 +1 @@
+mandoc: baddate.in:1:18: WARNING: cannot parse date, using it verbatim: three bad words
diff --git a/regress/man/TH/case.in b/regress/man/TH/case.in
new file mode 100644
index 00000000..74954de4
--- /dev/null
+++ b/regress/man/TH/case.in
@@ -0,0 +1,5 @@
+.TH TH-case 1 "June 13, 2014" OpenBSD
+.SH NAME
+TH-case \- document title is not all caps
+.SH DESCRIPTION
+some text
diff --git a/regress/man/TH/case.out_ascii b/regress/man/TH/case.out_ascii
new file mode 100644
index 00000000..1a8b59be
--- /dev/null
+++ b/regress/man/TH/case.out_ascii
@@ -0,0 +1,13 @@
+TH-case(1) General Commands Manual TH-case(1)
+
+
+
+NNAAMMEE
+ TH-case - document title is not all caps
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+OpenBSD June 13, 2014 TH-case(1)
diff --git a/regress/man/TH/case.out_lint b/regress/man/TH/case.out_lint
new file mode 100644
index 00000000..b154fc16
--- /dev/null
+++ b/regress/man/TH/case.out_lint
@@ -0,0 +1 @@
+mandoc: case.in:1:8: WARNING: lower case character in document title: TH TH-case
diff --git a/regress/man/TH/emptydate.in b/regress/man/TH/emptydate.in
new file mode 100644
index 00000000..da4b7950
--- /dev/null
+++ b/regress/man/TH/emptydate.in
@@ -0,0 +1,5 @@
+.TH TH-EMPTYDATE 1 "" source
+.SH NAME
+TH-emptydate \- an empty date string
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/emptydate.out_ascii b/regress/man/TH/emptydate.out_ascii
new file mode 100644
index 00000000..4eb1775d
--- /dev/null
+++ b/regress/man/TH/emptydate.out_ascii
@@ -0,0 +1,13 @@
+TH-EMPTYDATE(1) General Commands Manual TH-EMPTYDATE(1)
+
+
+
+NNAAMMEE
+ TH-emptydate - an empty date string
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source TH-EMPTYDATE(1)
diff --git a/regress/man/TH/emptydate.out_lint b/regress/man/TH/emptydate.out_lint
new file mode 100644
index 00000000..757fda6c
--- /dev/null
+++ b/regress/man/TH/emptydate.out_lint
@@ -0,0 +1 @@
+mandoc: emptydate.in:1:20: WARNING: missing date, using today's date: TH
diff --git a/regress/man/TH/isodate.in b/regress/man/TH/isodate.in
new file mode 100644
index 00000000..ff483ff8
--- /dev/null
+++ b/regress/man/TH/isodate.in
@@ -0,0 +1,5 @@
+.TH TH-ISODATE 1 "2011-07-02" source
+.SH NAME
+TH-isodate \- ISO date format
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/isodate.out_ascii b/regress/man/TH/isodate.out_ascii
new file mode 100644
index 00000000..b3ee850b
--- /dev/null
+++ b/regress/man/TH/isodate.out_ascii
@@ -0,0 +1,13 @@
+TH-ISODATE(1) General Commands Manual TH-ISODATE(1)
+
+
+
+NNAAMMEE
+ TH-isodate - ISO date format
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source 2011-07-02 TH-ISODATE(1)
diff --git a/regress/man/TH/longdate.in b/regress/man/TH/longdate.in
new file mode 100644
index 00000000..263df782
--- /dev/null
+++ b/regress/man/TH/longdate.in
@@ -0,0 +1,5 @@
+.TH TH-LONGDATE 1 "1234567890123456789012345678901234567890123456789012345678901234567890123456789012" source
+.SH NAME
+TH-longdate \- the date is longer than the line length
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/longdate.out_ascii b/regress/man/TH/longdate.out_ascii
new file mode 100644
index 00000000..4578834b
--- /dev/null
+++ b/regress/man/TH/longdate.out_ascii
@@ -0,0 +1,15 @@
+TH-LONGDATE(1) General Commands Manual TH-LONGDATE(1)
+
+
+
+NNAAMMEE
+ TH-longdate - the date is longer than the line length
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012
+ TH-LONGDATE(1)
diff --git a/regress/man/TH/longdate.out_lint b/regress/man/TH/longdate.out_lint
new file mode 100644
index 00000000..87add528
--- /dev/null
+++ b/regress/man/TH/longdate.out_lint
@@ -0,0 +1 @@
+mandoc: longdate.in:1:19: WARNING: cannot parse date, using it verbatim: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012
diff --git a/regress/man/TH/longtit.in b/regress/man/TH/longtit.in
new file mode 100644
index 00000000..f0b66b97
--- /dev/null
+++ b/regress/man/TH/longtit.in
@@ -0,0 +1,5 @@
+.TH TH-LONGTIT-23456789012345678901234567890123456789012345678901234567890123456789 1 "November 20, 2014" source
+.SH NAME
+TH-longtit \- the title is longer than the line length
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/longtit.out_ascii b/regress/man/TH/longtit.out_ascii
new file mode 100644
index 00000000..00dbe254
--- /dev/null
+++ b/regress/man/TH/longtit.out_ascii
@@ -0,0 +1,15 @@
+TH-LONGTIT-23456789012345678901234567890123456789012345678901234567890123456789(1)
+ General Commands Manual
+
+
+
+NNAAMMEE
+ TH-longtit - the title is longer than the line length
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source November 20, 2014
+TH-LONGTIT-23456789012345678901234567890123456789012345678901234567890123456789(1)
diff --git a/regress/man/TH/longvol.in b/regress/man/TH/longvol.in
new file mode 100644
index 00000000..2b6d0f1f
--- /dev/null
+++ b/regress/man/TH/longvol.in
@@ -0,0 +1,5 @@
+.TH TH-LONGVOL 1 "November 20, 2014" source 1234567890123456789012345678901234567890123456789012345678901234567890123456789
+.SH NAME
+TH-longvol \- the volume string is longer than the line length
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/longvol.out_ascii b/regress/man/TH/longvol.out_ascii
new file mode 100644
index 00000000..bdc881a8
--- /dev/null
+++ b/regress/man/TH/longvol.out_ascii
@@ -0,0 +1,14 @@
+TH-LONGVOL(1)
+1234567890123456789012345678901234567890123456789012345678901234567890123456789
+
+
+
+NNAAMMEE
+ TH-longvol - the volume string is longer than the line length
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source November 20, 2014 TH-LONGVOL(1)
diff --git a/regress/man/TH/mdocdate.in b/regress/man/TH/mdocdate.in
new file mode 100644
index 00000000..1def0a1c
--- /dev/null
+++ b/regress/man/TH/mdocdate.in
@@ -0,0 +1,5 @@
+.TH TH-MDOCDATE 1 "July 2, 2011" source
+.SH NAME
+TH-mdocdate \- standard mdoc(7) date format
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/mdocdate.out_ascii b/regress/man/TH/mdocdate.out_ascii
new file mode 100644
index 00000000..538c4fca
--- /dev/null
+++ b/regress/man/TH/mdocdate.out_ascii
@@ -0,0 +1,13 @@
+TH-MDOCDATE(1) General Commands Manual TH-MDOCDATE(1)
+
+
+
+NNAAMMEE
+ TH-mdocdate - standard mdoc(7) date format
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source July 2, 2011 TH-MDOCDATE(1)
diff --git a/regress/man/TH/noTH.in b/regress/man/TH/noTH.in
new file mode 100644
index 00000000..1b1d9a69
--- /dev/null
+++ b/regress/man/TH/noTH.in
@@ -0,0 +1,4 @@
+.SH NAME
+TH-noTH \- TH macro missing
+.SH DESCRIPTION
+some text
diff --git a/regress/man/TH/noTH.out_lint b/regress/man/TH/noTH.out_lint
new file mode 100644
index 00000000..01b7b045
--- /dev/null
+++ b/regress/man/TH/noTH.out_lint
@@ -0,0 +1,2 @@
+mandoc: noTH.in: WARNING: missing manual title, using ""
+mandoc: noTH.in: WARNING: missing date, using today's date
diff --git a/regress/man/TH/noarg.in b/regress/man/TH/noarg.in
new file mode 100644
index 00000000..3c15e942
--- /dev/null
+++ b/regress/man/TH/noarg.in
@@ -0,0 +1,5 @@
+.TH
+.SH NAME
+TH-noarg \- no arguments to the TH macro
+.SH DESCRIPTION
+some text
diff --git a/regress/man/TH/noarg.out_ascii b/regress/man/TH/noarg.out_ascii
new file mode 100644
index 00000000..2857a908
--- /dev/null
+++ b/regress/man/TH/noarg.out_ascii
@@ -0,0 +1,13 @@
+() ()
+
+
+
+NNAAMMEE
+ TH-noarg - no arguments to the TH macro
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+ ()
diff --git a/regress/man/TH/noarg.out_lint b/regress/man/TH/noarg.out_lint
new file mode 100644
index 00000000..aa0b4eb0
--- /dev/null
+++ b/regress/man/TH/noarg.out_lint
@@ -0,0 +1,3 @@
+mandoc: noarg.in:1:2: WARNING: missing manual title, using "": TH
+mandoc: noarg.in:1:2: WARNING: missing manual section, using "": TH
+mandoc: noarg.in:1:2: WARNING: missing date, using today's date: TH
diff --git a/regress/man/TH/nobody.in b/regress/man/TH/nobody.in
new file mode 100644
index 00000000..ab1a47b3
--- /dev/null
+++ b/regress/man/TH/nobody.in
@@ -0,0 +1 @@
+.TH TH-NOBODY 1 "June 20, 2014" OpenBSD
diff --git a/regress/man/TH/nobody.out_ascii b/regress/man/TH/nobody.out_ascii
new file mode 100644
index 00000000..c9f369d4
--- /dev/null
+++ b/regress/man/TH/nobody.out_ascii
@@ -0,0 +1,5 @@
+TH-NOBODY(1) General Commands Manual TH-NOBODY(1)
+
+
+
+OpenBSD June 20, 2014 TH-NOBODY(1)
diff --git a/regress/man/TH/nobody.out_lint b/regress/man/TH/nobody.out_lint
new file mode 100644
index 00000000..f5439fcd
--- /dev/null
+++ b/regress/man/TH/nobody.out_lint
@@ -0,0 +1 @@
+mandoc: nobody.in: WARNING: no document body
diff --git a/regress/man/TH/onearg.in b/regress/man/TH/onearg.in
new file mode 100644
index 00000000..fe77903e
--- /dev/null
+++ b/regress/man/TH/onearg.in
@@ -0,0 +1,5 @@
+.TH TH-ONEARG
+.SH NAME
+TH-onearg \- only one argument to the TH macro
+.SH DESCRIPTION
+some text
diff --git a/regress/man/TH/onearg.out_ascii b/regress/man/TH/onearg.out_ascii
new file mode 100644
index 00000000..08fb66af
--- /dev/null
+++ b/regress/man/TH/onearg.out_ascii
@@ -0,0 +1,13 @@
+TH-ONEARG() TH-ONEARG()
+
+
+
+NNAAMMEE
+ TH-onearg - only one argument to the TH macro
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+ TH-ONEARG()
diff --git a/regress/man/TH/onearg.out_lint b/regress/man/TH/onearg.out_lint
new file mode 100644
index 00000000..e24e90f4
--- /dev/null
+++ b/regress/man/TH/onearg.out_lint
@@ -0,0 +1,2 @@
+mandoc: onearg.in:1:2: WARNING: missing manual section, using "": TH TH-ONEARG
+mandoc: onearg.in:1:2: WARNING: missing date, using today's date: TH
diff --git a/regress/man/TH/onlyyear.in b/regress/man/TH/onlyyear.in
new file mode 100644
index 00000000..1762438f
--- /dev/null
+++ b/regress/man/TH/onlyyear.in
@@ -0,0 +1,5 @@
+.TH TH-ONLYYEAR 1 2011 source
+.SH NAME
+TH-onlyyear \- the date has only a year
+.SH DESCRIPTION
+Some text.
diff --git a/regress/man/TH/onlyyear.out_ascii b/regress/man/TH/onlyyear.out_ascii
new file mode 100644
index 00000000..7b210a12
--- /dev/null
+++ b/regress/man/TH/onlyyear.out_ascii
@@ -0,0 +1,13 @@
+TH-ONLYYEAR(1) General Commands Manual TH-ONLYYEAR(1)
+
+
+
+NNAAMMEE
+ TH-onlyyear - the date has only a year
+
+DDEESSCCRRIIPPTTIIOONN
+ Some text.
+
+
+
+source 2011 TH-ONLYYEAR(1)
diff --git a/regress/man/TH/sixargs.in b/regress/man/TH/sixargs.in
new file mode 100644
index 00000000..5594818e
--- /dev/null
+++ b/regress/man/TH/sixargs.in
@@ -0,0 +1,5 @@
+.TH TH-SIXARGS 1 "January 16, 2011" OpenBSD regress SIX
+.SH NAME
+TH-sixargs \- six arguments to the TH macro
+.SH DESCRIPTION
+some text
diff --git a/regress/man/TH/sixargs.out_ascii b/regress/man/TH/sixargs.out_ascii
new file mode 100644
index 00000000..3e02362e
--- /dev/null
+++ b/regress/man/TH/sixargs.out_ascii
@@ -0,0 +1,13 @@
+TH-SIXARGS(1) regress TH-SIXARGS(1)
+
+
+
+NNAAMMEE
+ TH-sixargs - six arguments to the TH macro
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+OpenBSD January 16, 2011 TH-SIXARGS(1)
diff --git a/regress/man/TH/sixargs.out_lint b/regress/man/TH/sixargs.out_lint
new file mode 100644
index 00000000..9ac7a838
--- /dev/null
+++ b/regress/man/TH/sixargs.out_lint
@@ -0,0 +1 @@
+mandoc: sixargs.in:1:53: ERROR: skipping excess arguments: TH ... SIX
diff --git a/regress/man/TH/twoargs.in b/regress/man/TH/twoargs.in
new file mode 100644
index 00000000..6048321a
--- /dev/null
+++ b/regress/man/TH/twoargs.in
@@ -0,0 +1,5 @@
+.TH TH-TWOARGS
+.SH NAME
+TH-twoargs \- only two arguments to the TH macro
+.SH DESCRIPTION
+some text
diff --git a/regress/man/TH/twoargs.out_ascii b/regress/man/TH/twoargs.out_ascii
new file mode 100644
index 00000000..b05312fd
--- /dev/null
+++ b/regress/man/TH/twoargs.out_ascii
@@ -0,0 +1,13 @@
+TH-TWOARGS() TH-TWOARGS()
+
+
+
+NNAAMMEE
+ TH-twoargs - only two arguments to the TH macro
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+
+
+ TH-TWOARGS()
diff --git a/regress/man/TH/twoargs.out_lint b/regress/man/TH/twoargs.out_lint
new file mode 100644
index 00000000..ce7c74eb
--- /dev/null
+++ b/regress/man/TH/twoargs.out_lint
@@ -0,0 +1,2 @@
+mandoc: twoargs.in:1:2: WARNING: missing manual section, using "": TH TH-TWOARGS
+mandoc: twoargs.in:1:2: WARNING: missing date, using today's date: TH
diff --git a/regress/man/TP/Makefile b/regress/man/TP/Makefile
new file mode 100644
index 00000000..b867ba63
--- /dev/null
+++ b/regress/man/TP/Makefile
@@ -0,0 +1,14 @@
+# $OpenBSD: Makefile,v 1.12 2015/09/21 13:24:32 schwarze Exp $
+
+REGRESS_TARGETS = badarg broken double eof fill literal longhead
+REGRESS_TARGETS += macrotag manyargs sameline spacing width
+
+LINT_TARGETS = broken double eof
+
+# groff-1.22.3 defects:
+# - If .TP precedes .RE, the latter does not properly reset indentation.
+# - If the last line of the file is .TP, groff does not print a page footer.
+
+SKIP_GROFF = broken eof
+
+.include <bsd.regress.mk>
diff --git a/regress/man/TP/badarg.in b/regress/man/TP/badarg.in
new file mode 100644
index 00000000..d40759e2
--- /dev/null
+++ b/regress/man/TP/badarg.in
@@ -0,0 +1,20 @@
+.TH TP-BADARG 1 "November 18, 2012" OpenBSD
+.SH NAME
+TP-badarg \- invalid width specification for tagged paragraph
+.SH DESCRIPTION
+Non-numeric width specifications are ignored:
+.TP x
+tag
+indented
+.br
+text
+.TP xxxxx
+tag
+indented
+.br
+text
+.TP xxxxxxxxxx
+tag
+indented
+.br
+text
diff --git a/regress/man/TP/badarg.out_ascii b/regress/man/TP/badarg.out_ascii
new file mode 100644
index 00000000..f5b0a15a
--- /dev/null
+++ b/regress/man/TP/badarg.out_ascii
@@ -0,0 +1,22 @@
+TP-BADARG(1) General Commands Manual TP-BADARG(1)
+
+
+
+NNAAMMEE
+ TP-badarg - invalid width specification for tagged paragraph
+
+DDEESSCCRRIIPPTTIIOONN
+ Non-numeric width specifications are ignored:
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+
+
+OpenBSD November 18, 2012 TP-BADARG(1)
diff --git a/regress/man/TP/broken.in b/regress/man/TP/broken.in
new file mode 100644
index 00000000..c111caeb
--- /dev/null
+++ b/regress/man/TP/broken.in
@@ -0,0 +1,13 @@
+.TH TP-BROKEN 1 "December 16, 2014" OpenBSD
+.SH NAME
+TP-broken \- broken tagged paragraph
+.SH DESCRIPTION
+regular
+text
+.RS 4n
+indented
+text
+.TP
+.RE
+regular
+text
diff --git a/regress/man/TP/broken.out_ascii b/regress/man/TP/broken.out_ascii
new file mode 100644
index 00000000..e19efdf0
--- /dev/null
+++ b/regress/man/TP/broken.out_ascii
@@ -0,0 +1,15 @@
+TP-BROKEN(1) General Commands Manual TP-BROKEN(1)
+
+
+
+NNAAMMEE
+ TP-broken - broken tagged paragraph
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ indented text
+ regular text
+
+
+
+OpenBSD December 16, 2014 TP-BROKEN(1)
diff --git a/regress/man/TP/broken.out_lint b/regress/man/TP/broken.out_lint
new file mode 100644
index 00000000..3a1024fc
--- /dev/null
+++ b/regress/man/TP/broken.out_lint
@@ -0,0 +1 @@
+mandoc: broken.in:10:2: WARNING: line scope broken: RE breaks TP
diff --git a/regress/man/TP/double.in b/regress/man/TP/double.in
new file mode 100644
index 00000000..4a6b1674
--- /dev/null
+++ b/regress/man/TP/double.in
@@ -0,0 +1,40 @@
+.TH TP-DOUBLE 1 2013-06-23 OpenBSD
+.SH NAME
+TP-double \- effect of double tagged paragraph
+.SH DESCRIPTION
+leading text:
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
+.TP 16n
+first TP
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
+.TP 16n
+second TP
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
+.PP
+normal paragraph:
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
+.PP
+.TP 16n
+.TP 16n
+double TP
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
+.PP
+normal paragraph:
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
+.B
+.PP
+.TP 16n
+.TP 16n
+double TP
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
+.PP
+normal paragraph:
+This is a rather long text because we want to test the text width;
+at which point will this text wrap to the next line?
diff --git a/regress/man/TP/double.out_ascii b/regress/man/TP/double.out_ascii
new file mode 100644
index 00000000..63c5e9db
--- /dev/null
+++ b/regress/man/TP/double.out_ascii
@@ -0,0 +1,39 @@
+TP-DOUBLE(1) General Commands Manual TP-DOUBLE(1)
+
+
+
+NNAAMMEE
+ TP-double - effect of double tagged paragraph
+
+DDEESSCCRRIIPPTTIIOONN
+ leading text: This is a rather long text because we want to test the
+ text width; at which point will this text wrap to the next line?
+
+ first TP This is a rather long text because we want to test the
+ text width; at which point will this text wrap to the
+ next line?
+
+ second TP This is a rather long text because we want to test the
+ text width; at which point will this text wrap to the
+ next line?
+
+ normal paragraph: This is a rather long text because we want to test
+ the text width; at which point will this text wrap to the next line?
+
+ double TP This is a rather long text because we want to test the
+ text width; at which point will this text wrap to the
+ next line?
+
+ normal paragraph: This is a rather long text because we want to test
+ the text width; at which point will this text wrap to the next line?
+
+ double TP This is a rather long text because we want to test the
+ text width; at which point will this text wrap to the
+ next line?
+
+ normal paragraph: This is a rather long text because we want to test
+ the text width; at which point will this text wrap to the next line?
+
+
+
+OpenBSD 2013-06-23 TP-DOUBLE(1)
diff --git a/regress/man/TP/double.out_lint b/regress/man/TP/double.out_lint
new file mode 100644
index 00000000..0ec1aa87
--- /dev/null
+++ b/regress/man/TP/double.out_lint
@@ -0,0 +1,5 @@
+mandoc: double.in:21:2: WARNING: line scope broken: TP breaks TP
+mandoc: double.in:30:2: WARNING: line scope broken: PP breaks B
+mandoc: double.in:32:2: WARNING: line scope broken: TP breaks TP
+mandoc: double.in:20:2: WARNING: skipping paragraph macro: PP empty
+mandoc: double.in:31:2: WARNING: skipping paragraph macro: PP empty
diff --git a/regress/man/TP/eof.in b/regress/man/TP/eof.in
new file mode 100644
index 00000000..7ab9a100
--- /dev/null
+++ b/regress/man/TP/eof.in
@@ -0,0 +1,6 @@
+.TH TP-EOF 1 "July 7, 2014" OpenBSD
+.SH NAME
+TP-eof \- indented paragraph macro at the end of the file
+.SH DESCRIPTION
+The last line of the file is TP:
+.TP
diff --git a/regress/man/TP/eof.out_ascii b/regress/man/TP/eof.out_ascii
new file mode 100644
index 00000000..30e2cb76
--- /dev/null
+++ b/regress/man/TP/eof.out_ascii
@@ -0,0 +1,13 @@
+TP-EOF(1) General Commands Manual TP-EOF(1)
+
+
+
+NNAAMMEE
+ TP-eof - indented paragraph macro at the end of the file
+
+DDEESSCCRRIIPPTTIIOONN
+ The last line of the file is TP:
+
+
+
+OpenBSD July 7, 2014 TP-EOF(1)
diff --git a/regress/man/TP/eof.out_lint b/regress/man/TP/eof.out_lint
new file mode 100644
index 00000000..62d6ff86
--- /dev/null
+++ b/regress/man/TP/eof.out_lint
@@ -0,0 +1 @@
+mandoc: eof.in:6:2: WARNING: line scope broken: EOF breaks TP
diff --git a/regress/man/TP/fill.in b/regress/man/TP/fill.in
new file mode 100644
index 00000000..642c4e5a
--- /dev/null
+++ b/regress/man/TP/fill.in
@@ -0,0 +1,16 @@
+.TH TP-FILL 1 "September 4, 2015" OpenBSD
+.SH NAME
+TP-fill \- interaction of tagged paragraphs and fill mode
+.SH DESCRIPTION
+Switching off fill mode:
+.TP
+.nf
+tag
+indented
+text
+Switching it back on:
+.fi
+.TP
+This is an extremely long tag that will certainly wrap the line and continue onto the next one.
+indented
+text
diff --git a/regress/man/TP/fill.out_ascii b/regress/man/TP/fill.out_ascii
new file mode 100644
index 00000000..6af000b3
--- /dev/null
+++ b/regress/man/TP/fill.out_ascii
@@ -0,0 +1,21 @@
+TP-FILL(1) General Commands Manual TP-FILL(1)
+
+
+
+NNAAMMEE
+ TP-fill - interaction of tagged paragraphs and fill mode
+
+DDEESSCCRRIIPPTTIIOONN
+ Switching off fill mode:
+
+ tag indented
+ text
+ Switching it back on:
+
+ This is an extremely long tag that will certainly wrap the line and
+ continue onto the next one.
+ indented text
+
+
+
+OpenBSD September 4, 2015 TP-FILL(1)
diff --git a/regress/man/TP/literal.in b/regress/man/TP/literal.in
new file mode 100644
index 00000000..ca86df57
--- /dev/null
+++ b/regress/man/TP/literal.in
@@ -0,0 +1,26 @@
+.TH TP-LITERAL 1 "January 4, 2011" OpenBSD
+.SH NAME
+TP-literal \- indented paragraphs in literal context
+.SH DESCRIPTION
+regular
+text
+.TP 10n
+tag
+indented
+text
+.PP
+regular
+text
+.nf
+literal
+text
+.TP 10n
+tag
+indented
+text
+.PP
+literal
+text
+.fi
+regular
+text
diff --git a/regress/man/TP/literal.out_ascii b/regress/man/TP/literal.out_ascii
new file mode 100644
index 00000000..b8dddb7b
--- /dev/null
+++ b/regress/man/TP/literal.out_ascii
@@ -0,0 +1,26 @@
+TP-LITERAL(1) General Commands Manual TP-LITERAL(1)
+
+
+
+NNAAMMEE
+ TP-literal - indented paragraphs in literal context
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag indented text
+
+ regular text
+ literal
+ text
+
+ tag indented
+ text
+
+ literal
+ text
+ regular text
+
+
+
+OpenBSD January 4, 2011 TP-LITERAL(1)
diff --git a/regress/man/TP/longhead.in b/regress/man/TP/longhead.in
new file mode 100644
index 00000000..2fab0df4
--- /dev/null
+++ b/regress/man/TP/longhead.in
@@ -0,0 +1,11 @@
+.TH TP-LONGHEAD 1 "April 8, 2014" OpenBSD
+.SH NAME
+TP-longhead \- tagged paragraph with a long head
+.SH DESCRIPTION
+normal text
+.TP 6n
+.B "This tagged paragraph has ridiculously long text \
+in its head, such that it doesn't even fit on the line"
+paragraph body
+.PP
+normal text
diff --git a/regress/man/TP/longhead.out_ascii b/regress/man/TP/longhead.out_ascii
new file mode 100644
index 00000000..f0de1ee5
--- /dev/null
+++ b/regress/man/TP/longhead.out_ascii
@@ -0,0 +1,19 @@
+TP-LONGHEAD(1) General Commands Manual TP-LONGHEAD(1)
+
+
+
+NNAAMMEE
+ TP-longhead - tagged paragraph with a long head
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ TThhiiss ttaaggggeedd ppaarraaggrraapphh hhaass rriiddiiccuulloouussllyy lloonngg tteexxtt iinn iittss hheeaadd,, ssuucchh tthhaatt
+ iitt ddooeessnn''tt eevveenn ffiitt oonn tthhee lliinnee
+ paragraph body
+
+ normal text
+
+
+
+OpenBSD April 8, 2014 TP-LONGHEAD(1)
diff --git a/regress/man/TP/macrotag.in b/regress/man/TP/macrotag.in
new file mode 100644
index 00000000..5fbb5914
--- /dev/null
+++ b/regress/man/TP/macrotag.in
@@ -0,0 +1,13 @@
+.TH TP-MACROTAG 1 "September 20, 2011" OpenBSD
+.SH NAME
+TP-macrotag \- macro in the head of a tagged paragraph
+.SH DESCRIPTION
+regular
+text
+.TP
+.B longindent
+indented
+text
+.PP
+regular
+text
diff --git a/regress/man/TP/macrotag.out_ascii b/regress/man/TP/macrotag.out_ascii
new file mode 100644
index 00000000..e466adcf
--- /dev/null
+++ b/regress/man/TP/macrotag.out_ascii
@@ -0,0 +1,18 @@
+TP-MACROTAG(1) General Commands Manual TP-MACROTAG(1)
+
+
+
+NNAAMMEE
+ TP-macrotag - macro in the head of a tagged paragraph
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ lloonnggiinnddeenntt
+ indented text
+
+ regular text
+
+
+
+OpenBSD September 20, 2011 TP-MACROTAG(1)
diff --git a/regress/man/TP/manyargs.in b/regress/man/TP/manyargs.in
new file mode 100644
index 00000000..4270c786
--- /dev/null
+++ b/regress/man/TP/manyargs.in
@@ -0,0 +1,45 @@
+.TH TP-MANYARGS 1 "January 4, 2011" OpenBSD
+.SH NAME
+TP-manyargs \- too many header args for indented blocks
+.SH DESCRIPTION
+regular
+text
+.TP 10n
+tag1
+indented
+text
+.PP
+regular
+text
+.TP 10n tag1
+tag2
+indented
+text
+.PP
+regular
+text
+.TP 10n tag2 tag1
+tag3
+indented
+text
+.nf
+literal
+text
+.TP 10n
+tag1
+indented
+text
+.PP
+literal
+text
+.TP 10n tag1
+tag2
+indented
+text
+.PP
+literal
+text
+.TP 10n tag2 tag1
+tag3
+indented
+text
diff --git a/regress/man/TP/manyargs.out_ascii b/regress/man/TP/manyargs.out_ascii
new file mode 100644
index 00000000..a88b8d5b
--- /dev/null
+++ b/regress/man/TP/manyargs.out_ascii
@@ -0,0 +1,40 @@
+TP-MANYARGS(1) General Commands Manual TP-MANYARGS(1)
+
+
+
+NNAAMMEE
+ TP-manyargs - too many header args for indented blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag1 indented text
+
+ regular text
+
+ tag2 indented text
+
+ regular text
+
+ tag3 indented text
+ literal
+ text
+
+ tag1 indented
+ text
+
+ literal
+ text
+
+ tag2 indented
+ text
+
+ literal
+ text
+
+ tag3 indented
+ text
+
+
+
+OpenBSD January 4, 2011 TP-MANYARGS(1)
diff --git a/regress/man/TP/sameline.in b/regress/man/TP/sameline.in
new file mode 100644
index 00000000..8857b231
--- /dev/null
+++ b/regress/man/TP/sameline.in
@@ -0,0 +1,30 @@
+.TH TP-SAMELINE 1 "March 8, 2014" OpenBSD
+.SH NAME
+TP-sameline \- test sameline logic of indented paragraphs
+.SH DESCRIPTION
+.SS without user-defined macros
+with width:
+.TP 6n
+tag
+text
+.PP
+without width:
+.TP
+20n
+text
+.SS with user-defined macros
+.de mylist
+with width:
+.TP 6n
+tag
+text
+..
+.mylist
+.PP
+.de mylist
+without width:
+.TP
+20n
+text
+..
+.mylist
diff --git a/regress/man/TP/sameline.out_ascii b/regress/man/TP/sameline.out_ascii
new file mode 100644
index 00000000..767f46cc
--- /dev/null
+++ b/regress/man/TP/sameline.out_ascii
@@ -0,0 +1,29 @@
+TP-SAMELINE(1) General Commands Manual TP-SAMELINE(1)
+
+
+
+NNAAMMEE
+ TP-sameline - test sameline logic of indented paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ wwiitthhoouutt uusseerr--ddeeffiinneedd mmaaccrrooss
+ with width:
+
+ tag text
+
+ without width:
+
+ 20n text
+
+ wwiitthh uusseerr--ddeeffiinneedd mmaaccrrooss
+ with width:
+
+ tag text
+
+ without width:
+
+ 20n text
+
+
+
+OpenBSD March 8, 2014 TP-SAMELINE(1)
diff --git a/regress/man/TP/spacing.in b/regress/man/TP/spacing.in
new file mode 100644
index 00000000..71c788aa
--- /dev/null
+++ b/regress/man/TP/spacing.in
@@ -0,0 +1,42 @@
+.TH TP-SPACING 1 "September 21, 2015" OpenBSD
+.SH NAME
+TP-spacing \- spacing in tagged paragraphs
+.SH DESCRIPTION
+Normal text.
+.TP
+tag
+Indented text.
+.TP
+four
+Indented text.
+.TP
+ffive
+Indented text.
+.TP
+sixsix
+Indented text.
+.TP
+seseven
+Indented text.
+.TP
+a much longer tag
+Indented text.
+.LP
+Tags with trailing space:
+.TP
+tag\ \&
+Three plus one makes four.
+.TP
+tag\ \ \&
+Three plus two makes five.
+.TP
+tag\ \ \ \&
+Three plus three makes six.
+.TP
+tag\ \ \ \ \ \&
+Three plus four makes seven.
+.TP
+tag\ \ \ \ \ \ \&
+Three plus five makes eight.
+.LP
+Normal text.
diff --git a/regress/man/TP/spacing.out_ascii b/regress/man/TP/spacing.out_ascii
new file mode 100644
index 00000000..247b25f9
--- /dev/null
+++ b/regress/man/TP/spacing.out_ascii
@@ -0,0 +1,43 @@
+TP-SPACING(1) General Commands Manual TP-SPACING(1)
+
+
+
+NNAAMMEE
+ TP-spacing - spacing in tagged paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ Normal text.
+
+ tag Indented text.
+
+ four Indented text.
+
+ ffive Indented text.
+
+ sixsix Indented text.
+
+ seseven
+ Indented text.
+
+ a much longer tag
+ Indented text.
+
+ Tags with trailing space:
+
+ tag Three plus one makes four.
+
+ tag Three plus two makes five.
+
+ tag Three plus three makes six.
+
+ tag
+ Three plus four makes seven.
+
+ tag
+ Three plus five makes eight.
+
+ Normal text.
+
+
+
+OpenBSD September 21, 2015 TP-SPACING(1)
diff --git a/regress/man/TP/width.in b/regress/man/TP/width.in
new file mode 100644
index 00000000..1ba99e40
--- /dev/null
+++ b/regress/man/TP/width.in
@@ -0,0 +1,89 @@
+.TH TP-WIDTH 1 "December 23, 2014" OpenBSD
+.SH NAME
+TP-width \- indentation width of indented paragraphs
+.SH DESCRIPTION
+Regular mode:
+.TP -10n
+tag
+indented
+.br
+text
+.TP -4n
+tag
+indented
+.br
+text
+.TP 0n
+tag
+indented
+.br
+text
+.TP 1n
+tag
+indented
+.br
+text
+.TP 2n
+tag
+indented
+.br
+text
+.TP 3n
+tag
+indented
+.br
+text
+.TP 4n
+tag
+indented
+.br
+text
+.TP 5n
+tag
+indented
+.br
+text
+.TP 100n
+tag
+indented
+.br
+text
+.PP
+Literal mode:
+.nf
+.TP -10n
+tag
+indented
+text
+.TP -4n
+tag
+indented
+text
+.TP 0n
+tag
+indented
+text
+.TP 1n
+tag
+indented
+text
+.TP 2n
+tag
+indented
+text
+.TP 3n
+tag
+indented
+text
+.TP 4n
+tag
+indented
+text
+.TP 5n
+tag
+indented
+text
+.TP 100n
+tag
+indented
+text
diff --git a/regress/man/TP/width.out_ascii b/regress/man/TP/width.out_ascii
new file mode 100644
index 00000000..fea63883
--- /dev/null
+++ b/regress/man/TP/width.out_ascii
@@ -0,0 +1,81 @@
+TP-WIDTH(1) General Commands Manual TP-WIDTH(1)
+
+
+
+NNAAMMEE
+ TP-width - indentation width of indented paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ Regular mode:
+
+ tag
+indented
+text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ Literal mode:
+
+ tag
+indented
+text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+
+
+OpenBSD December 23, 2014 TP-WIDTH(1)
diff --git a/regress/man/TS/Makefile b/regress/man/TS/Makefile
new file mode 100644
index 00000000..1d20dc84
--- /dev/null
+++ b/regress/man/TS/Makefile
@@ -0,0 +1,22 @@
+# $OpenBSD: Makefile,v 1.3 2015/01/30 21:28:21 schwarze Exp $
+
+REGRESS_TARGETS = break vspace
+LINT_TARGETS = break
+
+# groff-1.22.3 defect:
+# - Starting a table in next-line scope confuses font handling,
+# and in the case of .TP indentation as well.
+
+SKIP_GROFF = break
+
+
+# OpenBSD only: maintainer targets
+
+TBL=/usr/local/bin/tbl
+
+.for t in ${REGRESS_TARGETS}
+${t}.out_ascii: ${t}.in
+ ${TBL} ${.ALLSRC} | ${NROFF} ${NOPTS} -Tascii > ${.TARGET}
+.endfor
+
+.include <bsd.regress.mk>
diff --git a/regress/man/TS/break.in b/regress/man/TS/break.in
new file mode 100644
index 00000000..31dfe631
--- /dev/null
+++ b/regress/man/TS/break.in
@@ -0,0 +1,33 @@
+.TH TBL-BREAK 1 "January 30, 2015" OpenBSD
+.SH NAME
+tbl-break \- tables breaking blocks
+.SH DESCRIPTION
+tagged paragraph:
+.TP 6n
+.TS
+l.
+first line
+second line
+.TE
+section:
+.SH
+.TS
+l.
+first line
+second line
+.TE
+subsection:
+.SS
+.TS
+l.
+first line
+second line
+.TE
+bold:
+.B
+.TS
+l.
+first line
+second line
+.TE
+final text
diff --git a/regress/man/TS/break.out_ascii b/regress/man/TS/break.out_ascii
new file mode 100644
index 00000000..57634e02
--- /dev/null
+++ b/regress/man/TS/break.out_ascii
@@ -0,0 +1,29 @@
+TBL-BREAK(1) General Commands Manual TBL-BREAK(1)
+
+
+
+NNAAMMEE
+ tbl-break - tables breaking blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ tagged paragraph:
+
+ first line
+ second line
+ section:
+
+ first line
+ second line
+ subsection:
+
+ first line
+ second line
+ bold:
+
+ first line
+ second line
+ final text
+
+
+
+OpenBSD January 30, 2015 TBL-BREAK(1)
diff --git a/regress/man/TS/break.out_lint b/regress/man/TS/break.out_lint
new file mode 100644
index 00000000..4bff2ea1
--- /dev/null
+++ b/regress/man/TS/break.out_lint
@@ -0,0 +1,4 @@
+mandoc: break.in:6:2: WARNING: line scope broken: TS breaks TP
+mandoc: break.in:13:2: WARNING: line scope broken: TS breaks SH
+mandoc: break.in:20:2: WARNING: line scope broken: TS breaks SS
+mandoc: break.in:27:2: WARNING: line scope broken: TS breaks B
diff --git a/regress/man/TS/vspace.in b/regress/man/TS/vspace.in
new file mode 100644
index 00000000..c3a2363f
--- /dev/null
+++ b/regress/man/TS/vspace.in
@@ -0,0 +1,48 @@
+.TH TBL-VSPACE 1
+.SH NAME
+tbl-vspace \- vertical spacing around tables
+.SH DESCRIPTION
+normal text before table
+.TS
+L .
+table without box
+.TE
+normal text after table without box
+.TS
+box;
+L .
+table with box
+.TE
+.\" at least one vertical space is required here
+.\" or groff will clobber the box
+.sp 1v
+normal text after table with box
+.TS
+doublebox;
+L .
+table with double box
+.TE
+.\" at least two vertical spaces are required here
+.\" or groff will clobber the box
+.sp 2v
+normal text after table with double box
+.TS
+L .
+table without box
+.TE
+.TS
+box;
+L .
+table with box
+.TE
+.sp 1v
+.TS
+doublebox;
+L .
+table with double box
+.TE
+.sp 2v
+.TS
+L .
+table without box
+.TE
diff --git a/regress/man/TS/vspace.out_ascii b/regress/man/TS/vspace.out_ascii
new file mode 100644
index 00000000..6f2feee1
--- /dev/null
+++ b/regress/man/TS/vspace.out_ascii
@@ -0,0 +1,42 @@
+TBL-VSPACE(1) General Commands Manual TBL-VSPACE(1)
+
+
+
+NNAAMMEE
+ tbl-vspace - vertical spacing around tables
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text before table
+
+ table without box
+ normal text after table without box
+
+ +---------------+
+ |table with box |
+ +---------------+
+ normal text after table with box
+
+ +----------------------+
+ +----------------------+
+ |table with double box |
+ +----------------------+
+ +----------------------+
+ normal text after table with double box
+
+ table without box
+
+ +---------------+
+ |table with box |
+ +---------------+
+
+ +----------------------+
+ +----------------------+
+ |table with double box |
+ +----------------------+
+ +----------------------+
+
+ table without box
+
+
+
+ TBL-VSPACE(1)
diff --git a/regress/man/UR/Makefile b/regress/man/UR/Makefile
new file mode 100644
index 00000000..11cafcdf
--- /dev/null
+++ b/regress/man/UR/Makefile
@@ -0,0 +1,12 @@
+# $OpenBSD: Makefile,v 1.3 2015/02/06 11:54:03 schwarze Exp $
+
+REGRESS_TARGETS = args noUE
+LINT_TARGETS = args noUE
+
+# groff-1.22.3 defects:
+# - Without .UE, .UR does not print the URI.
+# - But .UE prints <> even without .UR.
+
+SKIP_GROFF = noUE
+
+.include <bsd.regress.mk>
diff --git a/regress/man/UR/args.in b/regress/man/UR/args.in
new file mode 100644
index 00000000..f45770b2
--- /dev/null
+++ b/regress/man/UR/args.in
@@ -0,0 +1,29 @@
+.TH UR-ARGS 1 "October 17, 2013" OpenBSD
+.SH NAME
+UR-basic \- argument handling of the man-ext URI macro
+.SH DESCRIPTION
+argument plus text:
+.UR http://www.openbsd.org/
+OpenBSD
+homepage
+.UE
+.PP
+argument but no text:
+.UR http://www.netbsd.org/
+.UE
+.PP
+no argument, but text:
+.UR
+some text
+.UE
+.PP
+two arguments plus text:
+.UR first second
+some text
+.UE
+.PP
+two arguments, but no text:
+.UR first second
+.UE
+.PP
+final text
diff --git a/regress/man/UR/args.out_ascii b/regress/man/UR/args.out_ascii
new file mode 100644
index 00000000..9368974a
--- /dev/null
+++ b/regress/man/UR/args.out_ascii
@@ -0,0 +1,23 @@
+UR-ARGS(1) General Commands Manual UR-ARGS(1)
+
+
+
+NNAAMMEE
+ UR-basic - argument handling of the man-ext URI macro
+
+DDEESSCCRRIIPPTTIIOONN
+ argument plus text: OpenBSD homepage <http://www.openbsd.org/>
+
+ argument but no text: <http://www.netbsd.org/>
+
+ no argument, but text: some text <>
+
+ two arguments plus text: some text <first>
+
+ two arguments, but no text: <first>
+
+ final text
+
+
+
+OpenBSD October 17, 2013 UR-ARGS(1)
diff --git a/regress/man/UR/args.out_lint b/regress/man/UR/args.out_lint
new file mode 100644
index 00000000..3e7ef528
--- /dev/null
+++ b/regress/man/UR/args.out_lint
@@ -0,0 +1,5 @@
+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:12:2: WARNING: empty block: UR
+mandoc: args.in:16:2: WARNING: missing resource identifier, using "": UR
+mandoc: args.in:26:2: WARNING: empty block: UR
diff --git a/regress/man/UR/noUE.in b/regress/man/UR/noUE.in
new file mode 100644
index 00000000..8b6f61dd
--- /dev/null
+++ b/regress/man/UR/noUE.in
@@ -0,0 +1,11 @@
+.TH UR-NOUE 1 "July 7, 2014" OpenBSD
+.SH NAME
+UR-noUE \- unclosed URI macro
+.SH DESCRIPTION
+lonely UE:
+.UE
+.PP
+argument plus text:
+.UR http://www.openbsd.org/
+OpenBSD
+homepage
diff --git a/regress/man/UR/noUE.out_ascii b/regress/man/UR/noUE.out_ascii
new file mode 100644
index 00000000..19090f6b
--- /dev/null
+++ b/regress/man/UR/noUE.out_ascii
@@ -0,0 +1,15 @@
+UR-NOUE(1) General Commands Manual UR-NOUE(1)
+
+
+
+NNAAMMEE
+ UR-noUE - unclosed URI macro
+
+DDEESSCCRRIIPPTTIIOONN
+ lonely UE:
+
+ argument plus text: OpenBSD homepage <http://www.openbsd.org/>
+
+
+
+OpenBSD July 7, 2014 UR-NOUE(1)
diff --git a/regress/man/UR/noUE.out_lint b/regress/man/UR/noUE.out_lint
new file mode 100644
index 00000000..d81fad0f
--- /dev/null
+++ b/regress/man/UR/noUE.out_lint
@@ -0,0 +1,2 @@
+mandoc: noUE.in:6:2: ERROR: skipping end of block that is not open: UE
+mandoc: noUE.in:9:2: ERROR: appending missing end of block: UR
diff --git a/regress/man/blank/Makefile b/regress/man/blank/Makefile
new file mode 100644
index 00000000..f4759d32
--- /dev/null
+++ b/regress/man/blank/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2014/07/02 05:51:49 schwarze Exp $
+
+REGRESS_TARGETS = line afterSH afterSS
+LINT_TARGETS = line afterSH afterSS
+
+.include <bsd.regress.mk>
diff --git a/regress/man/blank/afterSH.in b/regress/man/blank/afterSH.in
new file mode 100644
index 00000000..28934fdf
--- /dev/null
+++ b/regress/man/blank/afterSH.in
@@ -0,0 +1,77 @@
+.TH BLANK-AFTERSH 1 "November 10, 2013" OpenBSD
+.SH NAME
+blank-afterSH \- handling of blank lines right after a section heading
+.SH DESCRIPTION
+
+blank line before text
+.SH DESCRIPTION 2
+
+.PP
+blank line before PP
+.SH DESCRIPTION 3
+
+.RS 6n
+blank line before RS
+.RE
+.SH DESCRIPTION 4
+
+.IP TAG
+blank line before an indented paragraph
+.SH DESCRIPTION 5
+
+.TP
+TAG
+blank line before a tagged paragraph
+.SH DESCRIPTION 6
+
+.HP
+blank line before a hanged paragraph
+.SH DESCRIPTION 7
+
+.br
+blank line before br
+.SH DESCRIPTION 8
+
+.sp
+blank line before sp
+.SH DESCRIPTION 10
+
+
+double blank line before text
+.SH DESCRIPTION 12
+
+
+.PP
+double blank line before PP
+.SH DESCRIPTION 13
+
+
+.RS 6n
+double blank line before RS
+.RE
+.SH DESCRIPTION 14
+
+
+.IP TAG
+double blank line before an indented paragraph
+.SH DESCRIPTION 15
+
+
+.TP
+TAG
+double blank line before a tagged paragraph
+.SH DESCRIPTION 16
+
+
+.HP
+double blank line before a hanged paragraph
+.SH DESCRIPTION 17
+
+
+.br
+double blank line before br
+.SH DESCRIPTION 18
+
+
+.sp
+double blank line before sp
diff --git a/regress/man/blank/afterSH.out_ascii b/regress/man/blank/afterSH.out_ascii
new file mode 100644
index 00000000..aac7abab
--- /dev/null
+++ b/regress/man/blank/afterSH.out_ascii
@@ -0,0 +1,58 @@
+BLANK-AFTERSH(1) General Commands Manual BLANK-AFTERSH(1)
+
+
+
+NNAAMMEE
+ blank-afterSH - handling of blank lines right after a section heading
+
+DDEESSCCRRIIPPTTIIOONN
+ blank line before text
+
+DDEESSCCRRIIPPTTIIOONN 22
+ blank line before PP
+
+DDEESSCCRRIIPPTTIIOONN 33
+ blank line before RS
+
+DDEESSCCRRIIPPTTIIOONN 44
+ TAG blank line before an indented paragraph
+
+DDEESSCCRRIIPPTTIIOONN 55
+ TAG blank line before a tagged paragraph
+
+DDEESSCCRRIIPPTTIIOONN 66
+ blank line before a hanged paragraph
+
+DDEESSCCRRIIPPTTIIOONN 77
+ blank line before br
+
+DDEESSCCRRIIPPTTIIOONN 88
+ blank line before sp
+
+DDEESSCCRRIIPPTTIIOONN 1100
+ double blank line before text
+
+DDEESSCCRRIIPPTTIIOONN 1122
+ double blank line before PP
+
+DDEESSCCRRIIPPTTIIOONN 1133
+ double blank line before RS
+
+DDEESSCCRRIIPPTTIIOONN 1144
+ TAG double blank line before an indented paragraph
+
+DDEESSCCRRIIPPTTIIOONN 1155
+ TAG double blank line before a tagged paragraph
+
+DDEESSCCRRIIPPTTIIOONN 1166
+ double blank line before a hanged paragraph
+
+DDEESSCCRRIIPPTTIIOONN 1177
+ double blank line before br
+
+DDEESSCCRRIIPPTTIIOONN 1188
+ double blank line before sp
+
+
+
+OpenBSD November 10, 2013 BLANK-AFTERSH(1)
diff --git a/regress/man/blank/afterSH.out_lint b/regress/man/blank/afterSH.out_lint
new file mode 100644
index 00000000..0a77f218
--- /dev/null
+++ b/regress/man/blank/afterSH.out_lint
@@ -0,0 +1,4 @@
+mandoc: afterSH.in:31:2: WARNING: skipping paragraph macro: br after SH
+mandoc: afterSH.in:35:2: WARNING: skipping paragraph macro: sp after SH
+mandoc: afterSH.in:71:2: WARNING: skipping paragraph macro: br after SH
+mandoc: afterSH.in:76:2: WARNING: skipping paragraph macro: sp after SH
diff --git a/regress/man/blank/afterSS.in b/regress/man/blank/afterSS.in
new file mode 100644
index 00000000..cbf7afe3
--- /dev/null
+++ b/regress/man/blank/afterSS.in
@@ -0,0 +1,78 @@
+.TH BLANK-AFTERSS 1 "November 10, 2013" OpenBSD
+.SH NAME
+blank-afterSS \- handling of blank lines right after a subsection heading
+.SH DESCRIPTION
+.SS 1
+
+blank line before text
+.SS 2
+
+.PP
+blank line before PP
+.SS 3
+
+.RS 6n
+blank line before RS
+.RE
+.SS 4
+
+.IP TAG
+blank line before an indented paragraph
+.SS 5
+
+.TP
+TAG
+blank line before a tagged paragraph
+.SS 6
+
+.HP
+blank line before a hanged paragraph
+.SS 7
+
+.br
+blank line before br
+.SS 8
+
+.sp
+blank line before sp
+.SS 10
+
+
+double blank line before text
+.SS 12
+
+
+.PP
+double blank line before PP
+.SS 13
+
+
+.RS 6n
+double blank line before RS
+.RE
+.SS 14
+
+
+.IP TAG
+double blank line before an indented paragraph
+.SS 15
+
+
+.TP
+TAG
+double blank line before a tagged paragraph
+.SS 16
+
+
+.HP
+double blank line before a hanged paragraph
+.SS 17
+
+
+.br
+double blank line before br
+.SS 18
+
+
+.sp
+double blank line before sp
diff --git a/regress/man/blank/afterSS.out_ascii b/regress/man/blank/afterSS.out_ascii
new file mode 100644
index 00000000..1b30721e
--- /dev/null
+++ b/regress/man/blank/afterSS.out_ascii
@@ -0,0 +1,60 @@
+BLANK-AFTERSS(1) General Commands Manual BLANK-AFTERSS(1)
+
+
+
+NNAAMMEE
+ blank-afterSS - handling of blank lines right after a subsection
+ heading
+
+DDEESSCCRRIIPPTTIIOONN
+ 11
+ blank line before text
+
+ 22
+ blank line before PP
+
+ 33
+ blank line before RS
+
+ 44
+ TAG blank line before an indented paragraph
+
+ 55
+ TAG blank line before a tagged paragraph
+
+ 66
+ blank line before a hanged paragraph
+
+ 77
+ blank line before br
+
+ 88
+ blank line before sp
+
+ 1100
+ double blank line before text
+
+ 1122
+ double blank line before PP
+
+ 1133
+ double blank line before RS
+
+ 1144
+ TAG double blank line before an indented paragraph
+
+ 1155
+ TAG double blank line before a tagged paragraph
+
+ 1166
+ double blank line before a hanged paragraph
+
+ 1177
+ double blank line before br
+
+ 1188
+ double blank line before sp
+
+
+
+OpenBSD November 10, 2013 BLANK-AFTERSS(1)
diff --git a/regress/man/blank/afterSS.out_lint b/regress/man/blank/afterSS.out_lint
new file mode 100644
index 00000000..5129637c
--- /dev/null
+++ b/regress/man/blank/afterSS.out_lint
@@ -0,0 +1,4 @@
+mandoc: afterSS.in:32:2: WARNING: skipping paragraph macro: br after SS
+mandoc: afterSS.in:36:2: WARNING: skipping paragraph macro: sp after SS
+mandoc: afterSS.in:72:2: WARNING: skipping paragraph macro: br after SS
+mandoc: afterSS.in:77:2: WARNING: skipping paragraph macro: sp after SS
diff --git a/regress/man/blank/line.in b/regress/man/blank/line.in
new file mode 100644
index 00000000..e9479960
--- /dev/null
+++ b/regress/man/blank/line.in
@@ -0,0 +1,86 @@
+.TH BLANK-LINE 1 "July 14, 2012" OpenBSD
+.SH NAME
+blank-line \- handling of blank lines
+.SH DESCRIPTION
+.sp
+.PP
+Single br:
+.br
+Single PP:
+.PP
+Single sp:
+.sp
+Single blank:
+
+Double br:
+.br
+.br
+br PP:
+.br
+.PP
+PP br:
+.PP
+.br
+Double PP:
+.PP
+.PP
+br sp:
+.br
+.sp
+sp br:
+.sp
+.br
+PP sp:
+.PP
+.sp
+PP sp 2v:
+.PP
+.sp 2v
+sp PP:
+.sp
+.PP
+Double sp:
+.sp
+.sp
+br blank:
+.br
+
+blank br:
+
+.br
+PP blank:
+.PP
+
+blank PP:
+
+.PP
+sp blank:
+.sp
+
+blank sp:
+
+.sp
+Double blank:
+
+
+RS sp 2v:
+.RS 6n
+.sp 2v
+RE sp 2v:
+.RE
+.sp 2v
+IP sp 2v:
+.IP tag 6n
+.sp 2v
+TP sp 2v:
+.TP 6n
+tag
+.sp 2v
+SH sp 2v:
+.SH CUSTOM
+.sp 2v
+SS sp PP:
+.SS subsection
+.sp
+.PP
+End.
diff --git a/regress/man/blank/line.out_ascii b/regress/man/blank/line.out_ascii
new file mode 100644
index 00000000..2aa6fa6e
--- /dev/null
+++ b/regress/man/blank/line.out_ascii
@@ -0,0 +1,81 @@
+BLANK-LINE(1) General Commands Manual BLANK-LINE(1)
+
+
+
+NNAAMMEE
+ blank-line - handling of blank lines
+
+DDEESSCCRRIIPPTTIIOONN
+ Single br:
+ Single PP:
+
+ Single sp:
+
+ Single blank:
+
+ Double br:
+ br PP:
+
+ PP br:
+
+ Double PP:
+
+ br sp:
+
+ sp br:
+
+ PP sp:
+
+ PP sp 2v:
+
+ sp PP:
+
+
+ Double sp:
+
+
+ br blank:
+
+ blank br:
+
+ PP blank:
+
+ blank PP:
+
+
+ sp blank:
+
+
+ blank sp:
+
+
+ Double blank:
+
+
+ RS sp 2v:
+
+
+ RE sp 2v:
+
+
+ IP sp 2v:
+
+ tag
+
+
+ TP sp 2v:
+
+ tag
+
+
+ SH sp 2v:
+
+CCUUSSTTOOMM
+ SS sp PP:
+
+ ssuubbsseeccttiioonn
+ End.
+
+
+
+OpenBSD July 14, 2012 BLANK-LINE(1)
diff --git a/regress/man/blank/line.out_lint b/regress/man/blank/line.out_lint
new file mode 100644
index 00000000..8480cfc2
--- /dev/null
+++ b/regress/man/blank/line.out_lint
@@ -0,0 +1,4 @@
+mandoc: line.in:5:2: WARNING: skipping paragraph macro: sp after SH
+mandoc: line.in:25:2: WARNING: skipping paragraph macro: PP empty
+mandoc: line.in:81:2: WARNING: skipping paragraph macro: sp after SH
+mandoc: line.in:84:2: WARNING: skipping paragraph macro: sp after SS
diff --git a/regress/man/nf/Makefile b/regress/man/nf/Makefile
new file mode 100644
index 00000000..3f984661
--- /dev/null
+++ b/regress/man/nf/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.7 2015/02/06 08:28:04 schwarze Exp $
+
+REGRESS_TARGETS = indent args vert dupe userdef
+LINT_TARGETS = args dupe
+
+.include <bsd.regress.mk>
diff --git a/regress/man/nf/args.in b/regress/man/nf/args.in
new file mode 100644
index 00000000..8d0c7e58
--- /dev/null
+++ b/regress/man/nf/args.in
@@ -0,0 +1,12 @@
+.TH NF-ARGS 1 "January 16, 2011" OpenBSD
+.SH NAME
+nf-args \- filling macros with arguments
+.SH DESCRIPTION
+regular
+text
+.nf arg1 arg2 arg3
+literal
+text
+.fi arg1 arg2 arg3
+regular
+text
diff --git a/regress/man/nf/args.out_ascii b/regress/man/nf/args.out_ascii
new file mode 100644
index 00000000..114d2fb8
--- /dev/null
+++ b/regress/man/nf/args.out_ascii
@@ -0,0 +1,16 @@
+NF-ARGS(1) General Commands Manual NF-ARGS(1)
+
+
+
+NNAAMMEE
+ nf-args - filling macros with arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ literal
+ text
+ regular text
+
+
+
+OpenBSD January 16, 2011 NF-ARGS(1)
diff --git a/regress/man/nf/args.out_lint b/regress/man/nf/args.out_lint
new file mode 100644
index 00000000..dc11881a
--- /dev/null
+++ b/regress/man/nf/args.out_lint
@@ -0,0 +1,2 @@
+mandoc: args.in:7:5: ERROR: skipping all arguments: nf arg1 arg2 arg3
+mandoc: args.in:10:5: ERROR: skipping all arguments: fi arg1 arg2 arg3
diff --git a/regress/man/nf/dupe.in b/regress/man/nf/dupe.in
new file mode 100644
index 00000000..dfa1acbb
--- /dev/null
+++ b/regress/man/nf/dupe.in
@@ -0,0 +1,17 @@
+.TH NF-DUPE 1 "July 2, 2014" OpenBSD
+.SH NAME
+nf-dupe \- duplicate filling macros
+.SH DESCRIPTION
+regular
+text
+.fi
+still
+regular
+text
+.nf
+literal
+text
+.nf
+still
+literal
+text
diff --git a/regress/man/nf/dupe.out_ascii b/regress/man/nf/dupe.out_ascii
new file mode 100644
index 00000000..ce7f153d
--- /dev/null
+++ b/regress/man/nf/dupe.out_ascii
@@ -0,0 +1,19 @@
+NF-DUPE(1) General Commands Manual NF-DUPE(1)
+
+
+
+NNAAMMEE
+ nf-dupe - duplicate filling macros
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ still regular text
+ literal
+ text
+ still
+ literal
+ text
+
+
+
+OpenBSD July 2, 2014 NF-DUPE(1)
diff --git a/regress/man/nf/dupe.out_lint b/regress/man/nf/dupe.out_lint
new file mode 100644
index 00000000..b33d44c6
--- /dev/null
+++ b/regress/man/nf/dupe.out_lint
@@ -0,0 +1,2 @@
+mandoc: dupe.in:7:2: WARNING: fill mode already enabled, skipping: fi
+mandoc: dupe.in:14:2: WARNING: fill mode already disabled, skipping: nf
diff --git a/regress/man/nf/indent.in b/regress/man/nf/indent.in
new file mode 100644
index 00000000..8c6aedbb
--- /dev/null
+++ b/regress/man/nf/indent.in
@@ -0,0 +1,21 @@
+.TH NF-INDENT 1 "January 4, 2011" OpenBSD
+.SH NAME
+nf-indent \- indentation of literal blocks
+.SH DESCRIPTION
+Here comes
+an indented block:
+.nf
+oneword
+two words
+and three words
+This is a very long line; because it is indented, it is a bit too long to fit.
+blank line:
+
+line with only a zero-width space:
+\&
+line with only a normal space character:
+
+end of literal
+.fi
+He is some more
+regular text.
diff --git a/regress/man/nf/indent.out_ascii b/regress/man/nf/indent.out_ascii
new file mode 100644
index 00000000..4c63327b
--- /dev/null
+++ b/regress/man/nf/indent.out_ascii
@@ -0,0 +1,25 @@
+NF-INDENT(1) General Commands Manual NF-INDENT(1)
+
+
+
+NNAAMMEE
+ nf-indent - indentation of literal blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ Here comes an indented block:
+ oneword
+ two words
+ and three words
+ This is a very long line; because it is indented, it is a bit too long to fit.
+ blank line:
+
+ line with only a zero-width space:
+
+ line with only a normal space character:
+
+ end of literal
+ He is some more regular text.
+
+
+
+OpenBSD January 4, 2011 NF-INDENT(1)
diff --git a/regress/man/nf/userdef.in b/regress/man/nf/userdef.in
new file mode 100644
index 00000000..93422469
--- /dev/null
+++ b/regress/man/nf/userdef.in
@@ -0,0 +1,21 @@
+.TH NF-USERDEF 1 "March 8, 2014" OpenBSD
+.SH NAME
+nf-userdef \- setting unfilled mode via user-defined macros
+.SH DESCRIPTION
+filled
+text
+.nf
+unfilled
+text
+.fi
+filled
+text
+.de MYBLOCK
+.nf
+unfilled
+text
+.fi
+filled
+text
+..
+.MYBLOCK
diff --git a/regress/man/nf/userdef.out_ascii b/regress/man/nf/userdef.out_ascii
new file mode 100644
index 00000000..8b7c42ff
--- /dev/null
+++ b/regress/man/nf/userdef.out_ascii
@@ -0,0 +1,19 @@
+NF-USERDEF(1) General Commands Manual NF-USERDEF(1)
+
+
+
+NNAAMMEE
+ nf-userdef - setting unfilled mode via user-defined macros
+
+DDEESSCCRRIIPPTTIIOONN
+ filled text
+ unfilled
+ text
+ filled text
+ unfilled
+ text
+ filled text
+
+
+
+OpenBSD March 8, 2014 NF-USERDEF(1)
diff --git a/regress/man/nf/vert.in b/regress/man/nf/vert.in
new file mode 100644
index 00000000..3241e6af
--- /dev/null
+++ b/regress/man/nf/vert.in
@@ -0,0 +1,28 @@
+.TH NF-VERT 1 "June 2, 2012" OpenBSD
+.SH NAME
+nf-vert \- spacing around filling macros
+.SH DESCRIPTION
+regular
+text
+.nf
+literal
+text
+.fi
+regular
+text
+.br
+.nf
+literal
+text
+.br
+.fi
+regular
+text
+.sp
+.nf
+literal
+text
+.sp
+.fi
+regular
+text
diff --git a/regress/man/nf/vert.out_ascii b/regress/man/nf/vert.out_ascii
new file mode 100644
index 00000000..2f8732c9
--- /dev/null
+++ b/regress/man/nf/vert.out_ascii
@@ -0,0 +1,24 @@
+NF-VERT(1) General Commands Manual NF-VERT(1)
+
+
+
+NNAAMMEE
+ nf-vert - spacing around filling macros
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+ literal
+ text
+ regular text
+ literal
+ text
+ regular text
+
+ literal
+ text
+
+ regular text
+
+
+
+OpenBSD June 2, 2012 NF-VERT(1)
diff --git a/regress/mdoc/Ad/Makefile b/regress/mdoc/Ad/Makefile
new file mode 100644
index 00000000..1be2a84a
--- /dev/null
+++ b/regress/mdoc/Ad/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = noarg font
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ad/font.in b/regress/mdoc/Ad/font.in
new file mode 100644
index 00000000..104bc194
--- /dev/null
+++ b/regress/mdoc/Ad/font.in
@@ -0,0 +1,10 @@
+.Dd November 20, 2014
+.Dt AD-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ad-font
+.Nd changing fonts inside the address macro
+.Sh DESCRIPTION
+normal text
+.Ad emphasis\\fBbold\\fPback | after : punctuation
+trailing text
diff --git a/regress/mdoc/Ad/font.out_ascii b/regress/mdoc/Ad/font.out_ascii
new file mode 100644
index 00000000..e829efbd
--- /dev/null
+++ b/regress/mdoc/Ad/font.out_ascii
@@ -0,0 +1,9 @@
+AD-FONT(1) General Commands Manual AD-FONT(1)
+
+NNAAMMEE
+ AAdd--ffoonntt - changing fonts inside the address macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k | _a_f_t_e_r: _p_u_n_c_t_u_a_t_i_o_n trailing text
+
+OpenBSD November 20, 2014 OpenBSD
diff --git a/regress/mdoc/Ad/noarg.in b/regress/mdoc/Ad/noarg.in
new file mode 100644
index 00000000..65f8167b
--- /dev/null
+++ b/regress/mdoc/Ad/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt AD-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ad-noarg
+.Nd address macro without an argument
+.Sh DESCRIPTION
+with address:
+.Ad 0x3bc
+no address:
+.Ad
+end of test document
diff --git a/regress/mdoc/Ad/noarg.out_ascii b/regress/mdoc/Ad/noarg.out_ascii
new file mode 100644
index 00000000..6ad60d8a
--- /dev/null
+++ b/regress/mdoc/Ad/noarg.out_ascii
@@ -0,0 +1,9 @@
+AD-NOARG(1) General Commands Manual AD-NOARG(1)
+
+NNAAMMEE
+ AAdd--nnooaarrgg - address macro without an argument
+
+DDEESSCCRRIIPPTTIIOONN
+ with address: _0_x_3_b_c no address: end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Ad/noarg.out_lint b/regress/mdoc/Ad/noarg.out_lint
new file mode 100644
index 00000000..180985aa
--- /dev/null
+++ b/regress/mdoc/Ad/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Ad
diff --git a/regress/mdoc/An/Makefile b/regress/mdoc/An/Makefile
new file mode 100644
index 00000000..b061bf76
--- /dev/null
+++ b/regress/mdoc/An/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2014/08/14 02:00:52 schwarze Exp $
+
+REGRESS_TARGETS = break
+LINT_TARGETS = break
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/An/break.in b/regress/mdoc/An/break.in
new file mode 100644
index 00000000..b783b337
--- /dev/null
+++ b/regress/mdoc/An/break.in
@@ -0,0 +1,49 @@
+.Dd February 5, 2015
+.Dt AN-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm An-break
+.Nd line breaking of the author macro
+.Sh DESCRIPTION
+inline is the default:
+.An Kristaps ,
+.An Ingo ,
+and
+.An Joerg .
+empty
+.An
+trailing
+.An .
+.Pp
+.An -split -nosplit bogus
+split mode:
+.An Kristaps
+.An Ingo
+.An Joerg
+.Pp
+empty
+.An
+trailing
+.An .
+.An -nosplit
+.Sh AUTHORS
+split mode is the default:
+.An Kristaps
+.An Ingo
+.An Joerg
+.Pp
+empty
+.An
+trailing
+.An .
+.An -nosplit -split bogus
+.Pp
+inline:
+.An Kristaps ,
+.An Ingo ,
+and
+.An Joerg .
+empty
+.An
+trailing
+.An .
diff --git a/regress/mdoc/An/break.out_ascii b/regress/mdoc/An/break.out_ascii
new file mode 100644
index 00000000..92cec343
--- /dev/null
+++ b/regress/mdoc/An/break.out_ascii
@@ -0,0 +1,29 @@
+AN-BREAK(1) General Commands Manual AN-BREAK(1)
+
+NNAAMMEE
+ AAnn--bbrreeaakk - line breaking of the author macro
+
+DDEESSCCRRIIPPTTIIOONN
+ inline is the default: Kristaps, Ingo, and Joerg. empty trailing .
+
+ split mode:
+ Kristaps
+ Ingo
+ Joerg
+
+ empty
+ trailing
+ .
+
+AAUUTTHHOORRSS
+ split mode is the default: Kristaps
+ Ingo
+ Joerg
+
+ empty
+ trailing
+ .
+
+ inline: Kristaps, Ingo, and Joerg. empty trailing .
+
+OpenBSD February 5, 2015 OpenBSD
diff --git a/regress/mdoc/An/break.out_lint b/regress/mdoc/An/break.out_lint
new file mode 100644
index 00000000..25622fd1
--- /dev/null
+++ b/regress/mdoc/An/break.out_lint
@@ -0,0 +1,12 @@
+mandoc: break.in:14:2: WARNING: skipping empty macro: An
+mandoc: break.in:16:2: WARNING: skipping empty macro: An
+mandoc: break.in:18:12: WARNING: skipping duplicate argument: An -nosplit
+mandoc: break.in:18:21: ERROR: skipping excess arguments: An ... bogus
+mandoc: break.in:25:2: WARNING: skipping empty macro: An
+mandoc: break.in:27:2: WARNING: skipping empty macro: An
+mandoc: break.in:36:2: WARNING: skipping empty macro: An
+mandoc: break.in:38:2: WARNING: skipping empty macro: An
+mandoc: break.in:39:14: WARNING: skipping duplicate argument: An -split
+mandoc: break.in:39:21: ERROR: skipping excess arguments: An ... bogus
+mandoc: break.in:47:2: WARNING: skipping empty macro: An
+mandoc: break.in:49:2: WARNING: skipping empty macro: An
diff --git a/regress/mdoc/Ap/Makefile b/regress/mdoc/Ap/Makefile
new file mode 100644
index 00000000..4ee49253
--- /dev/null
+++ b/regress/mdoc/Ap/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2012/11/16 18:40:39 schwarze Exp $
+
+REGRESS_TARGETS = middle eos
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ap/eos.in b/regress/mdoc/Ap/eos.in
new file mode 100644
index 00000000..032cf72a
--- /dev/null
+++ b/regress/mdoc/Ap/eos.in
@@ -0,0 +1,12 @@
+.Dd November 16, 2012
+.Dt AP-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ap-eos
+.Nd end of sentence handling after the apostrophe macro
+.Sh DESCRIPTION
+The first sentence is
+.An Ingo Ap s .
+The second is
+.An Kristaps Ap .
+No idea about the third.
diff --git a/regress/mdoc/Ap/eos.out_ascii b/regress/mdoc/Ap/eos.out_ascii
new file mode 100644
index 00000000..c91617c6
--- /dev/null
+++ b/regress/mdoc/Ap/eos.out_ascii
@@ -0,0 +1,10 @@
+AP-EOS(1) General Commands Manual AP-EOS(1)
+
+NNAAMMEE
+ AApp--eeooss - end of sentence handling after the apostrophe macro
+
+DDEESSCCRRIIPPTTIIOONN
+ The first sentence is Ingo's. The second is Kristaps'. No idea about
+ the third.
+
+OpenBSD November 16, 2012 OpenBSD
diff --git a/regress/mdoc/Ap/middle.in b/regress/mdoc/Ap/middle.in
new file mode 100644
index 00000000..03d7b6f9
--- /dev/null
+++ b/regress/mdoc/Ap/middle.in
@@ -0,0 +1,8 @@
+.Dd September 30, 2011
+.Dt AP-MIDDLE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ap-middle
+.Nd apostrophe in the middle of a macro line
+.Sh DESCRIPTION
+.Xr mandoc 1 Ap s
diff --git a/regress/mdoc/Ap/middle.out_ascii b/regress/mdoc/Ap/middle.out_ascii
new file mode 100644
index 00000000..c51bd6d8
--- /dev/null
+++ b/regress/mdoc/Ap/middle.out_ascii
@@ -0,0 +1,9 @@
+AP-MIDDLE(1) General Commands Manual AP-MIDDLE(1)
+
+NNAAMMEE
+ AApp--mmiiddddllee - apostrophe in the middle of a macro line
+
+DDEESSCCRRIIPPTTIIOONN
+ mandoc(1)'s
+
+OpenBSD September 30, 2011 OpenBSD
diff --git a/regress/mdoc/Aq/Makefile b/regress/mdoc/Aq/Makefile
new file mode 100644
index 00000000..ae347ad3
--- /dev/null
+++ b/regress/mdoc/Aq/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2014/11/19 21:59:20 schwarze Exp $
+
+REGRESS_TARGETS = author empty
+UTF8_TARGETS = author empty
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Aq/author.in b/regress/mdoc/Aq/author.in
new file mode 100644
index 00000000..9e007f58
--- /dev/null
+++ b/regress/mdoc/Aq/author.in
@@ -0,0 +1,10 @@
+.Dd November 19, 2014
+.Dt AQ-AUTHOR 1
+.Os OpenBSD
+.Sh NAME
+.Nm Aq-author
+.Nd angle brackets after an author name macro
+.Sh DESCRIPTION
+.An Name Ao Mt addr Ac An Name Aq Mt addr
+.Sh AUTHORS
+.An Name Ao Mt addr Ac An Name Aq Mt addr
diff --git a/regress/mdoc/Aq/author.out_ascii b/regress/mdoc/Aq/author.out_ascii
new file mode 100644
index 00000000..80775148
--- /dev/null
+++ b/regress/mdoc/Aq/author.out_ascii
@@ -0,0 +1,13 @@
+AQ-AUTHOR(1) General Commands Manual AQ-AUTHOR(1)
+
+NNAAMMEE
+ AAqq--aauutthhoorr - angle brackets after an author name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Name <_a_d_d_r> Name <_a_d_d_r>
+
+AAUUTTHHOORRSS
+ Name <_a_d_d_r>
+ Name <_a_d_d_r>
+
+OpenBSD November 19, 2014 OpenBSD
diff --git a/regress/mdoc/Aq/author.out_utf8 b/regress/mdoc/Aq/author.out_utf8
new file mode 100644
index 00000000..28c4faca
--- /dev/null
+++ b/regress/mdoc/Aq/author.out_utf8
@@ -0,0 +1,13 @@
+AQ-AUTHOR(1) General Commands Manual AQ-AUTHOR(1)
+
+NNAAMMEE
+ AAqq--aauutthhoorr – angle brackets after an author name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Name <_a_d_d_r> Name <_a_d_d_r>
+
+AAUUTTHHOORRSS
+ Name <_a_d_d_r>
+ Name <_a_d_d_r>
+
+OpenBSD November 19, 2014 OpenBSD
diff --git a/regress/mdoc/Aq/empty.in b/regress/mdoc/Aq/empty.in
new file mode 100644
index 00000000..a407855e
--- /dev/null
+++ b/regress/mdoc/Aq/empty.in
@@ -0,0 +1,14 @@
+.Dd August 6, 2010
+.Dt AQ-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Aq-empty
+.Nd empty implicit enclosure macros
+.Sh DESCRIPTION
+An empty
+.Aq
+and a full
+.Aq user@host
+return path.
+And another
+.Ao full Ac one .
diff --git a/regress/mdoc/Aq/empty.out_ascii b/regress/mdoc/Aq/empty.out_ascii
new file mode 100644
index 00000000..c587ee51
--- /dev/null
+++ b/regress/mdoc/Aq/empty.out_ascii
@@ -0,0 +1,9 @@
+AQ-EMPTY(1) General Commands Manual AQ-EMPTY(1)
+
+NNAAMMEE
+ AAqq--eemmppttyy - empty implicit enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty <> and a full <user@host> return path. And another <full> one.
+
+OpenBSD August 6, 2010 OpenBSD
diff --git a/regress/mdoc/Aq/empty.out_utf8 b/regress/mdoc/Aq/empty.out_utf8
new file mode 100644
index 00000000..0ae72b6f
--- /dev/null
+++ b/regress/mdoc/Aq/empty.out_utf8
@@ -0,0 +1,9 @@
+AQ-EMPTY(1) General Commands Manual AQ-EMPTY(1)
+
+NNAAMMEE
+ AAqq--eemmppttyy – empty implicit enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty ⟨⟩ and a full ⟨user@host⟩ return path. And another ⟨full⟩ one.
+
+OpenBSD August 6, 2010 OpenBSD
diff --git a/regress/mdoc/Ar/Makefile b/regress/mdoc/Ar/Makefile
new file mode 100644
index 00000000..2d1d895c
--- /dev/null
+++ b/regress/mdoc/Ar/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $
+
+REGRESS_TARGETS = punct font
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ar/font.in b/regress/mdoc/Ar/font.in
new file mode 100644
index 00000000..aa14b7d8
--- /dev/null
+++ b/regress/mdoc/Ar/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt AR-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ar-font
+.Nd changing fonts inside the argument macro
+.Sh DESCRIPTION
+normal text
+.Ar emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Ar/font.out_ascii b/regress/mdoc/Ar/font.out_ascii
new file mode 100644
index 00000000..c30d0078
--- /dev/null
+++ b/regress/mdoc/Ar/font.out_ascii
@@ -0,0 +1,9 @@
+AR-FONT(1) General Commands Manual AR-FONT(1)
+
+NNAAMMEE
+ AArr--ffoonntt - changing fonts inside the argument macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Ar/punct.in b/regress/mdoc/Ar/punct.in
new file mode 100644
index 00000000..963f7535
--- /dev/null
+++ b/regress/mdoc/Ar/punct.in
@@ -0,0 +1,39 @@
+.Dd August 21, 2014
+.Dt AR-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ar-punct
+.Nd punctuation handling by the Ar macro
+.Sh DESCRIPTION
+closing punctuation
+.Ar a )
+only one
+.Ar )
+only more than one
+.Ar ) )
+middle
+.Ar a ) z
+start
+.Ar ) z
+dot
+.Ar . z
+comma
+.Ar , z
+semicolon
+.Ar ; z
+colon
+.Ar : z
+quest
+.Ar ? z
+excl
+.Ar ! z
+paren
+.Ar ) z
+bracket
+.Ar ] z
+bar
+.Ar | m
+op paren
+.Ar ( a
+op bracket
+.Ar [ a
diff --git a/regress/mdoc/Ar/punct.out_ascii b/regress/mdoc/Ar/punct.out_ascii
new file mode 100644
index 00000000..d780dbcf
--- /dev/null
+++ b/regress/mdoc/Ar/punct.out_ascii
@@ -0,0 +1,12 @@
+AR-PUNCT(1) General Commands Manual AR-PUNCT(1)
+
+NNAAMMEE
+ AArr--ppuunncctt - punctuation handling by the Ar macro
+
+DDEESSCCRRIIPPTTIIOONN
+ closing punctuation _a) only one _f_i_l_e _._._.) only more than one _f_i_l_e _._._.))
+ middle _a) _z start _f_i_l_e _._._.) _z dot _f_i_l_e _._._.. _z comma _f_i_l_e _._._., _z semicolon
+ _f_i_l_e _._._.; _z colon _f_i_l_e _._._.: _z quest _f_i_l_e _._._.? _z excl _f_i_l_e _._._.! _z paren
+ _f_i_l_e _._._.) _z bracket _f_i_l_e _._._.] _z bar | _m op paren (_a op bracket [_a
+
+OpenBSD August 21, 2014 OpenBSD
diff --git a/regress/mdoc/At/Makefile b/regress/mdoc/At/Makefile
new file mode 100644
index 00000000..6c362995
--- /dev/null
+++ b/regress/mdoc/At/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2014/07/05 12:33:54 schwarze Exp $
+
+REGRESS_TARGETS = invalid
+LINT_TARGETS = invalid
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/At/invalid.in b/regress/mdoc/At/invalid.in
new file mode 100644
index 00000000..8e7d9ce5
--- /dev/null
+++ b/regress/mdoc/At/invalid.in
@@ -0,0 +1,17 @@
+.Dd June 30, 2010
+.Dt AT-INVALID 1
+.Os OpenBSD
+.Sh NAME
+.Nm At-invalid
+.Nd handling of an invalid AT&T UNIX argument
+.Sh DESCRIPTION
+no argument:
+.At
+.Pp
+valid argument:
+.At v7
+.Pp
+invalid argument:
+.At murks
+.Pp
+end of file
diff --git a/regress/mdoc/At/invalid.out_ascii b/regress/mdoc/At/invalid.out_ascii
new file mode 100644
index 00000000..c1cab598
--- /dev/null
+++ b/regress/mdoc/At/invalid.out_ascii
@@ -0,0 +1,15 @@
+AT-INVALID(1) General Commands Manual AT-INVALID(1)
+
+NNAAMMEE
+ AAtt--iinnvvaalliidd - handling of an invalid AT&T UNIX argument
+
+DDEESSCCRRIIPPTTIIOONN
+ no argument: AT&T UNIX
+
+ valid argument: Version 7 AT&T UNIX
+
+ invalid argument: AT&T UNIX murks
+
+ end of file
+
+OpenBSD June 30, 2010 OpenBSD
diff --git a/regress/mdoc/At/invalid.out_lint b/regress/mdoc/At/invalid.out_lint
new file mode 100644
index 00000000..00744a14
--- /dev/null
+++ b/regress/mdoc/At/invalid.out_lint
@@ -0,0 +1 @@
+mandoc: invalid.in:15:5: WARNING: unknown AT&T UNIX version: At murks
diff --git a/regress/mdoc/Bd/Makefile b/regress/mdoc/Bd/Makefile
new file mode 100644
index 00000000..817d9fe7
--- /dev/null
+++ b/regress/mdoc/Bd/Makefile
@@ -0,0 +1,25 @@
+# $OpenBSD: Makefile,v 1.18 2014/12/24 23:31:59 schwarze Exp $
+
+REGRESS_TARGETS = beforeNAME blank centered nested spacing
+REGRESS_TARGETS += badargs empty offset-empty offset-neg
+REGRESS_TARGETS += break broken unclosed
+
+LINT_TARGETS = beforeNAME blank nested badargs break broken unclosed
+
+SKIP_TMAN = beforeNAME centered
+
+# groff-1.22.3 defects:
+# - a display breaking another block continues indefinitely
+# - negative offsets take no effect, but advance the indention on exit
+
+SKIP_GROFF = break offset-neg
+
+# adjustment is disabled in groff for now
+
+SKIP_GROFF += centered
+
+# groff handles content before NAME differently
+
+SKIP_GROFF += beforeNAME
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Bd/badargs.in b/regress/mdoc/Bd/badargs.in
new file mode 100644
index 00000000..0d8b3f4d
--- /dev/null
+++ b/regress/mdoc/Bd/badargs.in
@@ -0,0 +1,51 @@
+.Dd October 27, 2015
+.Dt BD-BADARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-badargs
+.Nd display block with bad arguments
+.Sh DESCRIPTION
+trailing -offset:
+.Bd -ragged -offset
+is
+ignored
+.Ed tail argument
+double -compact and -offset:
+.Bd -ragged -compact -offset 42n -compact -offset 6n
+last
+wins
+.Ed
+no type:
+.Bd -offset 0n -bogus args
+displayed
+text
+.Ed
+double type:
+.Bd -ragged -compact -unfilled
+ragged
+unfilled
+.Ed
+.Bd -unfilled -compact -ragged
+unfilled
+ragged
+.Ed
+file /dev/null:
+.Bd -ragged -file /dev/null -offset indent
+ragged
+offset indent
+.Ed
+trailing -file:
+.Bd -ragged -offset indent -file
+ragged
+offset indent
+.Ed
+missing -file argument:
+.Bd -ragged -offset indent -file -compact
+ragged
+offset indent
+.Ed
+no argument whatsoever:
+.Bd
+no
+argument
+.Ed
diff --git a/regress/mdoc/Bd/badargs.out_ascii b/regress/mdoc/Bd/badargs.out_ascii
new file mode 100644
index 00000000..1a123a6c
--- /dev/null
+++ b/regress/mdoc/Bd/badargs.out_ascii
@@ -0,0 +1,30 @@
+BD-BADARGS(1) General Commands Manual BD-BADARGS(1)
+
+NNAAMMEE
+ BBdd--bbaaddaarrggss - display block with bad arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ trailing -offset:
+
+ is ignored
+ double -compact and -offset:
+ last wins
+ no type:
+
+ displayed text
+ double type:
+ ragged unfilled
+ unfilled
+ ragged
+ file /dev/null:
+
+ ragged offset indent
+ trailing -file:
+
+ ragged offset indent
+ missing -file argument:
+
+ ragged offset indent
+ no argument whatsoever: no argument
+
+OpenBSD October 27, 2015 OpenBSD
diff --git a/regress/mdoc/Bd/badargs.out_lint b/regress/mdoc/Bd/badargs.out_lint
new file mode 100644
index 00000000..10c9cb02
--- /dev/null
+++ b/regress/mdoc/Bd/badargs.out_lint
@@ -0,0 +1,12 @@
+mandoc: badargs.in:12:2: ERROR: skipping all arguments: Ed tail argument
+mandoc: badargs.in:19:16: ERROR: skipping excess arguments: Bd ... -bogus
+mandoc: badargs.in:9:13: WARNING: empty argument, using 0n: Bd -offset
+mandoc: badargs.in:14:34: WARNING: duplicate argument: Bd -compact
+mandoc: badargs.in:14:43: WARNING: duplicate argument: Bd -offset 6n
+mandoc: badargs.in:19:2: WARNING: missing display type, using -ragged: Bd
+mandoc: badargs.in:24:2: WARNING: skipping duplicate display type: Bd -unfilled
+mandoc: badargs.in:28:2: WARNING: skipping duplicate display type: Bd -ragged
+mandoc: badargs.in:33:2: ERROR: NOT IMPLEMENTED: Bd -file
+mandoc: badargs.in:38:2: ERROR: NOT IMPLEMENTED: Bd -file
+mandoc: badargs.in:43:2: ERROR: NOT IMPLEMENTED: Bd -file
+mandoc: badargs.in:48:2: ERROR: skipping display without arguments: Bd
diff --git a/regress/mdoc/Bd/beforeNAME.in b/regress/mdoc/Bd/beforeNAME.in
new file mode 100644
index 00000000..f264471f
--- /dev/null
+++ b/regress/mdoc/Bd/beforeNAME.in
@@ -0,0 +1,15 @@
+.Dd July 28, 2014
+.Dt BD-BEFORENAME 1
+.Os OpenBSD
+.Bd -centered
+Building and Debugging NetBSD Kernels
+.br
+David A. Holland
+.br
+August 17, 2009
+.Ed
+.Sh NAME
+.Nm Bd-beforename
+.Nd title and author block before the NAME section
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Bd/beforeNAME.out_ascii b/regress/mdoc/Bd/beforeNAME.out_ascii
new file mode 100644
index 00000000..3978941d
--- /dev/null
+++ b/regress/mdoc/Bd/beforeNAME.out_ascii
@@ -0,0 +1,13 @@
+BD-BEFORENAME(1) General Commands Manual BD-BEFORENAME(1)
+
+ Building and Debugging NetBSD Kernels
+ David A. Holland
+ August 17, 2009
+
+NNAAMMEE
+ BBdd--bbeeffoorreennaammee - title and author block before the NAME section
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD July 28, 2014 OpenBSD
diff --git a/regress/mdoc/Bd/beforeNAME.out_lint b/regress/mdoc/Bd/beforeNAME.out_lint
new file mode 100644
index 00000000..a5659948
--- /dev/null
+++ b/regress/mdoc/Bd/beforeNAME.out_lint
@@ -0,0 +1 @@
+mandoc: beforeNAME.in:4:2: WARNING: content before first section header: Bd
diff --git a/regress/mdoc/Bd/blank.in b/regress/mdoc/Bd/blank.in
new file mode 100644
index 00000000..ca95e6da
--- /dev/null
+++ b/regress/mdoc/Bd/blank.in
@@ -0,0 +1,31 @@
+.Dd January 2, 2011
+.Dt BD-BLANK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-blank
+.Nd handling of blank lines in literal displays
+.Sh DESCRIPTION
+.Bd -literal
+completely blank line:
+
+line containing a blank character:
+
+line containing two blank characters:
+
+line containing space tab space:
+
+line starting with a blank character:
+ x
+line starting with two blank characters:
+ x
+line ending in one blank character:
+line ending in two blank characters:
+line ending in space tab space:
+line containing a Pp macro:
+.Pp
+finally, a trailing blank line:
+
+.Ed
+An empty one-line literal display:
+.Dl
+end of test document
diff --git a/regress/mdoc/Bd/blank.out_ascii b/regress/mdoc/Bd/blank.out_ascii
new file mode 100644
index 00000000..de03e318
--- /dev/null
+++ b/regress/mdoc/Bd/blank.out_ascii
@@ -0,0 +1,29 @@
+BD-BLANK(1) General Commands Manual BD-BLANK(1)
+
+NNAAMMEE
+ BBdd--bbllaannkk - handling of blank lines in literal displays
+
+DDEESSCCRRIIPPTTIIOONN
+ completely blank line:
+
+ line containing a blank character:
+
+ line containing two blank characters:
+
+ line containing space tab space:
+
+ line starting with a blank character:
+ x
+ line starting with two blank characters:
+ x
+ line ending in one blank character:
+ line ending in two blank characters:
+ line ending in space tab space:
+ line containing a Pp macro:
+
+ finally, a trailing blank line:
+
+ An empty one-line literal display:
+ end of test document
+
+OpenBSD January 2, 2011 OpenBSD
diff --git a/regress/mdoc/Bd/blank.out_lint b/regress/mdoc/Bd/blank.out_lint
new file mode 100644
index 00000000..fde72ad0
--- /dev/null
+++ b/regress/mdoc/Bd/blank.out_lint
@@ -0,0 +1,8 @@
+mandoc: blank.in:12:1: WARNING: whitespace at end of input line
+mandoc: blank.in:14:1: WARNING: whitespace at end of input line
+mandoc: blank.in:16:1: WARNING: whitespace at end of input line
+mandoc: blank.in:21:36: WARNING: whitespace at end of input line
+mandoc: blank.in:22:37: WARNING: whitespace at end of input line
+mandoc: blank.in:23:32: WARNING: whitespace at end of input line
+mandoc: blank.in:30:8: WARNING: whitespace at end of input line
+mandoc: blank.in:30:2: WARNING: empty block: Dl
diff --git a/regress/mdoc/Bd/break.in b/regress/mdoc/Bd/break.in
new file mode 100644
index 00000000..7eaf663a
--- /dev/null
+++ b/regress/mdoc/Bd/break.in
@@ -0,0 +1,15 @@
+.Dd November 10, 2012
+.Dt BD-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-break
+.Nd display breaking another block
+.Sh DESCRIPTION
+before both
+.Bd -ragged -offset indent
+before bracket
+.Bo inside both
+.Ed
+after display
+.Bc
+after both
diff --git a/regress/mdoc/Bd/break.out_ascii b/regress/mdoc/Bd/break.out_ascii
new file mode 100644
index 00000000..42f9eb25
--- /dev/null
+++ b/regress/mdoc/Bd/break.out_ascii
@@ -0,0 +1,12 @@
+BD-BREAK(1) General Commands Manual BD-BREAK(1)
+
+NNAAMMEE
+ BBdd--bbrreeaakk - display breaking another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both
+
+ before bracket [inside both
+ after display] after both
+
+OpenBSD November 10, 2012 OpenBSD
diff --git a/regress/mdoc/Bd/break.out_lint b/regress/mdoc/Bd/break.out_lint
new file mode 100644
index 00000000..aede3c30
--- /dev/null
+++ b/regress/mdoc/Bd/break.out_lint
@@ -0,0 +1 @@
+mandoc: break.in:12:2: WARNING: blocks badly nested: Bd breaks Bo
diff --git a/regress/mdoc/Bd/broken.in b/regress/mdoc/Bd/broken.in
new file mode 100644
index 00000000..b7271a67
--- /dev/null
+++ b/regress/mdoc/Bd/broken.in
@@ -0,0 +1,14 @@
+.Dd November 10, 2012
+.Dt BD-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-broken
+.Nd display broken by another block
+.Sh DESCRIPTION
+before both
+.Bo before display
+.Bd -ragged -offset indent
+inside both
+.Bc
+after bracket
+.Ed
diff --git a/regress/mdoc/Bd/broken.out_ascii b/regress/mdoc/Bd/broken.out_ascii
new file mode 100644
index 00000000..5b24c21b
--- /dev/null
+++ b/regress/mdoc/Bd/broken.out_ascii
@@ -0,0 +1,11 @@
+BD-BROKEN(1) General Commands Manual BD-BROKEN(1)
+
+NNAAMMEE
+ BBdd--bbrrookkeenn - display broken by another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both [before display
+
+ inside both] after bracket
+
+OpenBSD November 10, 2012 OpenBSD
diff --git a/regress/mdoc/Bd/broken.out_lint b/regress/mdoc/Bd/broken.out_lint
new file mode 100644
index 00000000..44688afa
--- /dev/null
+++ b/regress/mdoc/Bd/broken.out_lint
@@ -0,0 +1 @@
+mandoc: broken.in:12:2: WARNING: blocks badly nested: Bo breaks Bd
diff --git a/regress/mdoc/Bd/centered.in b/regress/mdoc/Bd/centered.in
new file mode 100644
index 00000000..d989ddb8
--- /dev/null
+++ b/regress/mdoc/Bd/centered.in
@@ -0,0 +1,15 @@
+.Dd July 28, 2014
+.Dt BD-CENTERED 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-centered
+.Nd centered display blocks
+.Sh DESCRIPTION
+preceding text
+.br
+.Bd -centered -offset indent
+first line of the block
+.br
+second line
+.Ed
+following text
diff --git a/regress/mdoc/Bd/centered.out_ascii b/regress/mdoc/Bd/centered.out_ascii
new file mode 100644
index 00000000..1f0bb194
--- /dev/null
+++ b/regress/mdoc/Bd/centered.out_ascii
@@ -0,0 +1,13 @@
+BD-CENTERED(1) General Commands Manual BD-CENTERED(1)
+
+NNAAMMEE
+ BBdd--cceenntteerreedd - centered display blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ preceding text
+
+ first line of the block
+ second line
+ following text
+
+OpenBSD July 28, 2014 OpenBSD
diff --git a/regress/mdoc/Bd/empty.in b/regress/mdoc/Bd/empty.in
new file mode 100644
index 00000000..56506e69
--- /dev/null
+++ b/regress/mdoc/Bd/empty.in
@@ -0,0 +1,20 @@
+.Dd January 2, 2010
+.Dt BD-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-empty
+.Nd empty displays
+.Sh DESCRIPTION
+An empty filled display:
+.Bd -filled
+.Ed
+An empty literal display:
+.Bd -literal
+.Ed
+An empty ragged display:
+.Bd -ragged
+.Ed
+An empty unfilled display:
+.Bd -unfilled
+.Ed
+end of test document
diff --git a/regress/mdoc/Bd/empty.out_ascii b/regress/mdoc/Bd/empty.out_ascii
new file mode 100644
index 00000000..fefe8351
--- /dev/null
+++ b/regress/mdoc/Bd/empty.out_ascii
@@ -0,0 +1,17 @@
+BD-EMPTY(1) General Commands Manual BD-EMPTY(1)
+
+NNAAMMEE
+ BBdd--eemmppttyy - empty displays
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty filled display:
+
+ An empty literal display:
+
+ An empty ragged display:
+
+ An empty unfilled display:
+
+ end of test document
+
+OpenBSD January 2, 2010 OpenBSD
diff --git a/regress/mdoc/Bd/nested.in b/regress/mdoc/Bd/nested.in
new file mode 100644
index 00000000..a5455a61
--- /dev/null
+++ b/regress/mdoc/Bd/nested.in
@@ -0,0 +1,42 @@
+.Dd November 18, 2012
+.Dt BD-NESTED 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-nested
+.Nd nested displays and lists
+.Sh DESCRIPTION
+regular
+text
+.Bd -ragged -offset indent
+outer
+text (default indent)
+.Bd -ragged -offset indent
+inner
+text (default indent)
+.Ed
+outer
+text
+.Ed
+regular
+text
+.Bd -ragged -offset 4n
+outer text (4n)
+.Bd -ragged -offset 2n
+inner text (2n)
+.Ed
+outer text
+.Bl -tag -width 6n
+.It tag
+text
+.El
+outer text
+.Ed
+regular text
+.Bl -tag -width 6n
+.It tag
+outer text
+.Bd -ragged -offset 2n
+inner text (2n)
+.Ed
+outer text
+.El
diff --git a/regress/mdoc/Bd/nested.out_ascii b/regress/mdoc/Bd/nested.out_ascii
new file mode 100644
index 00000000..439611d8
--- /dev/null
+++ b/regress/mdoc/Bd/nested.out_ascii
@@ -0,0 +1,29 @@
+BD-NESTED(1) General Commands Manual BD-NESTED(1)
+
+NNAAMMEE
+ BBdd--nneesstteedd - nested displays and lists
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ outer text (default indent)
+
+ inner text (default indent)
+ outer text
+ regular text
+
+ outer text (4n)
+
+ inner text (2n)
+ outer text
+
+ tag text
+ outer text
+ regular text
+
+ tag outer text
+
+ inner text (2n)
+ outer text
+
+OpenBSD November 18, 2012 OpenBSD
diff --git a/regress/mdoc/Bd/nested.out_lint b/regress/mdoc/Bd/nested.out_lint
new file mode 100644
index 00000000..5476f7d7
--- /dev/null
+++ b/regress/mdoc/Bd/nested.out_lint
@@ -0,0 +1,2 @@
+mandoc: nested.in:13:2: WARNING: nested displays are not portable: Bd in Bd
+mandoc: nested.in:24:2: WARNING: nested displays are not portable: Bd in Bd
diff --git a/regress/mdoc/Bd/offset-empty.in b/regress/mdoc/Bd/offset-empty.in
new file mode 100644
index 00000000..32f2a593
--- /dev/null
+++ b/regress/mdoc/Bd/offset-empty.in
@@ -0,0 +1,31 @@
+.Dd November 20, 2014
+.Dt BD-OFFSET-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-offset-empty
+.Nd no argument specified to Bd offset
+.Sh DESCRIPTION
+.Bd -literal -offset
+Bd literal offset empty
+.Ed
+.Bd -literal -offset left
+Bd literal offset left
+.Ed
+.Bd -literal -offset indent
+Bd literal offset indent
+.Ed
+.Bd -literal -offset indent-two
+Bd literal offset indent-two
+.Ed
+.Bd -literal -offset 4n
+Bd literal offset 4n
+.Ed
+.Bd -literal -offset mystring
+Bd literal offset mystring
+.Ed
+.Bd -literal -offset Ds
+Bd literal offset Ds
+.Ed
+.Bd -literal -offset 78n
+Bd literal offset 78n
+.Ed
diff --git a/regress/mdoc/Bd/offset-empty.out_ascii b/regress/mdoc/Bd/offset-empty.out_ascii
new file mode 100644
index 00000000..e4e2659c
--- /dev/null
+++ b/regress/mdoc/Bd/offset-empty.out_ascii
@@ -0,0 +1,23 @@
+BD-OFFSET-EMPTY(1) General Commands Manual BD-OFFSET-EMPTY(1)
+
+NNAAMMEE
+ BBdd--ooffffsseett--eemmppttyy - no argument specified to Bd offset
+
+DDEESSCCRRIIPPTTIIOONN
+ Bd literal offset empty
+
+ Bd literal offset left
+
+ Bd literal offset indent
+
+ Bd literal offset indent-two
+
+ Bd literal offset 4n
+
+ Bd literal offset mystring
+
+ Bd literal offset Ds
+
+ Bd literal offset 78n
+
+OpenBSD November 20, 2014 OpenBSD
diff --git a/regress/mdoc/Bd/offset-neg.in b/regress/mdoc/Bd/offset-neg.in
new file mode 100644
index 00000000..30f0fe73
--- /dev/null
+++ b/regress/mdoc/Bd/offset-neg.in
@@ -0,0 +1,24 @@
+.Dd December 24, 2014
+.Dt BD-INDENT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-indent
+.Nd indenting display blocks
+.Sh DESCRIPTION
+regular text
+.Bd -ragged -offset 8n
+outer display
+.Bd -ragged -offset -5n
+inner display
+.Ed
+outer display
+.Ed
+regular text
+.Bd -ragged -offset -3n
+outer display
+.Bd -ragged -offset 8n
+inner display
+.Ed
+outer display
+.Ed
+regular text
diff --git a/regress/mdoc/Bd/offset-neg.out_ascii b/regress/mdoc/Bd/offset-neg.out_ascii
new file mode 100644
index 00000000..0ecf61cf
--- /dev/null
+++ b/regress/mdoc/Bd/offset-neg.out_ascii
@@ -0,0 +1,21 @@
+BD-INDENT(1) General Commands Manual BD-INDENT(1)
+
+NNAAMMEE
+ BBdd--iinnddeenntt - indenting display blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ outer display
+
+ inner display
+ outer display
+ regular text
+
+ outer display
+
+ inner display
+ outer display
+ regular text
+
+OpenBSD December 24, 2014 OpenBSD
diff --git a/regress/mdoc/Bd/spacing.in b/regress/mdoc/Bd/spacing.in
new file mode 100644
index 00000000..95d89935
--- /dev/null
+++ b/regress/mdoc/Bd/spacing.in
@@ -0,0 +1,16 @@
+.Dd July 6, 2012
+.Dt BD-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-spacing
+.Nd vertical spacing around display blocks
+.Sh DESCRIPTION
+preceding text
+.Bd -ragged -offset indent
+display block
+.Ed
+text between displays
+.Bd -ragged -offset indent -compact
+compact display block
+.Ed
+following text
diff --git a/regress/mdoc/Bd/spacing.out_ascii b/regress/mdoc/Bd/spacing.out_ascii
new file mode 100644
index 00000000..de8bee5c
--- /dev/null
+++ b/regress/mdoc/Bd/spacing.out_ascii
@@ -0,0 +1,14 @@
+BD-SPACING(1) General Commands Manual BD-SPACING(1)
+
+NNAAMMEE
+ BBdd--ssppaacciinngg - vertical spacing around display blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ preceding text
+
+ display block
+ text between displays
+ compact display block
+ following text
+
+OpenBSD July 6, 2012 OpenBSD
diff --git a/regress/mdoc/Bd/unclosed.in b/regress/mdoc/Bd/unclosed.in
new file mode 100644
index 00000000..17c2c51d
--- /dev/null
+++ b/regress/mdoc/Bd/unclosed.in
@@ -0,0 +1,10 @@
+.Dd July 7, 2014
+.Dt BD-UNCLOSED 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bd-unclosed
+.Nd display still open at the end of the file
+.Sh DESCRIPTION
+before display
+.Bd -ragged -offset indent
+inside display
diff --git a/regress/mdoc/Bd/unclosed.out_ascii b/regress/mdoc/Bd/unclosed.out_ascii
new file mode 100644
index 00000000..edea5b09
--- /dev/null
+++ b/regress/mdoc/Bd/unclosed.out_ascii
@@ -0,0 +1,11 @@
+BD-UNCLOSED(1) General Commands Manual BD-UNCLOSED(1)
+
+NNAAMMEE
+ BBdd--uunncclloosseedd - display still open at the end of the file
+
+DDEESSCCRRIIPPTTIIOONN
+ before display
+
+ inside display
+
+OpenBSD July 7, 2014 OpenBSD
diff --git a/regress/mdoc/Bd/unclosed.out_lint b/regress/mdoc/Bd/unclosed.out_lint
new file mode 100644
index 00000000..8741513e
--- /dev/null
+++ b/regress/mdoc/Bd/unclosed.out_lint
@@ -0,0 +1 @@
+mandoc: unclosed.in:9:2: ERROR: appending missing end of block: Bd
diff --git a/regress/mdoc/Bf/Makefile b/regress/mdoc/Bf/Makefile
new file mode 100644
index 00000000..799c8af9
--- /dev/null
+++ b/regress/mdoc/Bf/Makefile
@@ -0,0 +1,16 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/04 16:11:42 schwarze Exp $
+
+REGRESS_TARGETS = nest multiargs badargs break broken
+LINT_TARGETS = multiargs badargs break broken
+
+# groff-1.22.2 defects:
+# - If the first argument to .Bf is a bad one,
+# no block is opened at all and the .Ef causes another error.
+# - If a font block breaks another block,
+# fonts get mixed up when the other block finally ends.
+
+SKIP_GROFF = badargs break
+
+SKIP_TMAN = break broken
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Bf/badargs.in b/regress/mdoc/Bf/badargs.in
new file mode 100644
index 00000000..7752ae75
--- /dev/null
+++ b/regress/mdoc/Bf/badargs.in
@@ -0,0 +1,20 @@
+.Dd July 4, 2014
+.Dt BF-BADARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bf-badargs
+.Nd font blocks with bad arguments
+.Sh DESCRIPTION
+normal text
+.Bf -emphasis
+emphasis
+.Bf
+no argument
+.Ef
+back to emphasis
+.Bf badarg
+bad argument
+.Ef tail argument
+back to emphasis
+.Ef
+back to normal
diff --git a/regress/mdoc/Bf/badargs.out_ascii b/regress/mdoc/Bf/badargs.out_ascii
new file mode 100644
index 00000000..8d26ac4b
--- /dev/null
+++ b/regress/mdoc/Bf/badargs.out_ascii
@@ -0,0 +1,10 @@
+BF-BADARGS(1) General Commands Manual BF-BADARGS(1)
+
+NNAAMMEE
+ BBff--bbaaddaarrggss - font blocks with bad arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_s no argument _b_a_c_k _t_o _e_m_p_h_a_s_i_s bad argument _b_a_c_k _t_o
+ _e_m_p_h_a_s_i_s back to normal
+
+OpenBSD July 4, 2014 OpenBSD
diff --git a/regress/mdoc/Bf/badargs.out_lint b/regress/mdoc/Bf/badargs.out_lint
new file mode 100644
index 00000000..cdca9c02
--- /dev/null
+++ b/regress/mdoc/Bf/badargs.out_lint
@@ -0,0 +1,3 @@
+mandoc: badargs.in:17:2: ERROR: skipping all arguments: Ef tail argument
+mandoc: badargs.in:11:2: WARNING: missing font type, using \fR: Bf
+mandoc: badargs.in:15:5: WARNING: unknown font type, using \fR: Bf badarg
diff --git a/regress/mdoc/Bf/break.in b/regress/mdoc/Bf/break.in
new file mode 100644
index 00000000..5a905655
--- /dev/null
+++ b/regress/mdoc/Bf/break.in
@@ -0,0 +1,16 @@
+.Dd November 10, 2012
+.Dt BF-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bf-break
+.Nd font block breaking another block
+.Sh DESCRIPTION
+before both
+.Bf Em
+before bracket
+.Bo
+inside both
+.Ef
+after font block
+.Bc
+after both
diff --git a/regress/mdoc/Bf/break.out_ascii b/regress/mdoc/Bf/break.out_ascii
new file mode 100644
index 00000000..6fcd71cf
--- /dev/null
+++ b/regress/mdoc/Bf/break.out_ascii
@@ -0,0 +1,9 @@
+BF-BREAK(1) General Commands Manual BF-BREAK(1)
+
+NNAAMMEE
+ BBff--bbrreeaakk - font block breaking another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both _b_e_f_o_r_e _b_r_a_c_k_e_t _[_i_n_s_i_d_e _b_o_t_h after font block] after both
+
+OpenBSD November 10, 2012 OpenBSD
diff --git a/regress/mdoc/Bf/break.out_lint b/regress/mdoc/Bf/break.out_lint
new file mode 100644
index 00000000..b704d12c
--- /dev/null
+++ b/regress/mdoc/Bf/break.out_lint
@@ -0,0 +1 @@
+mandoc: break.in:13:2: WARNING: blocks badly nested: Bf breaks Bo
diff --git a/regress/mdoc/Bf/broken.in b/regress/mdoc/Bf/broken.in
new file mode 100644
index 00000000..228e4c5f
--- /dev/null
+++ b/regress/mdoc/Bf/broken.in
@@ -0,0 +1,15 @@
+.Dd November 10, 2012
+.Dt BF-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bf-broken
+.Nd font block broken by another block
+.Sh DESCRIPTION
+before both
+.Bo before font block
+.Bf Em
+inside both
+.Bc
+after bracket
+.Ef
+after both
diff --git a/regress/mdoc/Bf/broken.out_ascii b/regress/mdoc/Bf/broken.out_ascii
new file mode 100644
index 00000000..0320ca95
--- /dev/null
+++ b/regress/mdoc/Bf/broken.out_ascii
@@ -0,0 +1,9 @@
+BF-BROKEN(1) General Commands Manual BF-BROKEN(1)
+
+NNAAMMEE
+ BBff--bbrrookkeenn - font block broken by another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both [before font block _i_n_s_i_d_e _b_o_t_h] after bracket after both
+
+OpenBSD November 10, 2012 OpenBSD
diff --git a/regress/mdoc/Bf/broken.out_lint b/regress/mdoc/Bf/broken.out_lint
new file mode 100644
index 00000000..e4f53d53
--- /dev/null
+++ b/regress/mdoc/Bf/broken.out_lint
@@ -0,0 +1 @@
+mandoc: broken.in:12:2: WARNING: blocks badly nested: Bo breaks Bf
diff --git a/regress/mdoc/Bf/multiargs.in b/regress/mdoc/Bf/multiargs.in
new file mode 100644
index 00000000..31837ec5
--- /dev/null
+++ b/regress/mdoc/Bf/multiargs.in
@@ -0,0 +1,32 @@
+.Dd July 4, 2014
+.Dt BF-MULTIARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bf-multiargs
+.Nd font blocks with multiple arguments
+.Sh DESCRIPTION
+normal text
+.Bf -symbolic -emphasis
+symbolic emphasis
+.Ef
+back to normal
+.Bf -symbolic Em
+symbolic Em
+.Ef
+back to normal
+.Bf -symbolic badarg
+symbolic badarg
+.Ef
+back to normal
+.Bf Sy -emphasis
+Sy -emphasis
+.Ef
+back to normal
+.Bf Sy Em
+Sy Em
+.Ef
+back to normal
+.Bf Sy badarg
+Sy Em
+.Ef
+back to normal
diff --git a/regress/mdoc/Bf/multiargs.out_ascii b/regress/mdoc/Bf/multiargs.out_ascii
new file mode 100644
index 00000000..52b89778
--- /dev/null
+++ b/regress/mdoc/Bf/multiargs.out_ascii
@@ -0,0 +1,11 @@
+BF-MULTIARGS(1) General Commands Manual BF-MULTIARGS(1)
+
+NNAAMMEE
+ BBff--mmuullttiiaarrggss - font blocks with multiple arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text ssyymmbboolliicc eemmpphhaassiiss back to normal ssyymmbboolliicc EEmm back to normal
+ ssyymmbboolliicc bbaaddaarrgg back to normal SSyy --eemmpphhaassiiss back to normal SSyy EEmm back to
+ normal SSyy EEmm back to normal
+
+OpenBSD July 4, 2014 OpenBSD
diff --git a/regress/mdoc/Bf/multiargs.out_lint b/regress/mdoc/Bf/multiargs.out_lint
new file mode 100644
index 00000000..031b1e01
--- /dev/null
+++ b/regress/mdoc/Bf/multiargs.out_lint
@@ -0,0 +1,5 @@
+mandoc: multiargs.in:13:15: ERROR: skipping excess arguments: Bf ... Em
+mandoc: multiargs.in:17:15: ERROR: skipping excess arguments: Bf ... badarg
+mandoc: multiargs.in:21:8: ERROR: skipping excess arguments: Bf ... -emphasis
+mandoc: multiargs.in:25:8: ERROR: skipping excess arguments: Bf ... Em
+mandoc: multiargs.in:29:8: ERROR: skipping excess arguments: Bf ... badarg
diff --git a/regress/mdoc/Bf/nest.in b/regress/mdoc/Bf/nest.in
new file mode 100644
index 00000000..90de861a
--- /dev/null
+++ b/regress/mdoc/Bf/nest.in
@@ -0,0 +1,33 @@
+.Dd July 9, 2012
+.Dt BF-NEST 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bf-nest
+.Nd nesting font blocks
+.Sh DESCRIPTION
+normal text
+.Bf -emphasis
+emphasis
+.Bf -literal
+literal
+.Bf -symbolic
+symbolic
+.Bf Em
+Em
+.Bf Li
+Li
+.Bf Sy
+Sy
+.Em in-line \&Em \\fRroman\\fP again \&Em
+.Ef
+back to Li
+.Ef
+back to Em
+.Ef
+back to symbolic
+.Ef
+back to literal
+.Ef
+back to emphasis
+.Ef
+back to normal
diff --git a/regress/mdoc/Bf/nest.out_ascii b/regress/mdoc/Bf/nest.out_ascii
new file mode 100644
index 00000000..117a358d
--- /dev/null
+++ b/regress/mdoc/Bf/nest.out_ascii
@@ -0,0 +1,11 @@
+BF-NEST(1) General Commands Manual BF-NEST(1)
+
+NNAAMMEE
+ BBff--nneesstt - nesting font blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_s literal ssyymmbboolliicc _E_m Li SSyy _i_n_-_l_i_n_e _E_m roman _a_g_a_i_n _E_m
+ back to Li _b_a_c_k _t_o _E_m bbaacckk ttoo ssyymmbboolliicc back to literal _b_a_c_k _t_o _e_m_p_h_a_s_i_s
+ back to normal
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Bk/Makefile b/regress/mdoc/Bk/Makefile
new file mode 100644
index 00000000..cc3f2a7f
--- /dev/null
+++ b/regress/mdoc/Bk/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.7 2015/02/07 16:39:44 schwarze Exp $
+
+REGRESS_TARGETS = badarg break broken inputlines lines synopsis
+LINT_TARGETS = badarg broken
+
+SKIP_TMAN ?= badarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Bk/badarg.in b/regress/mdoc/Bk/badarg.in
new file mode 100644
index 00000000..c3338e70
--- /dev/null
+++ b/regress/mdoc/Bk/badarg.in
@@ -0,0 +1,56 @@
+.Dd June 30, 2010
+.Dt BK-BADARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-badarg
+.Nd bad arguments after Bk
+.Sh SYNOPSIS
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -badarg
+.Op o Ar a
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -lines
+.Op o Ar a
+.Ek tail argument
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -line
+.Op o Ar a
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk
+.Op o Ar a
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -words -murks bogus
+.Op o Ar a
+.Ek
+.Sh DESCRIPTION
+Here is an empty keep:
+.Bk -words
+.Ek
+End of test document.
diff --git a/regress/mdoc/Bk/badarg.out_ascii b/regress/mdoc/Bk/badarg.out_ascii
new file mode 100644
index 00000000..9303d3f0
--- /dev/null
+++ b/regress/mdoc/Bk/badarg.out_ascii
@@ -0,0 +1,25 @@
+BK-BADARG(1) General Commands Manual BK-BADARG(1)
+
+NNAAMMEE
+ BBkk--bbaaddaarrgg - bad arguments after Bk
+
+SSYYNNOOPPSSIISS
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbaaddaarrgg _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+DDEESSCCRRIIPPTTIIOONN
+ Here is an empty keep: End of test document.
+
+OpenBSD June 30, 2010 OpenBSD
diff --git a/regress/mdoc/Bk/badarg.out_lint b/regress/mdoc/Bk/badarg.out_lint
new file mode 100644
index 00000000..16918ae5
--- /dev/null
+++ b/regress/mdoc/Bk/badarg.out_lint
@@ -0,0 +1,6 @@
+mandoc: badarg.in:13:5: ERROR: skipping excess arguments: Bk ... -badarg
+mandoc: badarg.in:22:5: ERROR: skipping excess arguments: Bk ... -lines
+mandoc: badarg.in:24:2: ERROR: skipping all arguments: Ek tail argument
+mandoc: badarg.in:31:5: ERROR: skipping excess arguments: Bk ... -line
+mandoc: badarg.in:49:12: ERROR: skipping excess arguments: Bk ... -murks
+mandoc: badarg.in:54:2: WARNING: empty block: Bk
diff --git a/regress/mdoc/Bk/break.in b/regress/mdoc/Bk/break.in
new file mode 100644
index 00000000..1261978e
--- /dev/null
+++ b/regress/mdoc/Bk/break.in
@@ -0,0 +1,53 @@
+.Dd $Mdocdate: February 8 2017 $
+.Dt BK-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-break
+.Nd handling of word keeps
+.Sh DESCRIPTION
+Even though it is called a word keep,
+.Bk -words
+it will not keep words together in free-form text.
+.Ek
+However, even the noop macro
+.Bk -words
+.No is sufficient to let the keep take effect .
+.Ek
+Even text generated in pre-handlers must be kept together with
+the text following it:
+.Bk -words
+.Xr one 1 No and Xr two 2
+.Ek
+should be on the same line.
+.Pp
+Including the whole output line into the keep is not required,
+including just the macros to be kept together is sufficient:
+.Pp
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Bk -words
+.Op o Ar a
+.Ek
+.Pp
+.Bk -words
+.Nm
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x x x
+.Ar x x x x x x
+.Op o Ar a
+.Ek
+.Pp
+Even text printed without spacing must be kept together
+with the text following it:
+.Pp
+.Bk -words
+.Fn xxxxxxxxxxxxxxxxxxxx "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Pp
+.Fo xxxxxxxxxxxxxxxxxxxx
+.Fa "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Fc
+.Ek
diff --git a/regress/mdoc/Bk/break.out_ascii b/regress/mdoc/Bk/break.out_ascii
new file mode 100644
index 00000000..d39d64dc
--- /dev/null
+++ b/regress/mdoc/Bk/break.out_ascii
@@ -0,0 +1,30 @@
+BK-BREAK(1) General Commands Manual BK-BREAK(1)
+
+NNAAMMEE
+ BBkk--bbrreeaakk - handling of word keeps
+
+DDEESSCCRRIIPPTTIIOONN
+ Even though it is called a word keep, it will not keep words together in
+ free-form text. However, even the noop macro
+ is sufficient to let the keep take effect. Even text generated in pre-
+ handlers must be kept together with the text following it:
+ one(1) and two(2) should be on the same line.
+
+ Including the whole output line into the keep is not required, including
+ just the macros to be kept together is sufficient:
+
+ BBkk--bbrreeaakk _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ BBkk--bbrreeaakk _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [o _a]
+
+ Even text printed without spacing must be kept together with the text
+ following it:
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x
+ _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x, _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x)
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x, _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x)
+
+OpenBSD December 25, 2013 OpenBSD
diff --git a/regress/mdoc/Bk/broken.in b/regress/mdoc/Bk/broken.in
new file mode 100644
index 00000000..baa2651a
--- /dev/null
+++ b/regress/mdoc/Bk/broken.in
@@ -0,0 +1,11 @@
+.Dd February 7, 2015
+.Dt BK-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-broken
+.Nd word keep broken by another block
+.Sh DESCRIPTION
+before keep
+.Bk -words
+.Sh CAVEATS
+next section
diff --git a/regress/mdoc/Bk/broken.out_ascii b/regress/mdoc/Bk/broken.out_ascii
new file mode 100644
index 00000000..4b7eea7a
--- /dev/null
+++ b/regress/mdoc/Bk/broken.out_ascii
@@ -0,0 +1,12 @@
+BK-BROKEN(1) General Commands Manual BK-BROKEN(1)
+
+NNAAMMEE
+ BBkk--bbrrookkeenn - word keep broken by another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before keep
+
+CCAAVVEEAATTSS
+ next section
+
+OpenBSD February 7, 2015 OpenBSD
diff --git a/regress/mdoc/Bk/broken.out_lint b/regress/mdoc/Bk/broken.out_lint
new file mode 100644
index 00000000..a6596506
--- /dev/null
+++ b/regress/mdoc/Bk/broken.out_lint
@@ -0,0 +1,2 @@
+mandoc: broken.in:10:2: ERROR: inserting missing end of block: Sh breaks Bk
+mandoc: broken.in:9:2: WARNING: empty block: Bk
diff --git a/regress/mdoc/Bk/inputlines.in b/regress/mdoc/Bk/inputlines.in
new file mode 100644
index 00000000..50db65fb
--- /dev/null
+++ b/regress/mdoc/Bk/inputlines.in
@@ -0,0 +1,73 @@
+.Dd December 24, 2010
+.Dt BK-INPUTLINES 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-inputlines
+.Nd effect of input lines breaks on word keeps
+.Sh SYNOPSIS
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a Oc Oo No b Oc Oc Pq one line
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo
+.Oo No a Oc Oo No b Oc Oc Pq "break after first Oo"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo
+.No a Oc Oo b Oc Oc Pq "break after second Oo"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a
+.Oc Oo No b Oc Oc Pq "break before first Oc"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a Oc
+.Oo No b Oc Oc Pq "break after first Oc"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo Oo No a Oc Oo
+.No b Oc Oc Pq "break after third Oo"
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a No b Oc
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a
+.No b Oc
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a Oc No b
+.Ek
+.Pp
+.Nm
+.Ar x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.Bk -words
+.Oo a Oc
+.No b
+.Ek
diff --git a/regress/mdoc/Bk/inputlines.out_ascii b/regress/mdoc/Bk/inputlines.out_ascii
new file mode 100644
index 00000000..448872f6
--- /dev/null
+++ b/regress/mdoc/Bk/inputlines.out_ascii
@@ -0,0 +1,37 @@
+BK-INPUTLINES(1) General Commands Manual BK-INPUTLINES(1)
+
+NNAAMMEE
+ BBkk--iinnppuuttlliinneess - effect of input lines breaks on word keeps
+
+SSYYNNOOPPSSIISS
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (one line)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break after first Oo)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break after second Oo)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break before first Oc)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x [[a]
+ [b]] (break after first Oc)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [[a] [b]] (break after third Oo)
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [a b]
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x [a
+ b]
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x
+ [a] b
+
+ BBkk--iinnppuuttlliinneess _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x _x [a]
+ b
+
+OpenBSD December 24, 2010 OpenBSD
diff --git a/regress/mdoc/Bk/lines.in b/regress/mdoc/Bk/lines.in
new file mode 100644
index 00000000..4533242c
--- /dev/null
+++ b/regress/mdoc/Bk/lines.in
@@ -0,0 +1,88 @@
+.Dd April 12, 2010
+.Dt BK-LINES 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-lines
+.Nd handling of line keeps
+.Sh DESCRIPTION
+.Bd -literal
+1
+2
+3
+4
+5
+6
+7
+8
+9
+11
+12
+13
+14
+15
+16
+17
+18
+19
+21
+22
+23
+24
+25
+26
+27
+28
+29
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+.Ed
+.Ss with keep
+.Bk -lines
+.Bd -literal
+1
+2
+3
+4
+5
+6
+7
+8
+9
+11
+12
+13
+14
+15
+16
+17
+18
+19
+21
+22
+23
+24
+25
+26
+27
+28
+29
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+.Ed
+.Ek
diff --git a/regress/mdoc/Bk/lines.out_ascii b/regress/mdoc/Bk/lines.out_ascii
new file mode 100644
index 00000000..544804e4
--- /dev/null
+++ b/regress/mdoc/Bk/lines.out_ascii
@@ -0,0 +1,84 @@
+BK-LINES(1) General Commands Manual BK-LINES(1)
+
+NNAAMMEE
+ BBkk--lliinneess - handling of line keeps
+
+DDEESSCCRRIIPPTTIIOONN
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+
+ wwiitthh kkeeeepp
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+
+OpenBSD April 12, 2010 OpenBSD
diff --git a/regress/mdoc/Bk/synopsis.in b/regress/mdoc/Bk/synopsis.in
new file mode 100644
index 00000000..594f1cb4
--- /dev/null
+++ b/regress/mdoc/Bk/synopsis.in
@@ -0,0 +1,32 @@
+.Dd $Mdocdate: February 8 2017 $
+.Dt BK-SYNOPSIS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bk-synopsis
+.Nd automatic keeps in the synopsis
+.Sh SYNOPSIS
+In the synopsis, almost all macros do not show
+.No the word keep effect they would get in a \&Bk block.
+.Pp
+.Fn xxxxxxxxxxxxxxxxxxxx "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Fo xxxxxxxxxxxxxxxxxxxx
+.Fa "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx
+.Fc
+.Pp
+Only \&Nm, used as a block macro, does:
+.Pp
+.Nm ksh
+.Op Fl +abCefhiklmnpruvXx
+.Op Fl +o Ar option
+.Op Fl c Ar string \*(Ba Fl s \*(Ba Ar file Op Ar argument ...
+.Bk -words
+.Ek
+.Nm ksh
+.Op Fl +abCefhiklmnpruvXx
+.Op Fl +o Ar option
+.Op Fl c Ar string \*(Ba Fl s \*(Ba Ar file Op Ar argument ...
+.Sh DESCRIPTION
+.Nm ksh
+.Op Fl +abCefhiklmnpruvXx
+.Op Fl +o Ar option
+.Op Fl c Ar string \*(Ba Fl s \*(Ba Ar file Op Ar argument ...
diff --git a/regress/mdoc/Bk/synopsis.out_ascii b/regress/mdoc/Bk/synopsis.out_ascii
new file mode 100644
index 00000000..5ace7489
--- /dev/null
+++ b/regress/mdoc/Bk/synopsis.out_ascii
@@ -0,0 +1,27 @@
+BK-SYNOPSIS(1) General Commands Manual BK-SYNOPSIS(1)
+
+NNAAMMEE
+ BBkk--ssyynnooppssiiss - automatic keeps in the synopsis
+
+SSYYNNOOPPSSIISS
+ In the synopsis, almost all macros do not show the word keep effect they
+ would get in a Bk block.
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x,
+ _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x);
+
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x,
+ _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x);
+
+ Only Nm, used as a block macro, does:
+
+ kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n]
+ [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t _._._.]]
+ kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n]
+ [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t _._._.]]
+
+DDEESSCCRRIIPPTTIIOONN
+ kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n] [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t
+ _._._.]]
+
+OpenBSD December 25, 2013 OpenBSD
diff --git a/regress/mdoc/Bl/Makefile b/regress/mdoc/Bl/Makefile
new file mode 100644
index 00000000..3d21a8be
--- /dev/null
+++ b/regress/mdoc/Bl/Makefile
@@ -0,0 +1,38 @@
+# $OpenBSD: Makefile,v 1.31 2016/10/17 19:00:16 schwarze Exp $
+
+REGRESS_TARGETS = item inset diag ohang bullet dash enum hang tag
+REGRESS_TARGETS += column colNoIt extend nested offset secstart
+
+REGRESS_TARGETS += notype multitype badargs
+REGRESS_TARGETS += empty noIt emptyhead emptytag emptyitem multitag
+REGRESS_TARGETS += bareIt bareTa unclosed break breakingIt broken
+
+UTF8_TARGETS = dash
+
+LINT_TARGETS = column notype badargs tag
+LINT_TARGETS += empty noIt emptyhead emptytag emptyitem
+LINT_TARGETS += bareIt bareTa break breakingIt broken
+
+# groff-1.22.3 defects:
+# - lists with missing or late type ruin indentation
+# - empty lists ruin indentation and sometimes cause empty lines
+# - breaking lists continue indefinitely
+# - breaking items sometimes ruin indentation, sometimes abort processing
+# - breaking a list aborts processing
+# - empty -tag item heads lose the blank line and the indentation
+
+SKIP_GROFF ?= notype empty break breakingIt broken emptytag
+
+SKIP_TMAN ?= column colNoIt multitype multitag bareTa break broken
+
+# Fixing the indentation in long .IP and .TP tags in -man -Tascii
+# caused a minor regression in -Tman that is not trivial to fix,
+# so disable the related test for now.
+
+SKIP_TMAN += tag
+
+# Empty heads are still mishandled by -Tman.
+
+SKIP_TMAN += emptyhead emptytag
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Bl/badargs.in b/regress/mdoc/Bl/badargs.in
new file mode 100644
index 00000000..9c825b5e
--- /dev/null
+++ b/regress/mdoc/Bl/badargs.in
@@ -0,0 +1,78 @@
+.Dd February 4, 2015
+.Dt BL-BADARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-badargs
+.Nd list with bad arguments
+.Sh DESCRIPTION
+trailing -offset:
+.Bl -bullet -offset
+.It
+is ignored
+.El
+trailing -width:
+.Bl -bullet -width
+.It
+bullet
+.El
+.Bl -dash -width
+.It
+dash
+.El
+.\" XXX Doesn't work with -Tman yet.
+.\" .Bl -enum -width
+.\" .It
+.\" enum
+.\" .El
+.Bl -hyphen -width
+.It
+hyphen
+.El
+.Bl -hang -width
+.It hang
+item
+.El
+.Bl -tag -width
+.It tag
+Here we need a very long line.
+It must be sufficiently long such that it wraps the line.
+.El
+double type:
+.Bl -bullet -compact -enum
+.It
+bullet enum
+.El
+.Bl -enum -compact -bullet
+.It
+enum bullet
+.El
+unknown arguments:
+.Bl -bullet -bogus args
+.It
+bullet text
+.El
+.Bl -enum -bogus args
+.It
+enum text
+.El
+.Bl -inset -bogus args
+.It inset
+text
+.El
+.Bl -item -bogus args
+.It
+item text
+.El
+.Bl -ohang -bogus args
+.It ohang
+text
+.El
+.Bl -tag -width Ds -bogus args
+.It tag
+text
+.El
+double arguments:
+.Bl -tag -compact -offset 20n -width 20n -compact -offset 2n -width 6n
+.It last
+wins
+.El tail argument
diff --git a/regress/mdoc/Bl/badargs.out_ascii b/regress/mdoc/Bl/badargs.out_ascii
new file mode 100644
index 00000000..ad1707b1
--- /dev/null
+++ b/regress/mdoc/Bl/badargs.out_ascii
@@ -0,0 +1,43 @@
+BL-BADARGS(1) General Commands Manual BL-BADARGS(1)
+
+NNAAMMEE
+ BBll--bbaaddaarrggss - list with bad arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ trailing -offset:
+
+ ++oo is ignored
+ trailing -width:
+
+ ++oo bullet
+
+ -- dash
+
+ -- hyphen
+
+ hang item
+
+ tag
+ Here we need a very long line. It must be sufficiently long such that
+ it wraps the line.
+ double type:
+ ++oo bullet enum
+ 1. enum bullet
+ unknown arguments:
+
+ ++oo bullet text
+
+ 1. enum text
+
+ inset text
+
+ item text
+
+ ohang
+ text
+
+ tag text
+ double arguments:
+ last wins
+
+OpenBSD February 4, 2015 OpenBSD
diff --git a/regress/mdoc/Bl/badargs.out_lint b/regress/mdoc/Bl/badargs.out_lint
new file mode 100644
index 00000000..ac9ee13b
--- /dev/null
+++ b/regress/mdoc/Bl/badargs.out_lint
@@ -0,0 +1,18 @@
+mandoc: badargs.in:78:2: ERROR: skipping all arguments: El tail argument
+mandoc: badargs.in:9:13: WARNING: empty argument, using 0n: Bl -offset
+mandoc: badargs.in:14:13: WARNING: empty argument, using 0n: Bl -width
+mandoc: badargs.in:18:11: WARNING: empty argument, using 0n: Bl -width
+mandoc: badargs.in:27:13: WARNING: empty argument, using 0n: Bl -width
+mandoc: badargs.in:31:11: WARNING: empty argument, using 0n: Bl -width
+mandoc: badargs.in:35:10: WARNING: empty argument, using 0n: Bl -width
+mandoc: badargs.in:41:2: WARNING: skipping duplicate list type: Bl -enum
+mandoc: badargs.in:45:2: WARNING: skipping duplicate list type: Bl -bullet
+mandoc: badargs.in:50:13: ERROR: skipping excess arguments: Bl ... -bogus
+mandoc: badargs.in:54:11: ERROR: skipping excess arguments: Bl ... -bogus
+mandoc: badargs.in:58:12: ERROR: skipping excess arguments: Bl ... -bogus
+mandoc: badargs.in:62:11: ERROR: skipping excess arguments: Bl ... -bogus
+mandoc: badargs.in:66:12: ERROR: skipping excess arguments: Bl ... -bogus
+mandoc: badargs.in:70:20: ERROR: skipping excess arguments: Bl ... -bogus
+mandoc: badargs.in:75:42: WARNING: duplicate argument: Bl -compact
+mandoc: badargs.in:75:51: WARNING: duplicate argument: Bl -offset 2n
+mandoc: badargs.in:75:62: WARNING: duplicate argument: Bl -width 6n
diff --git a/regress/mdoc/Bl/bareIt.in b/regress/mdoc/Bl/bareIt.in
new file mode 100644
index 00000000..ad43c4bf
--- /dev/null
+++ b/regress/mdoc/Bl/bareIt.in
@@ -0,0 +1,15 @@
+.Dd August 16, 2014
+.Dt BL-BAREIT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-bareIt
+.Nd item macro outside list
+.Sh DESCRIPTION
+initial text
+.It argument
+.Bl -dash
+.It
+item
+.El
+.It argument
+final text
diff --git a/regress/mdoc/Bl/bareIt.out_ascii b/regress/mdoc/Bl/bareIt.out_ascii
new file mode 100644
index 00000000..9c625c74
--- /dev/null
+++ b/regress/mdoc/Bl/bareIt.out_ascii
@@ -0,0 +1,12 @@
+BL-BAREIT(1) General Commands Manual BL-BAREIT(1)
+
+NNAAMMEE
+ BBll--bbaarreeIItt - item macro outside list
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ -- item
+ final text
+
+OpenBSD August 16, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/bareIt.out_lint b/regress/mdoc/Bl/bareIt.out_lint
new file mode 100644
index 00000000..8e06273b
--- /dev/null
+++ b/regress/mdoc/Bl/bareIt.out_lint
@@ -0,0 +1,3 @@
+mandoc: bareIt.in:9:2: ERROR: skipping item outside list: It argument
+mandoc: bareIt.in:14:2: ERROR: skipping item outside list: It argument
+mandoc: bareIt.in:9:2: WARNING: skipping paragraph macro: br before Bl
diff --git a/regress/mdoc/Bl/bareTa.in b/regress/mdoc/Bl/bareTa.in
new file mode 100644
index 00000000..12eaf45e
--- /dev/null
+++ b/regress/mdoc/Bl/bareTa.in
@@ -0,0 +1,26 @@
+.Dd November 12, 2012
+.Dt TA-BARE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ta-bare
+.Nd bare tabular column macro
+.Sh DESCRIPTION
+initial text
+.Ta ignored arguments
+middle text
+.Bl -item -offset indent
+.It
+.Ta ignored arguments
+indented text
+.El
+middle text
+.Bl -dash
+.It Ta ignored arguments
+indented text
+.El
+middle text
+.Bl -column "a" "b" -offset indent
+.It a Ta b
+.El
+.It ignored arguments
+final text
diff --git a/regress/mdoc/Bl/bareTa.out_ascii b/regress/mdoc/Bl/bareTa.out_ascii
new file mode 100644
index 00000000..831ffee8
--- /dev/null
+++ b/regress/mdoc/Bl/bareTa.out_ascii
@@ -0,0 +1,18 @@
+TA-BARE(1) General Commands Manual TA-BARE(1)
+
+NNAAMMEE
+ TTaa--bbaarree - bare tabular column macro
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text middle text
+
+ indented text
+ middle text
+
+ -- indented text
+ middle text
+
+ a b
+ final text
+
+OpenBSD November 12, 2012 OpenBSD
diff --git a/regress/mdoc/Bl/bareTa.out_lint b/regress/mdoc/Bl/bareTa.out_lint
new file mode 100644
index 00000000..19cb4ebb
--- /dev/null
+++ b/regress/mdoc/Bl/bareTa.out_lint
@@ -0,0 +1,5 @@
+mandoc: bareTa.in:9:2: ERROR: skipping column outside column list: Ta
+mandoc: bareTa.in:13:2: ERROR: skipping column outside column list: Ta
+mandoc: bareTa.in:18:5: ERROR: skipping column outside column list: Ta
+mandoc: bareTa.in:25:2: ERROR: skipping item outside list: It ignored arguments
+mandoc: bareTa.in:18:2: ERROR: skipping all arguments: It ignored arguments
diff --git a/regress/mdoc/Bl/break.in b/regress/mdoc/Bl/break.in
new file mode 100644
index 00000000..3246fdc7
--- /dev/null
+++ b/regress/mdoc/Bl/break.in
@@ -0,0 +1,77 @@
+.Dd August 20, 2016
+.Dt BL-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-break
+.Nd list breaking another block
+.Sh DESCRIPTION
+before both
+.Bl -enum -offset indent
+.It
+before bracket
+.Bo inside both
+.El
+after list
+.Bc
+in between
+.Bl -enum -offset indent
+.It
+before bracket
+.Bo inside both
+.El
+.It
+stray item
+.Bc
+after both
+.Sh EXAMPLES
+.Bl -enum -offset indent
+.It
+before display
+.Bd -ragged -offset indent
+inside both
+.El
+after display
+.Ed
+in between
+.Bl -enum -offset indent
+.It
+before display
+.Bd -ragged -offset indent
+inside both
+.El
+.It
+stray item
+.Ed
+after both
+.Bl -enum -offset indent
+.It
+before table
+.Bl -column column
+.It column
+.Bd -ragged -offset indent
+inside display
+.El
+first line after table
+second line after table
+.El
+after list
+.Sh DIAGNOSTICS
+.Bl -column column
+.It column
+.Bd -ragged -offset indent
+inside display
+.El
+.Ta stray tab
+after stray tab
+.Ed
+after display
+.Sh CAVEATS
+.Bl -hang
+.It before broken block Bo inside both
+.El
+after list
+.Sh BUGS
+.Bl -enum
+.It before broken block Bo inside both
+.El
+after list
diff --git a/regress/mdoc/Bl/break.out_ascii b/regress/mdoc/Bl/break.out_ascii
new file mode 100644
index 00000000..692711c4
--- /dev/null
+++ b/regress/mdoc/Bl/break.out_ascii
@@ -0,0 +1,49 @@
+BL-BREAK(1) General Commands Manual BL-BREAK(1)
+
+NNAAMMEE
+ BBll--bbrreeaakk - list breaking another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both
+
+ 1. before bracket [inside both after list]
+ in between
+
+ 1. before bracket [inside both
+ stray item]
+ after both
+
+EEXXAAMMPPLLEESS
+ 1. before display
+
+ inside both after display
+ in between
+
+ 1. before display
+
+ inside both
+ stray item
+ after both
+
+ 1. before table
+
+ column
+
+ inside display first line after table second line after
+ table after list
+
+
+DDIIAAGGNNOOSSTTIICCSS
+ column
+
+ inside display after stray tab
+
+ after display
+
+CCAAVVEEAATTSS
+ before broken block [inside both after list]
+
+BBUUGGSS
+ 1.
+
+OpenBSD August 20, 2016 OpenBSD
diff --git a/regress/mdoc/Bl/break.out_lint b/regress/mdoc/Bl/break.out_lint
new file mode 100644
index 00000000..fe099a47
--- /dev/null
+++ b/regress/mdoc/Bl/break.out_lint
@@ -0,0 +1,18 @@
+mandoc: break.in:13:2: WARNING: blocks badly nested: Bl breaks Bo
+mandoc: break.in:21:2: WARNING: blocks badly nested: Bl breaks Bo
+mandoc: break.in:22:2: ERROR: skipping item outside list: It
+mandoc: break.in:32:2: WARNING: blocks badly nested: Bl breaks Bd
+mandoc: break.in:41:2: WARNING: blocks badly nested: Bl breaks Bd
+mandoc: break.in:42:2: ERROR: skipping item outside list: It
+mandoc: break.in:53:2: WARNING: blocks badly nested: Bl breaks Bd
+mandoc: break.in:56:2: WARNING: blocks badly nested: Bl breaks Bd
+mandoc: break.in:58:2: ERROR: inserting missing end of block: Sh breaks Bd
+mandoc: break.in:63:2: WARNING: blocks badly nested: Bl breaks Bd
+mandoc: break.in:64:2: ERROR: skipping column outside column list: Ta
+mandoc: break.in:71:2: WARNING: blocks badly nested: Bl breaks Bo
+mandoc: break.in:73:2: ERROR: inserting missing end of block: Sh breaks Bo
+mandoc: break.in:76:2: WARNING: blocks badly nested: Bl breaks Bo
+mandoc: break.in:75:25: ERROR: appending missing end of block: Bo
+mandoc: break.in:74:2: ERROR: appending missing end of block: Bl
+mandoc: break.in:75:2: WARNING: empty list item: Bl -enum It
+mandoc: break.in:75:2: ERROR: skipping all arguments: It before broken block
diff --git a/regress/mdoc/Bl/breakingIt.in b/regress/mdoc/Bl/breakingIt.in
new file mode 100644
index 00000000..025ea257
--- /dev/null
+++ b/regress/mdoc/Bl/breakingIt.in
@@ -0,0 +1,69 @@
+.Dd February 3, 2015
+.Dt BL-BREAKINGIT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-breakingIt
+.Nd items breaking other blocks
+.Sh DESCRIPTION
+.Ss Breaking partial explicit macros
+.Bl -tag -width Ds
+Stray text.
+.Ao
+More stray text.
+.It tag
+Tagged text.
+.El
+.Bl -bullet
+Stray text.
+.Ao
+More stray text.
+.It
+Bullet point.
+.El
+.Bl -tag -width Ds
+.It tag
+Tagged text.
+.Ao
+More tagged text.
+.It tag2
+Yet more tagged text.
+.El
+.Bl -bullet
+.It
+Item text.
+.Ao
+More item text.
+.It
+Bullet point.
+.El
+.Ss Breaking full explicit macros
+.Bl -tag -width Ds
+Stray text.
+.Bd -ragged -offset indent
+More stray text.
+.It tag
+Tagged text.
+.El
+.Bl -bullet
+Stray text.
+.Bd -ragged -offset indent
+More stray text.
+.It
+Bullet point.
+.El
+.Bl -tag -width Ds
+.It tag
+Tagged text.
+.Bd -ragged -offset indent
+Display text.
+.It tag2
+More tagged text.
+.El
+.Bl -bullet
+.It
+Item text.
+.Bd -ragged -offset indent
+Display text.
+.It
+Bullet point.
+.El
diff --git a/regress/mdoc/Bl/breakingIt.out_ascii b/regress/mdoc/Bl/breakingIt.out_ascii
new file mode 100644
index 00000000..afb57973
--- /dev/null
+++ b/regress/mdoc/Bl/breakingIt.out_ascii
@@ -0,0 +1,47 @@
+BL-BREAKINGIT(1) General Commands Manual BL-BREAKINGIT(1)
+
+NNAAMMEE
+ BBll--bbrreeaakkiinnggIItt - items breaking other blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ BBrreeaakkiinngg ppaarrttiiaall eexxpplliicciitt mmaaccrrooss
+ Stray text. <More stray text.>
+
+ tag Tagged text.
+ Stray text. <More stray text.>
+
+ ++oo Bullet point.
+
+ tag Tagged text. <More tagged text.>
+
+ tag2 Yet more tagged text.
+
+ ++oo Item text. <More item text.>
+
+ ++oo Bullet point.
+
+ BBrreeaakkiinngg ffuullll eexxpplliicciitt mmaaccrrooss
+ Stray text.
+
+ More stray text.
+
+ tag Tagged text.
+ Stray text.
+
+ More stray text.
+
+ ++oo Bullet point.
+
+ tag Tagged text.
+
+ Display text.
+
+ tag2 More tagged text.
+
+ ++oo Item text.
+
+ Display text.
+
+ ++oo Bullet point.
+
+OpenBSD February 3, 2015 OpenBSD
diff --git a/regress/mdoc/Bl/breakingIt.out_lint b/regress/mdoc/Bl/breakingIt.out_lint
new file mode 100644
index 00000000..16a0db6e
--- /dev/null
+++ b/regress/mdoc/Bl/breakingIt.out_lint
@@ -0,0 +1,16 @@
+mandoc: breakingIt.in:13:2: ERROR: inserting missing end of block: It breaks Ao
+mandoc: breakingIt.in:20:2: ERROR: inserting missing end of block: It breaks Ao
+mandoc: breakingIt.in:28:2: ERROR: inserting missing end of block: It breaks Ao
+mandoc: breakingIt.in:36:2: ERROR: inserting missing end of block: It breaks Ao
+mandoc: breakingIt.in:44:2: ERROR: inserting missing end of block: It breaks Bd
+mandoc: breakingIt.in:51:2: ERROR: inserting missing end of block: It breaks Bd
+mandoc: breakingIt.in:59:2: ERROR: inserting missing end of block: It breaks Bd
+mandoc: breakingIt.in:67:2: ERROR: inserting missing end of block: It breaks Bd
+mandoc: breakingIt.in:10:1: WARNING: moving content out of list: text
+mandoc: breakingIt.in:11:2: WARNING: moving content out of list: Ao
+mandoc: breakingIt.in:17:1: WARNING: moving content out of list: text
+mandoc: breakingIt.in:18:2: WARNING: moving content out of list: Ao
+mandoc: breakingIt.in:41:1: WARNING: moving content out of list: text
+mandoc: breakingIt.in:42:2: WARNING: moving content out of list: Bd
+mandoc: breakingIt.in:48:1: WARNING: moving content out of list: text
+mandoc: breakingIt.in:49:2: WARNING: moving content out of list: Bd
diff --git a/regress/mdoc/Bl/broken.in b/regress/mdoc/Bl/broken.in
new file mode 100644
index 00000000..b2cd81e8
--- /dev/null
+++ b/regress/mdoc/Bl/broken.in
@@ -0,0 +1,28 @@
+.Dd February 12, 2015
+.Dt BL-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-broken
+.Nd list broken by another block
+.Sh DESCRIPTION
+before both
+.Bo before list
+.Bl -enum -offset indent
+.It
+inside both
+.Bc
+after bracket
+.El
+after list
+.Bo before list
+.Bl -enum -offset indent
+.It
+inside list
+.Bd -ragged -offset indent
+inside display
+.Bc
+after bracket
+.It
+next item
+.El
+after list
diff --git a/regress/mdoc/Bl/broken.out_ascii b/regress/mdoc/Bl/broken.out_ascii
new file mode 100644
index 00000000..5e6ae847
--- /dev/null
+++ b/regress/mdoc/Bl/broken.out_ascii
@@ -0,0 +1,19 @@
+BL-BROKEN(1) General Commands Manual BL-BROKEN(1)
+
+NNAAMMEE
+ BBll--bbrrookkeenn - list broken by another block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both [before list
+
+ 1. inside both] after bracket
+ after list [before list
+
+ 1. inside list
+
+ inside display] after bracket
+
+ 2. next item
+ after list
+
+OpenBSD February 12, 2015 OpenBSD
diff --git a/regress/mdoc/Bl/broken.out_lint b/regress/mdoc/Bl/broken.out_lint
new file mode 100644
index 00000000..477b7fbc
--- /dev/null
+++ b/regress/mdoc/Bl/broken.out_lint
@@ -0,0 +1,3 @@
+mandoc: broken.in:13:2: WARNING: blocks badly nested: Bo breaks Bl
+mandoc: broken.in:23:2: WARNING: blocks badly nested: Bo breaks Bd
+mandoc: broken.in:25:2: ERROR: inserting missing end of block: It breaks Bd
diff --git a/regress/mdoc/Bl/bullet.in b/regress/mdoc/Bl/bullet.in
new file mode 100644
index 00000000..e189df27
--- /dev/null
+++ b/regress/mdoc/Bl/bullet.in
@@ -0,0 +1,81 @@
+.Dd December 25, 2014
+.Dt BL-BULLET 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-bullet
+.Nd bullet lists
+.Sh DESCRIPTION
+.Bl -bullet -width -4n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width -3n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width -2n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width -1n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 0n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 1n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 2n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 3n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 4n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 5n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 6n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -width 7n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -bullet -compact
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
diff --git a/regress/mdoc/Bl/bullet.out_ascii b/regress/mdoc/Bl/bullet.out_ascii
new file mode 100644
index 00000000..e188f799
--- /dev/null
+++ b/regress/mdoc/Bl/bullet.out_ascii
@@ -0,0 +1,67 @@
+BL-BULLET(1) General Commands Manual BL-BULLET(1)
+
+NNAAMMEE
+ BBll--bbuulllleett - bullet lists
+
+DDEESSCCRRIIPPTTIIOONN
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ ++oo x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+OpenBSD December 25, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/colNoIt.in b/regress/mdoc/Bl/colNoIt.in
new file mode 100644
index 00000000..7c80cf93
--- /dev/null
+++ b/regress/mdoc/Bl/colNoIt.in
@@ -0,0 +1,15 @@
+.Dd August 20, 2016
+.Dt BL-COLNOIT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-colNoIt
+.Nd column lists without item macros
+.Sh DESCRIPTION
+.Bl -column "a" "b"
+.Sy a Ta b
+.Em c Ta d
+.El
+.Bl -column "a" "b"
+a b
+c d
+.El
diff --git a/regress/mdoc/Bl/colNoIt.out_ascii b/regress/mdoc/Bl/colNoIt.out_ascii
new file mode 100644
index 00000000..e61c3334
--- /dev/null
+++ b/regress/mdoc/Bl/colNoIt.out_ascii
@@ -0,0 +1,13 @@
+BL-COLNOIT(1) General Commands Manual BL-COLNOIT(1)
+
+NNAAMMEE
+ BBll--ccoollNNooIItt - column lists without item macros
+
+DDEESSCCRRIIPPTTIIOONN
+ aa b
+ _c d
+
+ a b
+ c d
+
+OpenBSD August 20, 2016 OpenBSD
diff --git a/regress/mdoc/Bl/column.in b/regress/mdoc/Bl/column.in
new file mode 100644
index 00000000..be6ccdca
--- /dev/null
+++ b/regress/mdoc/Bl/column.in
@@ -0,0 +1,105 @@
+.Dd October 14, 2015
+.Dt BL-COLUMN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-column
+.Nd lists with multiple columns
+.Sh DESCRIPTION
+.Bl -column "a"
+.It a
+.El
+.Bl -column "a" "b"
+.It a Ta b
+.El
+.\" avoid "c" which means "cm"
+.Bl -column "a" "b" "cc"
+.It a Ta b Ta cc
+.It a b cc
+.It "a" b cc
+.It "a b" cc
+.It "a b cc"
+.El
+.Bl -column "a" "b" "cc" "d"
+.It a Ta b Ta cc Ta d
+.El
+.Bl -column "a" "b" "cc" "d" "e"
+.It a Ta b Ta cc Ta d Ta e
+.El
+.\" Probing up to the utter limits of groff.
+.\" With more than 5 columns or more than 78 characters per line,
+.\" groff .Bl -column turns completely mad.
+.\" mandoc can do more, but it's no use testing that.
+.Bd -literal
+5 + 35 + 4 + 34 = 78:
+.Ed
+.Bl -column "x35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "x34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+.It x35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ta x34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+.It a Ta b
+.El
+.Bd -literal
+5 + (22+4)*2 + 21 = 78:
+.Ed
+.Bl -column "x22xxxxxxxxxxxxxxxxxxx" "x22xxxxxxxxxxxxxxxxxxx" "x21xxxxxxxxxxxxxxxxxx"
+.It x22xxxxxxxxxxxxxxxxxxx Ta x22xxxxxxxxxxxxxxxxxxx Ta x21xxxxxxxxxxxxxxxxxx
+.It a Ta b Ta c
+.El
+.Bd -literal
+5 + 16 + (4+15)*3 = 78:
+.Ed
+.Bl -column "x16xxxxxxxxxxxxx" "x15xxxxxxxxxxxx" "x15xxxxxxxxxxxx" "x15xxxxxxxxxxxx"
+.It x16xxxxxxxxxxxxx Ta x15xxxxxxxxxxxx Ta x15xxxxxxxxxxxx Ta x15xxxxxxxxxxxx
+.It a Ta b Ta c Ta d
+.El
+.Bd -literal
+5 + 13 + (3+12)*4 = 78:
+.Ed
+.Bl -column "x13xxxxxxxxxx" "x12xxxxxxxxx" "x12xxxxxxxxx" "x12xxxxxxxxx" "x12xxxxxxxxx"
+.It x13xxxxxxxxxx Ta x12xxxxxxxxx Ta x12xxxxxxxxx Ta x12xxxxxxxxx Ta x12xxxxxxxxx
+.It a Ta b Ta c Ta d Ta e
+.El
+.\" Trailing white space in phrases.
+.Bl -column "aaaa" "bbbb"
+.It "a" Ta "b"
+.It "a " Ta "b"
+.It "a " Ta "b"
+.It a b
+.It a b
+.It a b
+.El
+.\" Wrong number of columns.
+.Bl -column "a" "b"
+.It "a"
+.It "a" Ta "b"
+.It "a" Ta "b" Ta "c"
+.It "a" Ta "b" Ta "c" Ta "d"
+.It "a" Ta "b" Ta "c" Ta "d" Ta "e"
+.El
+.\" Mixed tab and Ta
+.Bl -column a b c d
+.It a b c d
+.It a b c Ta d
+.It a b Ta c d
+.It a b Ta c Ta d
+.It a Ta b c d
+.It a Ta b c Ta d
+.It a Ta b Ta c d
+.It a Ta b Ta c Ta d
+.El
+.\" Macros before and after tabs
+.Bl -column "aa" "OpenBSD OpenBSD OpenBSD"
+.It aa Ta Ox Ox Ox Ta tab-tab
+.It aa Ta Ox Ox Ox tab-ta
+.It aa Ox Ox Ox Ta ta-tab
+.It aa Ox Ox Ox ta-ta
+.It aa Ox Ox Ox ta-bl/ta
+.It aa Ox Ox Ox ta/bl-ta
+.It aa Ox Ox Ox ta/bl-bl/ta
+.It aa Ta bb Ta
+ta at eol
+.It aa bb
+tab at eol
+.El
+.\" Interrupted column list
+.Bl -column "aa" -width 6n -compact "bb" "cc"
+.It aa Ta bb Ta cc Ta dd
+.El
diff --git a/regress/mdoc/Bl/column.out_ascii b/regress/mdoc/Bl/column.out_ascii
new file mode 100644
index 00000000..a7c07d32
--- /dev/null
+++ b/regress/mdoc/Bl/column.out_ascii
@@ -0,0 +1,74 @@
+BL-COLUMN(1) General Commands Manual BL-COLUMN(1)
+
+NNAAMMEE
+ BBll--ccoolluummnn - lists with multiple columns
+
+DDEESSCCRRIIPPTTIIOONN
+ a
+
+ a b
+
+ a b cc
+ a b cc
+ a b cc
+ a b cc
+ a b cc
+
+ a b cc d
+
+ a b cc d e
+
+ 5 + 35 + 4 + 34 = 78:
+
+ x35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ a b
+
+ 5 + (22+4)*2 + 21 = 78:
+
+ x22xxxxxxxxxxxxxxxxxxx x22xxxxxxxxxxxxxxxxxxx x21xxxxxxxxxxxxxxxxxx
+ a b c
+
+ 5 + 16 + (4+15)*3 = 78:
+
+ x16xxxxxxxxxxxxx x15xxxxxxxxxxxx x15xxxxxxxxxxxx x15xxxxxxxxxxxx
+ a b c d
+
+ 5 + 13 + (3+12)*4 = 78:
+
+ x13xxxxxxxxxx x12xxxxxxxxx x12xxxxxxxxx x12xxxxxxxxx x12xxxxxxxxx
+ a b c d e
+
+ a b
+ a b
+ a b
+ a b
+ a b
+ a b
+
+ a
+ a b
+ a b c
+ a b cd
+ a b cde
+
+ a b c d
+ a b c d
+ a b c d
+ a b c d
+ a b c d
+ a b c d
+ a b c d
+ a b c d
+
+ aa OpenBSD OpenBSD OpenBSD tab-tab
+ aa OpenBSD OpenBSD Ox tab-ta
+ aa Ox OpenBSD OpenBSD ta-tab
+ aa Ox OpenBSD Ox ta-ta
+ aa Ox OpenBSD OpenBSD ta-bl/ta
+ aa OpenBSD OpenBSD Ox ta/bl-ta
+ aa OpenBSD OpenBSD OpenBSD ta/bl-bl/ta
+ aa bb ta at eol
+ aa bb tab at eol
+ aa bb cc dd
+
+OpenBSD October 14, 2015 OpenBSD
diff --git a/regress/mdoc/Bl/column.out_lint b/regress/mdoc/Bl/column.out_lint
new file mode 100644
index 00000000..eed080bd
--- /dev/null
+++ b/regress/mdoc/Bl/column.out_lint
@@ -0,0 +1,4 @@
+mandoc: column.in:71:2: WARNING: wrong number of cells: 2 columns, 1 cells
+mandoc: column.in:74:2: WARNING: wrong number of cells: 2 columns, 4 cells
+mandoc: column.in:75:2: WARNING: wrong number of cells: 2 columns, 5 cells
+mandoc: column.in:103:18: WARNING: skipping -width argument: Bl -column
diff --git a/regress/mdoc/Bl/dash.in b/regress/mdoc/Bl/dash.in
new file mode 100644
index 00000000..37c8ad1a
--- /dev/null
+++ b/regress/mdoc/Bl/dash.in
@@ -0,0 +1,81 @@
+.Dd December 25, 2014
+.Dt BL-DASH 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-dash
+.Nd dash and hyphen lists
+.Sh DESCRIPTION
+.Bl -dash -width -4n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width -3n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width -2n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width -1n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width 0n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hyphen -width 1n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width 2n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width 3n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hyphen -width 4n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hyphen -width 5n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width 6n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -width 7n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -dash -compact
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
diff --git a/regress/mdoc/Bl/dash.out_ascii b/regress/mdoc/Bl/dash.out_ascii
new file mode 100644
index 00000000..f6677bee
--- /dev/null
+++ b/regress/mdoc/Bl/dash.out_ascii
@@ -0,0 +1,67 @@
+BL-DASH(1) General Commands Manual BL-DASH(1)
+
+NNAAMMEE
+ BBll--ddaasshh - dash and hyphen lists
+
+DDEESSCCRRIIPPTTIIOONN
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+OpenBSD December 25, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/dash.out_utf8 b/regress/mdoc/Bl/dash.out_utf8
new file mode 100644
index 00000000..93abd8d3
--- /dev/null
+++ b/regress/mdoc/Bl/dash.out_utf8
@@ -0,0 +1,67 @@
+BL-DASH(1) General Commands Manual BL-DASH(1)
+
+NNAAMMEE
+ BBll--ddaasshh – dash and hyphen lists
+
+DDEESSCCRRIIPPTTIIOONN
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+ -- x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+OpenBSD December 25, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/diag.in b/regress/mdoc/Bl/diag.in
new file mode 100644
index 00000000..74421ab5
--- /dev/null
+++ b/regress/mdoc/Bl/diag.in
@@ -0,0 +1,54 @@
+.Dd April 8, 2014
+.Dt BL-DIAG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-diag
+.Nd section 4 diagnostic lists
+.Sh DESCRIPTION
+.Bl -diag
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It four
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It quint
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It indent
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It septime
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It achtacht
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It neun_neun
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It zehn__zehn
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -diag
+.It This is a very long text contained in the diag item head, it is \
+so long that it overruns the line -
+and here comes the item body.
+.El
+.Pp
+Check that It is not parsed in Bl:
+.Bl -diag -compact
+.It Nx
+.No Nx
+.It Ox
+.No Ox
+.It Fx
+.No Fx
+.El
diff --git a/regress/mdoc/Bl/diag.out_ascii b/regress/mdoc/Bl/diag.out_ascii
new file mode 100644
index 00000000..9ee7a946
--- /dev/null
+++ b/regress/mdoc/Bl/diag.out_ascii
@@ -0,0 +1,39 @@
+BL-DIAG(1) General Commands Manual BL-DIAG(1)
+
+NNAAMMEE
+ BBll--ddiiaagg - section 4 diagnostic lists
+
+DDEESSCCRRIIPPTTIIOONN
+ ttaagg x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ ffoouurr x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ qquuiinntt x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ iinnddeenntt x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ sseeppttiimmee x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+
+ aacchhttaacchhtt x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+
+ nneeuunn__nneeuunn x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x
+
+ zzeehhnn____zzeehhnn x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x
+
+ TThhiiss iiss aa vveerryy lloonngg tteexxtt ccoonnttaaiinneedd iinn tthhee ddiiaagg iitteemm hheeaadd,, iitt iiss ssoo lloonngg
+ tthhaatt iitt oovveerrrruunnss tthhee lliinnee -- and here comes the item body.
+
+ Check that It is not parsed in Bl:
+ NNxx NetBSD
+ OOxx OpenBSD
+ FFxx FreeBSD
+
+OpenBSD April 8, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/empty.in b/regress/mdoc/Bl/empty.in
new file mode 100644
index 00000000..1ee9c94c
--- /dev/null
+++ b/regress/mdoc/Bl/empty.in
@@ -0,0 +1,41 @@
+.Dd January 2, 2011
+.Dt BL-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-empty
+.Nd empty lists
+.Sh DESCRIPTION
+bullet list:
+.Bl -bullet
+.El
+column list:
+.Bl -column one two
+.El
+dash list:
+.Bl -dash
+.El
+diag list:
+.Bl -diag
+.El
+enum list:
+.Bl -enum
+.El
+hang list:
+.Bl -hang
+.El
+hyphen list:
+.Bl -hyphen
+.El
+inset list:
+.Bl -inset
+.El
+item list:
+.Bl -item
+.El
+ohang list:
+.Bl -ohang
+.El
+tag list:
+.Bl -tag -width Ds
+.El
+end of test document
diff --git a/regress/mdoc/Bl/empty.out_ascii b/regress/mdoc/Bl/empty.out_ascii
new file mode 100644
index 00000000..aba64bbe
--- /dev/null
+++ b/regress/mdoc/Bl/empty.out_ascii
@@ -0,0 +1,20 @@
+BL-EMPTY(1) General Commands Manual BL-EMPTY(1)
+
+NNAAMMEE
+ BBll--eemmppttyy - empty lists
+
+DDEESSCCRRIIPPTTIIOONN
+ bullet list:
+ column list:
+ dash list:
+ diag list:
+ enum list:
+ hang list:
+ hyphen list:
+ inset list:
+ item list:
+ ohang list:
+ tag list:
+ end of test document
+
+OpenBSD January 2, 2011 OpenBSD
diff --git a/regress/mdoc/Bl/empty.out_lint b/regress/mdoc/Bl/empty.out_lint
new file mode 100644
index 00000000..3df60e6d
--- /dev/null
+++ b/regress/mdoc/Bl/empty.out_lint
@@ -0,0 +1,11 @@
+mandoc: empty.in:9:2: WARNING: empty block: Bl
+mandoc: empty.in:12:2: WARNING: empty block: Bl
+mandoc: empty.in:15:2: WARNING: empty block: Bl
+mandoc: empty.in:18:2: WARNING: empty block: Bl
+mandoc: empty.in:21:2: WARNING: empty block: Bl
+mandoc: empty.in:24:2: WARNING: empty block: Bl
+mandoc: empty.in:27:2: WARNING: empty block: Bl
+mandoc: empty.in:30:2: WARNING: empty block: Bl
+mandoc: empty.in:33:2: WARNING: empty block: Bl
+mandoc: empty.in:36:2: WARNING: empty block: Bl
+mandoc: empty.in:39:2: WARNING: empty block: Bl
diff --git a/regress/mdoc/Bl/emptyhead.in b/regress/mdoc/Bl/emptyhead.in
new file mode 100644
index 00000000..7219f969
--- /dev/null
+++ b/regress/mdoc/Bl/emptyhead.in
@@ -0,0 +1,43 @@
+.Dd July 3, 2014
+.Dt BL-EMPTYHEAD 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-emptyhead
+.Nd lists with empty item heads
+.Sh DESCRIPTION
+hang list:
+.Bl -hang -width 6n
+.It tag
+text
+.It
+no tag before this text
+.It tag
+text
+.El
+ohang list:
+.Bl -ohang
+.It tag
+text
+.It
+no tag before this text
+.It tag
+text
+.El
+inset list:
+.Bl -inset
+.It tag
+text
+.It
+no tag before this text
+.It tag
+text
+.El
+diag list:
+.Bl -diag
+.It tag
+text
+.It
+no tag before this text
+.It tag
+text
+.El
diff --git a/regress/mdoc/Bl/emptyhead.out_ascii b/regress/mdoc/Bl/emptyhead.out_ascii
new file mode 100644
index 00000000..3d0d0108
--- /dev/null
+++ b/regress/mdoc/Bl/emptyhead.out_ascii
@@ -0,0 +1,38 @@
+BL-EMPTYHEAD(1) General Commands Manual BL-EMPTYHEAD(1)
+
+NNAAMMEE
+ BBll--eemmppttyyhheeaadd - lists with empty item heads
+
+DDEESSCCRRIIPPTTIIOONN
+ hang list:
+
+ tag text
+
+ no tag before this text
+
+ tag text
+ ohang list:
+
+ tag
+ text
+
+ no tag before this text
+
+ tag
+ text
+ inset list:
+
+ tag text
+
+ no tag before this text
+
+ tag text
+ diag list:
+
+ ttaagg text
+
+ no tag before this text
+
+ ttaagg text
+
+OpenBSD July 3, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/emptyhead.out_lint b/regress/mdoc/Bl/emptyhead.out_lint
new file mode 100644
index 00000000..2d158b72
--- /dev/null
+++ b/regress/mdoc/Bl/emptyhead.out_lint
@@ -0,0 +1,4 @@
+mandoc: emptyhead.in:12:2: WARNING: empty head in list item: Bl -hang It
+mandoc: emptyhead.in:21:2: WARNING: empty head in list item: Bl -ohang It
+mandoc: emptyhead.in:30:2: WARNING: empty head in list item: Bl -inset It
+mandoc: emptyhead.in:39:2: WARNING: empty head in list item: Bl -diag It
diff --git a/regress/mdoc/Bl/emptyitem.in b/regress/mdoc/Bl/emptyitem.in
new file mode 100644
index 00000000..e4f85897
--- /dev/null
+++ b/regress/mdoc/Bl/emptyitem.in
@@ -0,0 +1,39 @@
+.Dd August 10, 2016
+.Dt BL-EMPTYITEM 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-emptyitem
+.Nd lists with fixed heads and empty items
+.Sh DESCRIPTION
+bullet list:
+.Bl -bullet
+.It head argument
+one
+.It
+.It
+three
+.El
+dash list:
+.Bl -dash
+.It
+one
+.It head argument
+.It
+three
+.El
+enum list:
+.Bl -enum
+.It
+one
+.It
+.It head argument
+three
+.El
+hyphen list:
+.Bl -hyphen
+.It Sy head argument
+one
+.It
+.It
+three
+.El
diff --git a/regress/mdoc/Bl/emptyitem.out_ascii b/regress/mdoc/Bl/emptyitem.out_ascii
new file mode 100644
index 00000000..5148c3ce
--- /dev/null
+++ b/regress/mdoc/Bl/emptyitem.out_ascii
@@ -0,0 +1,36 @@
+BL-EMPTYITEM(1) General Commands Manual BL-EMPTYITEM(1)
+
+NNAAMMEE
+ BBll--eemmppttyyiitteemm - lists with fixed heads and empty items
+
+DDEESSCCRRIIPPTTIIOONN
+ bullet list:
+
+ ++oo one
+
+ ++oo
+
+ ++oo three
+ dash list:
+
+ -- one
+
+ --
+
+ -- three
+ enum list:
+
+ 1. one
+
+ 2.
+
+ 3. three
+ hyphen list:
+
+ -- one
+
+ --
+
+ -- three
+
+OpenBSD August 10, 2016 OpenBSD
diff --git a/regress/mdoc/Bl/emptyitem.out_lint b/regress/mdoc/Bl/emptyitem.out_lint
new file mode 100644
index 00000000..1dd9dfea
--- /dev/null
+++ b/regress/mdoc/Bl/emptyitem.out_lint
@@ -0,0 +1,8 @@
+mandoc: emptyitem.in:10:2: ERROR: skipping all arguments: It head argument
+mandoc: emptyitem.in:12:2: WARNING: empty list item: Bl -bullet It
+mandoc: emptyitem.in:20:2: WARNING: empty list item: Bl -dash It
+mandoc: emptyitem.in:20:2: ERROR: skipping all arguments: It head argument
+mandoc: emptyitem.in:28:2: WARNING: empty list item: Bl -enum It
+mandoc: emptyitem.in:29:2: ERROR: skipping all arguments: It head argument
+mandoc: emptyitem.in:34:2: ERROR: skipping all arguments: It Sy
+mandoc: emptyitem.in:36:2: WARNING: empty list item: Bl -hyphen It
diff --git a/regress/mdoc/Bl/emptytag.in b/regress/mdoc/Bl/emptytag.in
new file mode 100644
index 00000000..f155b5c0
--- /dev/null
+++ b/regress/mdoc/Bl/emptytag.in
@@ -0,0 +1,17 @@
+.Dd July 3, 2014
+.Dt BL-EMPTYTAG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-emptytag
+.Nd tag lists with empty item heads
+.Sh DESCRIPTION
+initial text
+.Bl -tag -width 6n
+.It tag
+text
+.It
+no tag before this text
+.It tag
+text
+.El
+final text
diff --git a/regress/mdoc/Bl/emptytag.out_ascii b/regress/mdoc/Bl/emptytag.out_ascii
new file mode 100644
index 00000000..533480b1
--- /dev/null
+++ b/regress/mdoc/Bl/emptytag.out_ascii
@@ -0,0 +1,16 @@
+BL-EMPTYTAG(1) General Commands Manual BL-EMPTYTAG(1)
+
+NNAAMMEE
+ BBll--eemmppttyyttaagg - tag lists with empty item heads
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ tag text
+
+ no tag before this text
+
+ tag text
+ final text
+
+OpenBSD July 3, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/emptytag.out_lint b/regress/mdoc/Bl/emptytag.out_lint
new file mode 100644
index 00000000..72d9d287
--- /dev/null
+++ b/regress/mdoc/Bl/emptytag.out_lint
@@ -0,0 +1 @@
+mandoc: emptytag.in:12:2: WARNING: empty head in list item: Bl -tag It
diff --git a/regress/mdoc/Bl/enum.in b/regress/mdoc/Bl/enum.in
new file mode 100644
index 00000000..e5b1c618
--- /dev/null
+++ b/regress/mdoc/Bl/enum.in
@@ -0,0 +1,81 @@
+.Dd December 25, 2014
+.Dt BL-ENUM 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-enum
+.Nd enumerated lists
+.Sh DESCRIPTION
+.Bl -enum -width -4n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width -3n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width -2n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width -1n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 0n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 1n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 2n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 3n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 4n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 5n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 6n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -width 7n
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -enum -compact
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.It
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
diff --git a/regress/mdoc/Bl/enum.out_ascii b/regress/mdoc/Bl/enum.out_ascii
new file mode 100644
index 00000000..769dc218
--- /dev/null
+++ b/regress/mdoc/Bl/enum.out_ascii
@@ -0,0 +1,67 @@
+BL-ENUM(1) General Commands Manual BL-ENUM(1)
+
+NNAAMMEE
+ BBll--eennuumm - enumerated lists
+
+DDEESSCCRRIIPPTTIIOONN
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+ 1. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 2. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 3. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 4. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 5. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 6. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 7. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 8. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 9. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 10. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 11. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+ 12. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+OpenBSD December 25, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/extend.in b/regress/mdoc/Bl/extend.in
new file mode 100644
index 00000000..0b4dce11
--- /dev/null
+++ b/regress/mdoc/Bl/extend.in
@@ -0,0 +1,31 @@
+.Dd April 12, 2010
+.Dt BL-EXTEND 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-extend
+.Nd extending block headers
+.Sh DESCRIPTION
+.\" explicit quoting does not require macro lines per se
+.Ao
+plain quoted text
+.Ac
+.Bl -tag -width Ds
+.It normal tag
+normal text
+.\" when extending It headers, plain text lines fall back
+.\" into the previous It body; so macro lines are required
+.It Ao
+.No extended tag
+.Ac
+extended text
+.It prefix Ao
+.No prefixed tag
+.Ac
+prefixed text
+.\" postfix after closing macro does not work in old groff
+.\" the whole It header gets lost
+.\" .It prefix Ao
+.\" .No braced tag
+.\" .Ac postfix
+.\" braced text
+.El
diff --git a/regress/mdoc/Bl/extend.out_ascii b/regress/mdoc/Bl/extend.out_ascii
new file mode 100644
index 00000000..6676ea48
--- /dev/null
+++ b/regress/mdoc/Bl/extend.out_ascii
@@ -0,0 +1,18 @@
+BL-EXTEND(1) General Commands Manual BL-EXTEND(1)
+
+NNAAMMEE
+ BBll--eexxtteenndd - extending block headers
+
+DDEESSCCRRIIPPTTIIOONN
+ <plain quoted text>
+
+ normal tag
+ normal text
+
+ <extended tag>
+ extended text
+
+ prefix <prefixed tag>
+ prefixed text
+
+OpenBSD April 12, 2010 OpenBSD
diff --git a/regress/mdoc/Bl/hang.in b/regress/mdoc/Bl/hang.in
new file mode 100644
index 00000000..2b2b7554
--- /dev/null
+++ b/regress/mdoc/Bl/hang.in
@@ -0,0 +1,111 @@
+.Dd December 25, 2014
+.Dt BL-HANG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-hang
+.Nd hanged lists
+.Sh DESCRIPTION
+.Bl -hang -width -4n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width -3n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width -2n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width -1n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 0n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 1n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 2n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 3n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 4n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It four
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It quint
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It indent
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It septime
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It achtacht
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It neun_neun
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It zehn__zehn
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -hang -width 5n
+.It This is a very long text contained in the hanged item head, it is \
+so long that it overruns the line -
+and here comes the item body.
+.El
+Compact hanged list:
+.Bl -hang -width 6n -compact
+.It one
+first line
+.It second
+second line
+.It third_tag
+last line
+.El
+Hanged list without a width:
+.Bl -hang
+.It tag
+text
+.El
diff --git a/regress/mdoc/Bl/hang.out_ascii b/regress/mdoc/Bl/hang.out_ascii
new file mode 100644
index 00000000..04cce936
--- /dev/null
+++ b/regress/mdoc/Bl/hang.out_ascii
@@ -0,0 +1,85 @@
+BL-HANG(1) General Commands Manual BL-HANG(1)
+
+NNAAMMEE
+ BBll--hhaanngg - hanged lists
+
+DDEESSCCRRIIPPTTIIOONN
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x
+
+ four x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x
+
+ quint x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x
+
+ indent x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x
+
+ septime x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x
+
+ achtacht x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x
+
+ neun_neun x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x
+
+ zehn__zehn x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x x x x x x x x
+
+ This is a very long text contained in the hanged item head, it is so long
+ that it overruns the line - and here comes the item body.
+ Compact hanged list:
+ one first line
+ second second line
+ third_tag last line
+ Hanged list without a width:
+
+ tag text
+
+OpenBSD December 25, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/inset.in b/regress/mdoc/Bl/inset.in
new file mode 100644
index 00000000..0376ae63
--- /dev/null
+++ b/regress/mdoc/Bl/inset.in
@@ -0,0 +1,48 @@
+.Dd October 28, 2009
+.Dt BL-INSET 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-inset
+.Nd inset list labels
+.Sh DESCRIPTION
+.Bl -inset
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -inset
+.It four
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -inset
+.It quint
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -inset
+.It indent
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -inset
+.It septime
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -inset
+.It achtacht
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -inset
+.It neun_neun
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -inset
+.It zehn__zehn
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.\" Trailing white space in the head.
+.Bl -inset
+.It "a"
+b
+.It "a "
+b
+.It "a "
+b
+.El
diff --git a/regress/mdoc/Bl/inset.out_ascii b/regress/mdoc/Bl/inset.out_ascii
new file mode 100644
index 00000000..4927df78
--- /dev/null
+++ b/regress/mdoc/Bl/inset.out_ascii
@@ -0,0 +1,37 @@
+BL-INSET(1) General Commands Manual BL-INSET(1)
+
+NNAAMMEE
+ BBll--iinnsseett - inset list labels
+
+DDEESSCCRRIIPPTTIIOONN
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ four x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ quint x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ indent x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ septime x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ achtacht x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+
+ neun_neun x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x
+
+ zehn__zehn x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x x x
+
+ a b
+
+ a b
+
+ a b
+
+OpenBSD October 28, 2009 OpenBSD
diff --git a/regress/mdoc/Bl/item.in b/regress/mdoc/Bl/item.in
new file mode 100644
index 00000000..672e9dc7
--- /dev/null
+++ b/regress/mdoc/Bl/item.in
@@ -0,0 +1,23 @@
+.Dd July 10, 2012
+.Dt BL-ITEM 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-item
+.Nd itemized lists
+.Sh DESCRIPTION
+.Bl -item
+.It
+first line
+.It ignore
+second line
+.It
+third line
+.El
+.Bl -item -compact
+.It
+first line
+.It ignore
+second line
+.It
+third line
+.El
diff --git a/regress/mdoc/Bl/item.out_ascii b/regress/mdoc/Bl/item.out_ascii
new file mode 100644
index 00000000..ae3f4524
--- /dev/null
+++ b/regress/mdoc/Bl/item.out_ascii
@@ -0,0 +1,16 @@
+BL-ITEM(1) General Commands Manual BL-ITEM(1)
+
+NNAAMMEE
+ BBll--iitteemm - itemized lists
+
+DDEESSCCRRIIPPTTIIOONN
+ first line
+
+ second line
+
+ third line
+ first line
+ second line
+ third line
+
+OpenBSD July 10, 2012 OpenBSD
diff --git a/regress/mdoc/Bl/multitag.in b/regress/mdoc/Bl/multitag.in
new file mode 100644
index 00000000..e316c2d4
--- /dev/null
+++ b/regress/mdoc/Bl/multitag.in
@@ -0,0 +1,47 @@
+.Dd April 13, 2010
+.Dt BL-MULTITAG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-multitag
+.Nd lists with multiple successive tags
+.Sh DESCRIPTION
+inset:
+.Bl -inset
+.It first
+.It second
+.It third
+some text
+.It fourth
+.It fifth
+more text
+.El
+tag:
+.Bl -tag -width Ds
+.It first
+.It second
+.It third
+some text
+.It fourth
+.It fifth
+more text
+.El
+inset compact:
+.Bl -inset -compact
+.It first
+.It second
+.It third
+some text
+.It fourth
+.It fifth
+more text
+.El
+tag compact:
+.Bl -tag -width Ds -compact
+.It first
+.It second
+.It third
+some text
+.It fourth
+.It fifth
+more text
+.El
diff --git a/regress/mdoc/Bl/multitag.out_ascii b/regress/mdoc/Bl/multitag.out_ascii
new file mode 100644
index 00000000..3167b587
--- /dev/null
+++ b/regress/mdoc/Bl/multitag.out_ascii
@@ -0,0 +1,42 @@
+BL-MULTITAG(1) General Commands Manual BL-MULTITAG(1)
+
+NNAAMMEE
+ BBll--mmuullttiittaagg - lists with multiple successive tags
+
+DDEESSCCRRIIPPTTIIOONN
+ inset:
+
+ first
+
+ second
+
+ third some text
+
+ fourth
+
+ fifth more text
+ tag:
+
+ first
+
+ second
+
+ third some text
+
+ fourth
+
+ fifth more text
+ inset compact:
+ first
+ second
+ third some text
+ fourth
+ fifth more text
+ tag compact:
+ first
+ second
+ third some text
+ fourth
+ fifth more text
+
+OpenBSD April 13, 2010 OpenBSD
diff --git a/regress/mdoc/Bl/multitype.in b/regress/mdoc/Bl/multitype.in
new file mode 100644
index 00000000..48e8dc11
--- /dev/null
+++ b/regress/mdoc/Bl/multitype.in
@@ -0,0 +1,11 @@
+.Dd October 28, 2009
+.Dt BL-MULTITYPE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-multitype
+.Nd list with multiple types
+.Sh DESCRIPTION
+.Bl -dash -bullet -offset indent
+.It
+Some text.
+.El
diff --git a/regress/mdoc/Bl/multitype.out_ascii b/regress/mdoc/Bl/multitype.out_ascii
new file mode 100644
index 00000000..f22c89cf
--- /dev/null
+++ b/regress/mdoc/Bl/multitype.out_ascii
@@ -0,0 +1,9 @@
+BL-MULTITYPE(1) General Commands Manual BL-MULTITYPE(1)
+
+NNAAMMEE
+ BBll--mmuullttiittyyppee - list with multiple types
+
+DDEESSCCRRIIPPTTIIOONN
+ -- Some text.
+
+OpenBSD October 28, 2009 OpenBSD
diff --git a/regress/mdoc/Bl/nested.in b/regress/mdoc/Bl/nested.in
new file mode 100644
index 00000000..380e2e62
--- /dev/null
+++ b/regress/mdoc/Bl/nested.in
@@ -0,0 +1,83 @@
+.Dd May 19, 2013
+.Dt BL-NESTED 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-nested
+.Nd nested lists
+.Sh DESCRIPTION
+inset:
+.Bl -inset
+.It outer
+list
+.Bl -inset
+.It inner
+list
+.El
+.El
+inset compact:
+.Bl -inset -compact
+.It outer
+list
+.Bl -inset -compact
+.It inner
+list
+.El
+.El
+dash:
+.Bl -dash
+.It
+outer list
+.Bl -dash
+.It
+inner list
+.El
+.El
+dash compact:
+.Bl -dash -compact
+.It
+outer list
+.Bl -dash -compact
+.It
+inner list
+.El
+.El
+tag:
+.Bl -tag -width 4n
+.It outer tag
+outer text
+.Bl -tag -width 4n
+.It inner tag
+inner text
+.El
+outer text
+.El
+.Bl -tag -width 4n
+.It outer tag
+.Bd -ragged -compact
+outer text (display)
+.Ed
+.Bl -tag -width 4n
+.It inner tag
+inner text
+.El
+outer text
+.El
+.Bl -tag -width 4n
+.It outer tag
+.Dl outer text (one-line display)
+.Bl -tag -width 4n
+.It inner tag
+inner text
+.El
+outer text
+.El
+.Bl -tag -width 4n -offset 3n
+.It outer tag (indented 3n)
+outer text
+.Bl -tag -width 4n -offset 6n
+.It inner tag (indented 6n)
+inner text
+.El
+outer text
+.El
+final text
diff --git a/regress/mdoc/Bl/nested.out_ascii b/regress/mdoc/Bl/nested.out_ascii
new file mode 100644
index 00000000..50998896
--- /dev/null
+++ b/regress/mdoc/Bl/nested.out_ascii
@@ -0,0 +1,54 @@
+BL-NESTED(1) General Commands Manual BL-NESTED(1)
+
+NNAAMMEE
+ BBll--nneesstteedd - nested lists
+
+DDEESSCCRRIIPPTTIIOONN
+ inset:
+
+ outer list
+
+ inner list
+ inset compact:
+ outer list
+ inner list
+ dash:
+
+ -- outer list
+
+ -- inner list
+ dash compact:
+ -- outer list
+ -- inner list
+ tag:
+
+ outer tag
+ outer text
+
+ inner tag
+ inner text
+ outer text
+
+ outer tag
+ outer text (display)
+
+ inner tag
+ inner text
+ outer text
+
+ outer tag
+ outer text (one-line display)
+
+ inner tag
+ inner text
+ outer text
+
+ outer tag (indented 3n)
+ outer text
+
+ inner tag (indented 6n)
+ inner text
+ outer text
+ final text
+
+OpenBSD May 19, 2013 OpenBSD
diff --git a/regress/mdoc/Bl/noIt.in b/regress/mdoc/Bl/noIt.in
new file mode 100644
index 00000000..46d8c0d2
--- /dev/null
+++ b/regress/mdoc/Bl/noIt.in
@@ -0,0 +1,24 @@
+.Dd October 6, 2013
+.Dt BL-NOIT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-noIt
+.Nd list missing item macros
+.Sh DESCRIPTION
+.Bl -tag -width Ds
+Stray text.
+.Em More stray text.
+.It tag
+Tagged text.
+.El
+.Bl -bullet
+Stray text.
+.Sm off
+.Em More Sy stray Em text.
+.Sm on
+.It
+Bullet point.
+.El
+.Bl -dash
+Stray text only.
+.El
diff --git a/regress/mdoc/Bl/noIt.out_ascii b/regress/mdoc/Bl/noIt.out_ascii
new file mode 100644
index 00000000..9f603f1c
--- /dev/null
+++ b/regress/mdoc/Bl/noIt.out_ascii
@@ -0,0 +1,15 @@
+BL-NOIT(1) General Commands Manual BL-NOIT(1)
+
+NNAAMMEE
+ BBll--nnooIItt - list missing item macros
+
+DDEESSCCRRIIPPTTIIOONN
+ Stray text. _M_o_r_e _s_t_r_a_y _t_e_x_t_.
+
+ tag Tagged text.
+ Stray text. _M_o_r_essttrraayy_t_e_x_t_.
+
+ ++oo Bullet point.
+ Stray text only.
+
+OpenBSD October 6, 2013 OpenBSD
diff --git a/regress/mdoc/Bl/noIt.out_lint b/regress/mdoc/Bl/noIt.out_lint
new file mode 100644
index 00000000..efe0eeea
--- /dev/null
+++ b/regress/mdoc/Bl/noIt.out_lint
@@ -0,0 +1,8 @@
+mandoc: noIt.in:9:1: WARNING: moving content out of list: text
+mandoc: noIt.in:10:2: WARNING: moving content out of list: Em
+mandoc: noIt.in:15:1: WARNING: moving content out of list: text
+mandoc: noIt.in:16:2: WARNING: moving content out of list: Sm
+mandoc: noIt.in:17:2: WARNING: moving content out of list: Em
+mandoc: noIt.in:17:10: WARNING: moving content out of list: Sy
+mandoc: noIt.in:17:19: WARNING: moving content out of list: Em
+mandoc: noIt.in:23:1: WARNING: moving content out of list: text
diff --git a/regress/mdoc/Bl/notype.in b/regress/mdoc/Bl/notype.in
new file mode 100644
index 00000000..f91583d0
--- /dev/null
+++ b/regress/mdoc/Bl/notype.in
@@ -0,0 +1,26 @@
+.Dd August 10, 2016
+.Dt BL-NOTYPE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-notype
+.Nd lists with late or missing types
+.Sh DESCRIPTION
+late type:
+.Bl -offset indent -bullet
+.It
+Some text.
+.El tail argument
+.Pp
+no type:
+.Bl -offset indent -width Ds
+.It
+Some text.
+.El
+.Pp
+no argument at all:
+.Bl
+.It
+Some text.
+.El
+.Pp
+final text
diff --git a/regress/mdoc/Bl/notype.out_ascii b/regress/mdoc/Bl/notype.out_ascii
new file mode 100644
index 00000000..0f6b2237
--- /dev/null
+++ b/regress/mdoc/Bl/notype.out_ascii
@@ -0,0 +1,21 @@
+BL-NOTYPE(1) General Commands Manual BL-NOTYPE(1)
+
+NNAAMMEE
+ BBll--nnoottyyppee - lists with late or missing types
+
+DDEESSCCRRIIPPTTIIOONN
+ late type:
+
+ ++oo Some text.
+
+ no type:
+
+ Some text.
+
+ no argument at all:
+
+ Some text.
+
+ final text
+
+OpenBSD August 10, 2016 OpenBSD
diff --git a/regress/mdoc/Bl/notype.out_lint b/regress/mdoc/Bl/notype.out_lint
new file mode 100644
index 00000000..cf6fb63a
--- /dev/null
+++ b/regress/mdoc/Bl/notype.out_lint
@@ -0,0 +1,5 @@
+mandoc: notype.in:12:2: ERROR: skipping all arguments: El tail argument
+mandoc: notype.in:9:2: WARNING: list type is not the first argument: Bl -offset
+mandoc: notype.in:15:2: ERROR: missing list type, using -item: Bl
+mandoc: notype.in:15:20: WARNING: skipping -width argument: Bl -item
+mandoc: notype.in:21:2: ERROR: missing list type, using -item: Bl
diff --git a/regress/mdoc/Bl/offset.in b/regress/mdoc/Bl/offset.in
new file mode 100644
index 00000000..9564b105
--- /dev/null
+++ b/regress/mdoc/Bl/offset.in
@@ -0,0 +1,79 @@
+.Dd December 25, 2014
+.Dt BL-OFFSET 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-offset
+.Nd various arguments for Bl offset
+.Sh DESCRIPTION
+.Bl -item -offset
+.It
+Bl item offset empty
+.El
+.Bl -item -offset left
+.It
+Bl item offset left
+.El
+.Bl -item -offset indent
+.It
+Bl item offset indent
+.El
+.Bl -item -offset indent-two
+.It
+Bl item offset indent-two
+.El
+.Bl -item -offset 4n
+.It
+Bl item offset 4n
+.El
+.Bl -item -offset mystring
+.It
+Bl item offset mystring
+.El
+.Bl -item -offset Ds
+.It
+Bl item offset Ds
+.El
+.Bl -item -offset 78n
+.It
+Bl item offset 78n
+.El
+.Bl -item -offset -3n
+.It
+Bl item offset -3n
+.El
+.Bl -tag -width Ds -offset
+.It tag
+Bl tag width Ds offset empty
+.El
+.Bl -tag -width Ds -offset left
+.It tag
+Bl tag width Ds offset left
+.El
+.Bl -tag -width Ds -offset indent
+.It tag
+Bl tag width Ds offset indent
+.El
+.Bl -tag -width Ds -offset indent-two
+.It tag
+Bl tag width Ds offset indent-two
+.El
+.Bl -tag -width Ds -offset 4n
+.It tag
+Bl tag width Ds offset 4n
+.El
+.Bl -tag -width Ds -offset mystring
+.It tag
+Bl tag width Ds offset mystring
+.El
+.Bl -tag -width Ds -offset Ds
+.It tag
+Bl tag width Ds offset Ds
+.El
+.Bl -tag -width Ds -offset 78n
+.It tag
+Bl tag width Ds offset 78n
+.El
+.Bl -tag -width Ds -offset -3n
+.It tag
+Bl tag width Ds offset -3n
+.El
diff --git a/regress/mdoc/Bl/offset.out_ascii b/regress/mdoc/Bl/offset.out_ascii
new file mode 100644
index 00000000..8c871d44
--- /dev/null
+++ b/regress/mdoc/Bl/offset.out_ascii
@@ -0,0 +1,51 @@
+BL-OFFSET(1) General Commands Manual BL-OFFSET(1)
+
+NNAAMMEE
+ BBll--ooffffsseett - various arguments for Bl offset
+
+DDEESSCCRRIIPPTTIIOONN
+ Bl item offset empty
+
+ Bl item offset left
+
+ Bl item offset indent
+
+ Bl item offset indent-two
+
+ Bl item offset 4n
+
+ Bl item offset mystring
+
+ Bl item offset Ds
+
+ Bl
+ item
+ offset
+ 78n
+
+ Bl item offset -3n
+
+ tag Bl tag width Ds offset empty
+
+ tag Bl tag width Ds offset left
+
+ tag Bl tag width Ds offset indent
+
+ tag Bl tag width Ds offset indent-two
+
+ tag Bl tag width Ds offset 4n
+
+ tag Bl tag width Ds offset mystring
+
+ tag Bl tag width Ds offset Ds
+
+ tag Bl
+ tag
+ width
+ Ds
+ offset
+ 78n
+
+ tag Bl tag width Ds offset -3n
+
+OpenBSD December 25, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/ohang.in b/regress/mdoc/Bl/ohang.in
new file mode 100644
index 00000000..af4bdf6d
--- /dev/null
+++ b/regress/mdoc/Bl/ohang.in
@@ -0,0 +1,23 @@
+.Dd July 10, 2012
+.Dt BL-OHANG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-ohang
+.Nd over-hanging lists
+.Sh DESCRIPTION
+.Bl -ohang
+.It first tag
+first line
+.It second tag
+second line
+.It third tag
+third line
+.El
+.Bl -ohang -compact
+.It first tag
+first line
+.It second tag
+second line
+.It third tag
+third line
+.El
diff --git a/regress/mdoc/Bl/ohang.out_ascii b/regress/mdoc/Bl/ohang.out_ascii
new file mode 100644
index 00000000..238958dd
--- /dev/null
+++ b/regress/mdoc/Bl/ohang.out_ascii
@@ -0,0 +1,22 @@
+BL-OHANG(1) General Commands Manual BL-OHANG(1)
+
+NNAAMMEE
+ BBll--oohhaanngg - over-hanging lists
+
+DDEESSCCRRIIPPTTIIOONN
+ first tag
+ first line
+
+ second tag
+ second line
+
+ third tag
+ third line
+ first tag
+ first line
+ second tag
+ second line
+ third tag
+ third line
+
+OpenBSD July 10, 2012 OpenBSD
diff --git a/regress/mdoc/Bl/secstart.in b/regress/mdoc/Bl/secstart.in
new file mode 100644
index 00000000..bd01e036
--- /dev/null
+++ b/regress/mdoc/Bl/secstart.in
@@ -0,0 +1,39 @@
+.Dd November 10, 2014
+.Dt BL-SECSTART 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-secstart
+.Nd nested lists at the beginning of sections
+.Sh DESCRIPTION
+.Ss item
+.Bl -item
+.It
+.Bl -item
+.It
+text
+.El
+.El
+.Ss dash
+.Bl -dash
+.It
+.Bl -dash
+.It
+text
+.El
+.El
+.Ss inset
+.Bl -inset
+.It outer
+.Bl -inset
+.It inner
+text
+.El
+.El
+.Ss tag
+.Bl -tag -width 4n
+.It outer tag
+.Bl -tag -width 4n
+.It inner tag
+text
+.El
+.El
diff --git a/regress/mdoc/Bl/secstart.out_ascii b/regress/mdoc/Bl/secstart.out_ascii
new file mode 100644
index 00000000..269c92ec
--- /dev/null
+++ b/regress/mdoc/Bl/secstart.out_ascii
@@ -0,0 +1,26 @@
+BL-SECSTART(1) General Commands Manual BL-SECSTART(1)
+
+NNAAMMEE
+ BBll--sseeccssttaarrtt - nested lists at the beginning of sections
+
+DDEESSCCRRIIPPTTIIOONN
+ iitteemm
+ text
+
+ ddaasshh
+ --
+
+ -- text
+
+ iinnsseett
+ outer
+
+ inner text
+
+ ttaagg
+ outer tag
+
+ inner tag
+ text
+
+OpenBSD November 10, 2014 OpenBSD
diff --git a/regress/mdoc/Bl/tag.in b/regress/mdoc/Bl/tag.in
new file mode 100644
index 00000000..49cc903e
--- /dev/null
+++ b/regress/mdoc/Bl/tag.in
@@ -0,0 +1,154 @@
+.Dd September 21, 2015
+.Dt BL-TAG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-tag
+.Nd tagged lists
+.Sh DESCRIPTION
+.Bl -tag -width -4n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width -3n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width -2n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width -1n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 0n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 1n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 2n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 3n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 4n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It tag
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It four
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It quint
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It indent
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It septime
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It achtacht
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It neun neun
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It zehn_ zehn
+x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+.El
+.Bl -tag -width 5n
+.It This is a very long text contained in the tag, it is so long \
+that it overruns the line -
+and here comes the item body.
+.El
+.Bl -tag -width 100n
+.It hundred
+text text
+.El
+.Pp
+Trailing white space in the head:
+.Bl -tag -width 5n
+.It "a"
+none
+.It "a "
+one
+.It "a "
+two
+.It "a "
+three
+.It "a "
+four
+.It "a "
+five
+.It "a "
+six
+.It " "
+white space only
+.El
+.Pp
+Non-numeric width specification:
+.Bl -tag -width xxx
+.It tag
+text
+.El
+.Bl -tag -width xxxxxxxxxx
+.It tag
+text
+.El
+.Pp
+Scaling units other than n:
+.Bl -tag -width 4m
+.It tag
+text
+.El
+.Bl -tag -width 800M
+.It tag
+text
+.El
+.Bl -tag -width 14
+.It tag
+text
+.El
+.Pp
+Default width:
+.Bl -tag
+.It tag
+text
+.It long tag
+long text
+.It Sy tag Em with markup
+text
+.El
+.Pp
+Indented list:
+.Bl -tag -offset 6n -width xxx
+.It one
+first text
+.It two
+second text
+.El
+.Pp
+Embedded paragraph:
+.Bl -tag -width Ds
+.It tag
+first paragraph
+.Pp
+second paragraph
+.El
diff --git a/regress/mdoc/Bl/tag.out_ascii b/regress/mdoc/Bl/tag.out_ascii
new file mode 100644
index 00000000..0912d4fa
--- /dev/null
+++ b/regress/mdoc/Bl/tag.out_ascii
@@ -0,0 +1,134 @@
+BL-TAG(1) General Commands Manual BL-TAG(1)
+
+NNAAMMEE
+ BBll--ttaagg - tagged lists
+
+DDEESSCCRRIIPPTTIIOONN
+ tag
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x
+
+ tag
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x
+
+ tag
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x
+
+ tag
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ tag
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x
+
+ tag
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ tag
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x
+
+ tag x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ four x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ quint x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ indent
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ septime
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ achtacht
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ neun neun
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ zehn_ zehn
+ x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
+ x x x x x x x
+
+ This is a very long text contained in the tag, it is so long that it
+ overruns the line -
+ and here comes the item body.
+
+ hundred text
+ text
+
+ Trailing white space in the head:
+
+ a none
+
+ a one
+
+ a two
+
+ a three
+
+ a four
+
+ a
+ five
+
+ a
+ six
+
+ white space only
+
+ Non-numeric width specification:
+
+ tag text
+
+ tag text
+
+ Scaling units other than n:
+
+ tag text
+
+ tag text
+
+ tag
+ text
+
+ Default width:
+
+ tag text
+
+ long tag
+ long text
+
+ ttaagg _w_i_t_h _m_a_r_k_u_p
+ text
+
+ Indented list:
+
+ one first text
+
+ two second text
+
+ Embedded paragraph:
+
+ tag first paragraph
+
+ second paragraph
+
+OpenBSD September 21, 2015 OpenBSD
diff --git a/regress/mdoc/Bl/tag.out_lint b/regress/mdoc/Bl/tag.out_lint
new file mode 100644
index 00000000..01a4a492
--- /dev/null
+++ b/regress/mdoc/Bl/tag.out_lint
@@ -0,0 +1 @@
+mandoc: tag.in:131:2: WARNING: missing -width in -tag list, using 6n: Bl -tag
diff --git a/regress/mdoc/Bl/unclosed.in b/regress/mdoc/Bl/unclosed.in
new file mode 100644
index 00000000..2d35a480
--- /dev/null
+++ b/regress/mdoc/Bl/unclosed.in
@@ -0,0 +1,12 @@
+.Dd January 9, 2011
+.Dt BL-UNCLOSED 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bl-unclosed
+.Nd list lacking an end macro
+.Sh DESCRIPTION
+.Bl -item
+.It
+item
+.Sh SEE ALSO
+.Xr mdoc 7
diff --git a/regress/mdoc/Bl/unclosed.out_ascii b/regress/mdoc/Bl/unclosed.out_ascii
new file mode 100644
index 00000000..3a350004
--- /dev/null
+++ b/regress/mdoc/Bl/unclosed.out_ascii
@@ -0,0 +1,12 @@
+BL-UNCLOSED(1) General Commands Manual BL-UNCLOSED(1)
+
+NNAAMMEE
+ BBll--uunncclloosseedd - list lacking an end macro
+
+DDEESSCCRRIIPPTTIIOONN
+ item
+
+SSEEEE AALLSSOO
+ mdoc(7)
+
+OpenBSD January 9, 2011 OpenBSD
diff --git a/regress/mdoc/Brq/Makefile b/regress/mdoc/Brq/Makefile
new file mode 100644
index 00000000..24f19edf
--- /dev/null
+++ b/regress/mdoc/Brq/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2011/12/04 03:09:25 schwarze Exp $
+
+REGRESS_TARGETS=empty
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Brq/empty.in b/regress/mdoc/Brq/empty.in
new file mode 100644
index 00000000..323df074
--- /dev/null
+++ b/regress/mdoc/Brq/empty.in
@@ -0,0 +1,14 @@
+.Dd October 21, 2010
+.Dt BRQ-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Brq-empty
+.Nd empty implicit enclosure macros
+.Sh DESCRIPTION
+An empty
+.Brq
+and a full
+.Brq user@host
+quotation.
+And another
+.Bro full Brc one .
diff --git a/regress/mdoc/Brq/empty.out_ascii b/regress/mdoc/Brq/empty.out_ascii
new file mode 100644
index 00000000..bb59c247
--- /dev/null
+++ b/regress/mdoc/Brq/empty.out_ascii
@@ -0,0 +1,9 @@
+BRQ-EMPTY(1) General Commands Manual BRQ-EMPTY(1)
+
+NNAAMMEE
+ BBrrqq--eemmppttyy - empty implicit enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty {} and a full {user@host} quotation. And another {full} one.
+
+OpenBSD October 21, 2010 OpenBSD
diff --git a/regress/mdoc/Bx/Makefile b/regress/mdoc/Bx/Makefile
new file mode 100644
index 00000000..b27441d0
--- /dev/null
+++ b/regress/mdoc/Bx/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:45 schwarze Exp $
+
+REGRESS_TARGETS=args
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Bx/args.in b/regress/mdoc/Bx/args.in
new file mode 100644
index 00000000..32530959
--- /dev/null
+++ b/regress/mdoc/Bx/args.in
@@ -0,0 +1,26 @@
+.Dd January 30, 2011
+.Dt BX-ARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bx-args
+.Nd arguments to the BSD macro
+.Sh DESCRIPTION
+no arguments:
+.Bx
+.Pp
+one standard argument:
+.Bx 4.4
+.Pp
+one non-standard argument:
+.Bx nett
+.Pp
+one semi-standard argument:
+.Bx 4.1c
+.Pp
+two standard arguments:
+.Bx 4.3 reno
+.Pp
+more arguments:
+.Bx 4.3 tahoe and some additional words
+.Pp
+end of test document
diff --git a/regress/mdoc/Bx/args.out_ascii b/regress/mdoc/Bx/args.out_ascii
new file mode 100644
index 00000000..9f45970e
--- /dev/null
+++ b/regress/mdoc/Bx/args.out_ascii
@@ -0,0 +1,21 @@
+BX-ARGS(1) General Commands Manual BX-ARGS(1)
+
+NNAAMMEE
+ BBxx--aarrggss - arguments to the BSD macro
+
+DDEESSCCRRIIPPTTIIOONN
+ no arguments: BSD
+
+ one standard argument: 4.4BSD
+
+ one non-standard argument: nettBSD
+
+ one semi-standard argument: 4.1cBSD
+
+ two standard arguments: 4.3BSD-Reno
+
+ more arguments: 4.3BSD-Tahoe and some additional words
+
+ end of test document
+
+OpenBSD January 30, 2011 OpenBSD
diff --git a/regress/mdoc/Cd/Makefile b/regress/mdoc/Cd/Makefile
new file mode 100644
index 00000000..164e5964
--- /dev/null
+++ b/regress/mdoc/Cd/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.5 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = noarg font eos
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Cd/eos.in b/regress/mdoc/Cd/eos.in
new file mode 100644
index 00000000..9f83b8fc
--- /dev/null
+++ b/regress/mdoc/Cd/eos.in
@@ -0,0 +1,10 @@
+.Dd November 17, 2012
+.Dt CD-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cd-eos
+.Nd end of sentence handling after the configuration directive macro
+.Sh DESCRIPTION
+Do not use
+.Cd options INSECURE .
+It is insecure.
diff --git a/regress/mdoc/Cd/eos.out_ascii b/regress/mdoc/Cd/eos.out_ascii
new file mode 100644
index 00000000..4e0b1bea
--- /dev/null
+++ b/regress/mdoc/Cd/eos.out_ascii
@@ -0,0 +1,9 @@
+CD-EOS(1) General Commands Manual CD-EOS(1)
+
+NNAAMMEE
+ CCdd--eeooss - end of sentence handling after the configuration directive macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Do not use ooppttiioonnss IINNSSEECCUURREE. It is insecure.
+
+OpenBSD November 17, 2012 OpenBSD
diff --git a/regress/mdoc/Cd/font.in b/regress/mdoc/Cd/font.in
new file mode 100644
index 00000000..716794eb
--- /dev/null
+++ b/regress/mdoc/Cd/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt CD-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cd-font
+.Nd changing fonts inside the configuration declaration macro
+.Sh DESCRIPTION
+normal text
+.Cd bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Cd/font.out_ascii b/regress/mdoc/Cd/font.out_ascii
new file mode 100644
index 00000000..8949462b
--- /dev/null
+++ b/regress/mdoc/Cd/font.out_ascii
@@ -0,0 +1,9 @@
+CD-FONT(1) General Commands Manual CD-FONT(1)
+
+NNAAMMEE
+ CCdd--ffoonntt - changing fonts inside the configuration declaration macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Cd/noarg.in b/regress/mdoc/Cd/noarg.in
new file mode 100644
index 00000000..7190ebea
--- /dev/null
+++ b/regress/mdoc/Cd/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt CD-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cd-noarg
+.Nd kernel configuration directive without arguments
+.Sh DESCRIPTION
+with arguments:
+.Cd wd* at pciide?
+without arguments:
+.Cd
+end of test document
diff --git a/regress/mdoc/Cd/noarg.out_ascii b/regress/mdoc/Cd/noarg.out_ascii
new file mode 100644
index 00000000..eefae539
--- /dev/null
+++ b/regress/mdoc/Cd/noarg.out_ascii
@@ -0,0 +1,9 @@
+CD-NOARG(1) General Commands Manual CD-NOARG(1)
+
+NNAAMMEE
+ CCdd--nnooaarrgg - kernel configuration directive without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ with arguments: wwdd** aatt ppcciiiiddee?? without arguments: end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Cd/noarg.out_lint b/regress/mdoc/Cd/noarg.out_lint
new file mode 100644
index 00000000..41599d9b
--- /dev/null
+++ b/regress/mdoc/Cd/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Cd
diff --git a/regress/mdoc/Cm/Makefile b/regress/mdoc/Cm/Makefile
new file mode 100644
index 00000000..e674e756
--- /dev/null
+++ b/regress/mdoc/Cm/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = basic font noarg
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Cm/basic.in b/regress/mdoc/Cm/basic.in
new file mode 100644
index 00000000..2fba179c
--- /dev/null
+++ b/regress/mdoc/Cm/basic.in
@@ -0,0 +1,12 @@
+.Dd July 6, 2012
+.Dt CM-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cm-basic
+.Nd basic usage of the Cm macro
+.Sh DESCRIPTION
+end of line:
+.Nm mt Fl f Ar device Cm rewind
+.Pp
+middle of line:
+.Nm ps Fl o Cm pid , Ns Cm command
diff --git a/regress/mdoc/Cm/basic.out_ascii b/regress/mdoc/Cm/basic.out_ascii
new file mode 100644
index 00000000..98899c00
--- /dev/null
+++ b/regress/mdoc/Cm/basic.out_ascii
@@ -0,0 +1,11 @@
+CM-BASIC(1) General Commands Manual CM-BASIC(1)
+
+NNAAMMEE
+ CCmm--bbaassiicc - basic usage of the Cm macro
+
+DDEESSCCRRIIPPTTIIOONN
+ end of line: mmtt --ff _d_e_v_i_c_e rreewwiinndd
+
+ middle of line: ppss --oo ppiidd,ccoommmmaanndd
+
+OpenBSD July 6, 2012 OpenBSD
diff --git a/regress/mdoc/Cm/font.in b/regress/mdoc/Cm/font.in
new file mode 100644
index 00000000..db58f6dd
--- /dev/null
+++ b/regress/mdoc/Cm/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt CM-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cm-font
+.Nd changing fonts inside the command modifier macro
+.Sh DESCRIPTION
+normal text
+.Cm bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Cm/font.out_ascii b/regress/mdoc/Cm/font.out_ascii
new file mode 100644
index 00000000..ae48e4b1
--- /dev/null
+++ b/regress/mdoc/Cm/font.out_ascii
@@ -0,0 +1,9 @@
+CM-FONT(1) General Commands Manual CM-FONT(1)
+
+NNAAMMEE
+ CCmm--ffoonntt - changing fonts inside the command modifier macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Cm/noarg.in b/regress/mdoc/Cm/noarg.in
new file mode 100644
index 00000000..750ce84c
--- /dev/null
+++ b/regress/mdoc/Cm/noarg.in
@@ -0,0 +1,12 @@
+.Dd July 2, 2014
+.Dt CM-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Cm-noarg
+.Nd command modifier macro without arguments
+.Sh DESCRIPTION
+end of line:
+.Nm mt Fl f Ar device Cm
+.Pp
+middle of line:
+.Nm ps Fl x Cm Fl o Cm command
diff --git a/regress/mdoc/Cm/noarg.out_ascii b/regress/mdoc/Cm/noarg.out_ascii
new file mode 100644
index 00000000..83186d1c
--- /dev/null
+++ b/regress/mdoc/Cm/noarg.out_ascii
@@ -0,0 +1,11 @@
+CM-NOARG(1) General Commands Manual CM-NOARG(1)
+
+NNAAMMEE
+ CCmm--nnooaarrgg - command modifier macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ end of line: mmtt --ff _d_e_v_i_c_e
+
+ middle of line: ppss --xx --oo ccoommmmaanndd
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Cm/noarg.out_lint b/regress/mdoc/Cm/noarg.out_lint
new file mode 100644
index 00000000..3a828e5a
--- /dev/null
+++ b/regress/mdoc/Cm/noarg.out_lint
@@ -0,0 +1,2 @@
+mandoc: noarg.in:9:23: WARNING: skipping empty macro: Cm
+mandoc: noarg.in:12:13: WARNING: skipping empty macro: Cm
diff --git a/regress/mdoc/D1/Makefile b/regress/mdoc/D1/Makefile
new file mode 100644
index 00000000..bed27d1b
--- /dev/null
+++ b/regress/mdoc/D1/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2015/02/06 02:04:35 schwarze Exp $
+
+REGRESS_TARGETS = spacing
+LINT_TARGETS = spacing
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/D1/spacing.in b/regress/mdoc/D1/spacing.in
new file mode 100644
index 00000000..3303dccc
--- /dev/null
+++ b/regress/mdoc/D1/spacing.in
@@ -0,0 +1,12 @@
+.Dd February 5, 2015
+.Dt D1-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm D1-spacing
+.Nd spacing in and around one-line displays
+.Sh DESCRIPTION
+preceding text
+.D1 spacing in and around one-line displays
+empty display:
+.D1
+following text
diff --git a/regress/mdoc/D1/spacing.out_ascii b/regress/mdoc/D1/spacing.out_ascii
new file mode 100644
index 00000000..becef1b8
--- /dev/null
+++ b/regress/mdoc/D1/spacing.out_ascii
@@ -0,0 +1,12 @@
+D1-SPACING(1) General Commands Manual D1-SPACING(1)
+
+NNAAMMEE
+ DD11--ssppaacciinngg - spacing in and around one-line displays
+
+DDEESSCCRRIIPPTTIIOONN
+ preceding text
+ spacing in and around one-line displays
+ empty display:
+ following text
+
+OpenBSD February 5, 2015 OpenBSD
diff --git a/regress/mdoc/D1/spacing.out_lint b/regress/mdoc/D1/spacing.out_lint
new file mode 100644
index 00000000..08177734
--- /dev/null
+++ b/regress/mdoc/D1/spacing.out_lint
@@ -0,0 +1 @@
+mandoc: spacing.in:11:2: WARNING: empty block: D1
diff --git a/regress/mdoc/Db/Makefile b/regress/mdoc/Db/Makefile
new file mode 100644
index 00000000..c37822ff
--- /dev/null
+++ b/regress/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/mdoc/Db/args.in b/regress/mdoc/Db/args.in
new file mode 100644
index 00000000..b40d7b0c
--- /dev/null
+++ b/regress/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/mdoc/Db/args.out_ascii b/regress/mdoc/Db/args.out_ascii
new file mode 100644
index 00000000..909b91ba
--- /dev/null
+++ b/regress/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/mdoc/Db/args.out_lint b/regress/mdoc/Db/args.out_lint
new file mode 100644
index 00000000..e0eb44ae
--- /dev/null
+++ b/regress/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/mdoc/Dd/Makefile b/regress/mdoc/Dd/Makefile
new file mode 100644
index 00000000..e50e9b61
--- /dev/null
+++ b/regress/mdoc/Dd/Makefile
@@ -0,0 +1,19 @@
+# $OpenBSD: Makefile,v 1.2 2014/11/21 01:52:45 schwarze Exp $
+
+REGRESS_TARGETS = badarg dupe late long manarg noarg order
+LINT_TARGETS = badarg dupe late long manarg noarg order
+
+# If groff finds exactly three arguments, it assumes they are month,
+# day and year without further checking. If there are no arguments,
+# groff uses the string "Epoch". Otherwise, it silently falls back
+# to today's date.
+# That is not at all sane behaviour, we are not going to imitate it.
+
+SKIP_GROFF = badarg long manarg noarg
+SKIP_ASCII = noarg
+
+# Autodetection fails for late .Dd, so specify -mdoc explicitly.
+
+MOPTS += -mdoc
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Dd/badarg.in b/regress/mdoc/Dd/badarg.in
new file mode 100644
index 00000000..9891fc4e
--- /dev/null
+++ b/regress/mdoc/Dd/badarg.in
@@ -0,0 +1,8 @@
+.Dd "bad date"
+.Dt DD-BADARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dd-badarg
+.Nd date cannot be parsed
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dd/badarg.out_ascii b/regress/mdoc/Dd/badarg.out_ascii
new file mode 100644
index 00000000..a64abacc
--- /dev/null
+++ b/regress/mdoc/Dd/badarg.out_ascii
@@ -0,0 +1,9 @@
+DD-BADARG(1) General Commands Manual DD-BADARG(1)
+
+NNAAMMEE
+ DDdd--bbaaddaarrgg - date cannot be parsed
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD bad date OpenBSD
diff --git a/regress/mdoc/Dd/badarg.out_lint b/regress/mdoc/Dd/badarg.out_lint
new file mode 100644
index 00000000..0ce4632e
--- /dev/null
+++ b/regress/mdoc/Dd/badarg.out_lint
@@ -0,0 +1 @@
+mandoc: badarg.in:1:2: WARNING: cannot parse date, using it verbatim: bad date
diff --git a/regress/mdoc/Dd/dupe.in b/regress/mdoc/Dd/dupe.in
new file mode 100644
index 00000000..d1a7f827
--- /dev/null
+++ b/regress/mdoc/Dd/dupe.in
@@ -0,0 +1,11 @@
+.Dd August 1, 2014
+.Dt DD-DUPE 1
+.Os OpenBSD
+.Dd August 3, 2014
+.Sh NAME
+.Nm Dd-dupe
+.Nd duplicate date macro
+.Sh DESCRIPTION
+initial text
+.Dd August 5, 2014
+final text
diff --git a/regress/mdoc/Dd/dupe.out_ascii b/regress/mdoc/Dd/dupe.out_ascii
new file mode 100644
index 00000000..6cc220d6
--- /dev/null
+++ b/regress/mdoc/Dd/dupe.out_ascii
@@ -0,0 +1,9 @@
+DD-DUPE(1) General Commands Manual DD-DUPE(1)
+
+NNAAMMEE
+ DDdd--dduuppee - duplicate date macro
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dd/dupe.out_lint b/regress/mdoc/Dd/dupe.out_lint
new file mode 100644
index 00000000..8107e867
--- /dev/null
+++ b/regress/mdoc/Dd/dupe.out_lint
@@ -0,0 +1,2 @@
+mandoc: dupe.in:4:2: WARNING: duplicate prologue macro: Dd
+mandoc: dupe.in:10:2: WARNING: duplicate prologue macro: Dd
diff --git a/regress/mdoc/Dd/late.in b/regress/mdoc/Dd/late.in
new file mode 100644
index 00000000..0a8436fb
--- /dev/null
+++ b/regress/mdoc/Dd/late.in
@@ -0,0 +1,9 @@
+.Dt DD-LATE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dd-late
+.Nd late date macro
+.Sh DESCRIPTION
+initial text
+.Dd August 5, 2014
+final text
diff --git a/regress/mdoc/Dd/late.out_ascii b/regress/mdoc/Dd/late.out_ascii
new file mode 100644
index 00000000..381b4ef3
--- /dev/null
+++ b/regress/mdoc/Dd/late.out_ascii
@@ -0,0 +1,9 @@
+DD-LATE(1) General Commands Manual DD-LATE(1)
+
+NNAAMMEE
+ DDdd--llaattee - late date macro
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dd/late.out_lint b/regress/mdoc/Dd/late.out_lint
new file mode 100644
index 00000000..07374131
--- /dev/null
+++ b/regress/mdoc/Dd/late.out_lint
@@ -0,0 +1 @@
+mandoc: late.in:8:2: WARNING: late prologue macro: Dd
diff --git a/regress/mdoc/Dd/long.in b/regress/mdoc/Dd/long.in
new file mode 100644
index 00000000..2538f984
--- /dev/null
+++ b/regress/mdoc/Dd/long.in
@@ -0,0 +1,8 @@
+.Dd 1234567890123456789012345678901234567890123456789012345678901234567890123456789
+.Dt DD-LONG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dd-long
+.Nd long date string
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dd/long.out_ascii b/regress/mdoc/Dd/long.out_ascii
new file mode 100644
index 00000000..69811af2
--- /dev/null
+++ b/regress/mdoc/Dd/long.out_ascii
@@ -0,0 +1,11 @@
+DD-LONG(1) General Commands Manual DD-LONG(1)
+
+NNAAMMEE
+ DDdd--lloonngg - long date string
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD
+1234567890123456789012345678901234567890123456789012345678901234567890123456789
+ OpenBSD
diff --git a/regress/mdoc/Dd/long.out_lint b/regress/mdoc/Dd/long.out_lint
new file mode 100644
index 00000000..d74ed9e2
--- /dev/null
+++ b/regress/mdoc/Dd/long.out_lint
@@ -0,0 +1 @@
+mandoc: long.in:1:2: WARNING: cannot parse date, using it verbatim: 1234567890123456789012345678901234567890123456789012345678901234567890123456789
diff --git a/regress/mdoc/Dd/manarg.in b/regress/mdoc/Dd/manarg.in
new file mode 100644
index 00000000..434a7af8
--- /dev/null
+++ b/regress/mdoc/Dd/manarg.in
@@ -0,0 +1,8 @@
+.Dd 2014-08-07
+.Dt DD-MANARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dd-manarg
+.Nd date in traditional man format
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dd/manarg.out_ascii b/regress/mdoc/Dd/manarg.out_ascii
new file mode 100644
index 00000000..8c4b800f
--- /dev/null
+++ b/regress/mdoc/Dd/manarg.out_ascii
@@ -0,0 +1,9 @@
+DD-MANARG(1) General Commands Manual DD-MANARG(1)
+
+NNAAMMEE
+ DDdd--mmaannaarrgg - date in traditional man format
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD 2014-08-07 OpenBSD
diff --git a/regress/mdoc/Dd/manarg.out_lint b/regress/mdoc/Dd/manarg.out_lint
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/regress/mdoc/Dd/manarg.out_lint
diff --git a/regress/mdoc/Dd/noarg.in b/regress/mdoc/Dd/noarg.in
new file mode 100644
index 00000000..fd904985
--- /dev/null
+++ b/regress/mdoc/Dd/noarg.in
@@ -0,0 +1,8 @@
+.Dd
+.Dt DD-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dd-noarg
+.Nd date macro without an argument
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dd/noarg.out_lint b/regress/mdoc/Dd/noarg.out_lint
new file mode 100644
index 00000000..f2816336
--- /dev/null
+++ b/regress/mdoc/Dd/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:1:2: WARNING: missing date, using today's date
diff --git a/regress/mdoc/Dd/order.in b/regress/mdoc/Dd/order.in
new file mode 100644
index 00000000..e3872cbb
--- /dev/null
+++ b/regress/mdoc/Dd/order.in
@@ -0,0 +1,8 @@
+.Dt DD-ORDER 1
+.Dd August 5, 2014
+.Os OpenBSD
+.Sh NAME
+.Nm Dd-order
+.Nd date macro after title macro
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dd/order.out_ascii b/regress/mdoc/Dd/order.out_ascii
new file mode 100644
index 00000000..64c7925d
--- /dev/null
+++ b/regress/mdoc/Dd/order.out_ascii
@@ -0,0 +1,9 @@
+DD-ORDER(1) General Commands Manual DD-ORDER(1)
+
+NNAAMMEE
+ DDdd--oorrddeerr - date macro after title macro
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dd/order.out_lint b/regress/mdoc/Dd/order.out_lint
new file mode 100644
index 00000000..92554a18
--- /dev/null
+++ b/regress/mdoc/Dd/order.out_lint
@@ -0,0 +1 @@
+mandoc: order.in:2:2: WARNING: prologue macros out of order: Dd after Dt
diff --git a/regress/mdoc/Dl/Makefile b/regress/mdoc/Dl/Makefile
new file mode 100644
index 00000000..bed27d1b
--- /dev/null
+++ b/regress/mdoc/Dl/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2015/02/06 02:04:35 schwarze Exp $
+
+REGRESS_TARGETS = spacing
+LINT_TARGETS = spacing
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Dl/spacing.in b/regress/mdoc/Dl/spacing.in
new file mode 100644
index 00000000..cc683872
--- /dev/null
+++ b/regress/mdoc/Dl/spacing.in
@@ -0,0 +1,12 @@
+.Dd February 5, 2015
+.Dt DL-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dl-spacing
+.Nd spacing in and around one-line literal displays
+.Sh DESCRIPTION
+preceding text
+.Dl spacing in and around one-line literal displays
+empty display:
+.Dl
+following text
diff --git a/regress/mdoc/Dl/spacing.out_ascii b/regress/mdoc/Dl/spacing.out_ascii
new file mode 100644
index 00000000..db5958da
--- /dev/null
+++ b/regress/mdoc/Dl/spacing.out_ascii
@@ -0,0 +1,12 @@
+DL-SPACING(1) General Commands Manual DL-SPACING(1)
+
+NNAAMMEE
+ DDll--ssppaacciinngg - spacing in and around one-line literal displays
+
+DDEESSCCRRIIPPTTIIOONN
+ preceding text
+ spacing in and around one-line literal displays
+ empty display:
+ following text
+
+OpenBSD February 5, 2015 OpenBSD
diff --git a/regress/mdoc/Dl/spacing.out_lint b/regress/mdoc/Dl/spacing.out_lint
new file mode 100644
index 00000000..7ee4919d
--- /dev/null
+++ b/regress/mdoc/Dl/spacing.out_lint
@@ -0,0 +1 @@
+mandoc: spacing.in:11:2: WARNING: empty block: Dl
diff --git a/regress/mdoc/Dq/Makefile b/regress/mdoc/Dq/Makefile
new file mode 100644
index 00000000..24f19edf
--- /dev/null
+++ b/regress/mdoc/Dq/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2011/12/04 03:09:25 schwarze Exp $
+
+REGRESS_TARGETS=empty
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Dq/empty.in b/regress/mdoc/Dq/empty.in
new file mode 100644
index 00000000..6e228898
--- /dev/null
+++ b/regress/mdoc/Dq/empty.in
@@ -0,0 +1,14 @@
+.Dd October 21, 2010
+.Dt DQ-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dq-empty
+.Nd empty implicit enclosure macros
+.Sh DESCRIPTION
+An empty
+.Dq
+and a full
+.Dq user@host
+quotation.
+And another
+.Do full Dc one .
diff --git a/regress/mdoc/Dq/empty.out_ascii b/regress/mdoc/Dq/empty.out_ascii
new file mode 100644
index 00000000..aaa69621
--- /dev/null
+++ b/regress/mdoc/Dq/empty.out_ascii
@@ -0,0 +1,10 @@
+DQ-EMPTY(1) General Commands Manual DQ-EMPTY(1)
+
+NNAAMMEE
+ DDqq--eemmppttyy - empty implicit enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty ``'' and a full ``user@host'' quotation. And another ``full''
+ one.
+
+OpenBSD October 21, 2010 OpenBSD
diff --git a/regress/mdoc/Dt/Makefile b/regress/mdoc/Dt/Makefile
new file mode 100644
index 00000000..b0d0b0a8
--- /dev/null
+++ b/regress/mdoc/Dt/Makefile
@@ -0,0 +1,20 @@
+# $OpenBSD: Makefile,v 1.6 2015/02/16 19:02:32 schwarze Exp $
+
+REGRESS_TARGETS = badsec case dupe fourargs late
+REGRESS_TARGETS += missing noarg nobody nosec order
+LINT_TARGETS = badsec case dupe fourargs late
+LINT_TARGETS += missing noarg nobody nosec order
+
+SKIP_GROFF = badsec nobody
+SKIP_ASCII = badsec
+
+# When the section is missing from the man(7) .TH title line,
+# empty parentheses are shown in the page header.
+# When the section is missing from the mdoc(7) .Dt title line,
+# no empty parentheses are shown in the page header.
+# Hence, there is no bug-compatible translation from mdoc(7)
+# to man(7) for this case. That's not mandoc(1)'s fault.
+
+SKIP_TMAN = fourargs late missing noarg nosec
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Dt/badsec.in b/regress/mdoc/Dt/badsec.in
new file mode 100644
index 00000000..47af859f
--- /dev/null
+++ b/regress/mdoc/Dt/badsec.in
@@ -0,0 +1,8 @@
+.Dd June 13, 2014
+.Dt DT-BADSEC foo
+.Os OpenBSD
+.Sh NAME
+.Nm Dt-badsec
+.Nd unknown manual section
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dt/badsec.out_lint b/regress/mdoc/Dt/badsec.out_lint
new file mode 100644
index 00000000..b78a0333
--- /dev/null
+++ b/regress/mdoc/Dt/badsec.out_lint
@@ -0,0 +1 @@
+mandoc: badsec.in:2:15: WARNING: unknown manual section: Dt ... foo
diff --git a/regress/mdoc/Dt/case.in b/regress/mdoc/Dt/case.in
new file mode 100644
index 00000000..88b2df3b
--- /dev/null
+++ b/regress/mdoc/Dt/case.in
@@ -0,0 +1,8 @@
+.Dd June 13, 2014
+.Dt Dt-case 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dt-case
+.Nd document title is not all caps
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dt/case.out_ascii b/regress/mdoc/Dt/case.out_ascii
new file mode 100644
index 00000000..0eb21827
--- /dev/null
+++ b/regress/mdoc/Dt/case.out_ascii
@@ -0,0 +1,9 @@
+Dt-case(1) General Commands Manual Dt-case(1)
+
+NNAAMMEE
+ DDtt--ccaassee - document title is not all caps
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD June 13, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/case.out_lint b/regress/mdoc/Dt/case.out_lint
new file mode 100644
index 00000000..cf85b606
--- /dev/null
+++ b/regress/mdoc/Dt/case.out_lint
@@ -0,0 +1 @@
+mandoc: case.in:2:6: WARNING: lower case character in document title: Dt Dt-case
diff --git a/regress/mdoc/Dt/dupe.in b/regress/mdoc/Dt/dupe.in
new file mode 100644
index 00000000..c46e3d77
--- /dev/null
+++ b/regress/mdoc/Dt/dupe.in
@@ -0,0 +1,11 @@
+.Dd August 5, 2014
+.Dt DT-FIRST 2 first_arch
+.Os OpenBSD
+.Dt DT-DUPE 1
+.Sh NAME
+.Nm Dt-order
+.Nd duplicate prologue macro
+.Sh DESCRIPTION
+inital text
+.Dt DT-LAST 3 last_arch
+final text
diff --git a/regress/mdoc/Dt/dupe.out_ascii b/regress/mdoc/Dt/dupe.out_ascii
new file mode 100644
index 00000000..0d2ba0e6
--- /dev/null
+++ b/regress/mdoc/Dt/dupe.out_ascii
@@ -0,0 +1,9 @@
+DT-DUPE(1) General Commands Manual DT-DUPE(1)
+
+NNAAMMEE
+ DDtt--oorrddeerr - duplicate prologue macro
+
+DDEESSCCRRIIPPTTIIOONN
+ inital text final text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/dupe.out_lint b/regress/mdoc/Dt/dupe.out_lint
new file mode 100644
index 00000000..b355bed0
--- /dev/null
+++ b/regress/mdoc/Dt/dupe.out_lint
@@ -0,0 +1,2 @@
+mandoc: dupe.in:4:2: WARNING: duplicate prologue macro: Dt
+mandoc: dupe.in:10:2: WARNING: skipping late title macro: Dt
diff --git a/regress/mdoc/Dt/fourargs.in b/regress/mdoc/Dt/fourargs.in
new file mode 100644
index 00000000..9b4293ae
--- /dev/null
+++ b/regress/mdoc/Dt/fourargs.in
@@ -0,0 +1,8 @@
+.Dd February 16, 2015
+.Dt DT-FOURARGS 1 amd64 bogus
+.Os OpenBSD
+.Sh NAME
+.Nm Dt-fourargs
+.Nd too many arguments after the \&Dt macro
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dt/fourargs.out_ascii b/regress/mdoc/Dt/fourargs.out_ascii
new file mode 100644
index 00000000..9fc075e1
--- /dev/null
+++ b/regress/mdoc/Dt/fourargs.out_ascii
@@ -0,0 +1,9 @@
+DT-FOURARGS(1) General Commands Manual (amd64) DT-FOURARGS(1)
+
+NNAAMMEE
+ DDtt--ffoouurraarrggss - too many arguments after the Dt macro
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD February 16, 2015 OpenBSD
diff --git a/regress/mdoc/Dt/fourargs.out_lint b/regress/mdoc/Dt/fourargs.out_lint
new file mode 100644
index 00000000..0d4d1494
--- /dev/null
+++ b/regress/mdoc/Dt/fourargs.out_lint
@@ -0,0 +1 @@
+mandoc: fourargs.in:2:25: ERROR: skipping excess arguments: Dt ... bogus
diff --git a/regress/mdoc/Dt/late.in b/regress/mdoc/Dt/late.in
new file mode 100644
index 00000000..2043eebe
--- /dev/null
+++ b/regress/mdoc/Dt/late.in
@@ -0,0 +1,9 @@
+.Dd August 5, 2014
+.Os OpenBSD
+.Sh NAME
+.Nm Dt-late
+.Nd late title macro
+.Sh DESCRIPTION
+inital text
+.Dt DT-LATE 1
+final text
diff --git a/regress/mdoc/Dt/late.out_ascii b/regress/mdoc/Dt/late.out_ascii
new file mode 100644
index 00000000..c1830f2b
--- /dev/null
+++ b/regress/mdoc/Dt/late.out_ascii
@@ -0,0 +1,9 @@
+UNTITLED LOCAL UNTITLED
+
+NNAAMMEE
+ DDtt--llaattee - late title macro
+
+DDEESSCCRRIIPPTTIIOONN
+ inital text final text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/late.out_lint b/regress/mdoc/Dt/late.out_lint
new file mode 100644
index 00000000..4228c6ae
--- /dev/null
+++ b/regress/mdoc/Dt/late.out_lint
@@ -0,0 +1,2 @@
+mandoc: late.in:8:2: WARNING: skipping late title macro: Dt
+mandoc: late.in: WARNING: missing manual title, using UNTITLED: EOF
diff --git a/regress/mdoc/Dt/missing.in b/regress/mdoc/Dt/missing.in
new file mode 100644
index 00000000..997eab63
--- /dev/null
+++ b/regress/mdoc/Dt/missing.in
@@ -0,0 +1,7 @@
+.Dd August 5, 2014
+.Os OpenBSD
+.Sh NAME
+.Nm Dt-missing
+.Nd no title macro at all
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dt/missing.out_ascii b/regress/mdoc/Dt/missing.out_ascii
new file mode 100644
index 00000000..b2dd22a3
--- /dev/null
+++ b/regress/mdoc/Dt/missing.out_ascii
@@ -0,0 +1,9 @@
+UNTITLED LOCAL UNTITLED
+
+NNAAMMEE
+ DDtt--mmiissssiinngg - no title macro at all
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/missing.out_lint b/regress/mdoc/Dt/missing.out_lint
new file mode 100644
index 00000000..283a60d5
--- /dev/null
+++ b/regress/mdoc/Dt/missing.out_lint
@@ -0,0 +1 @@
+mandoc: missing.in: WARNING: missing manual title, using UNTITLED: EOF
diff --git a/regress/mdoc/Dt/noarg.in b/regress/mdoc/Dt/noarg.in
new file mode 100644
index 00000000..9fddfc6b
--- /dev/null
+++ b/regress/mdoc/Dt/noarg.in
@@ -0,0 +1,8 @@
+.Dd August 5, 2014
+.Dt
+.Os OpenBSD
+.Sh NAME
+.Nm Dt-noarg
+.Nd title macro without arguments
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dt/noarg.out_ascii b/regress/mdoc/Dt/noarg.out_ascii
new file mode 100644
index 00000000..bf6b7ed2
--- /dev/null
+++ b/regress/mdoc/Dt/noarg.out_ascii
@@ -0,0 +1,9 @@
+UNTITLED LOCAL UNTITLED
+
+NNAAMMEE
+ DDtt--nnooaarrgg - title macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/noarg.out_lint b/regress/mdoc/Dt/noarg.out_lint
new file mode 100644
index 00000000..b1fafbe4
--- /dev/null
+++ b/regress/mdoc/Dt/noarg.out_lint
@@ -0,0 +1,2 @@
+mandoc: noarg.in:2:2: WARNING: missing manual title, using UNTITLED: Dt
+mandoc: noarg.in:2:2: WARNING: missing manual section, using "": Dt UNTITLED
diff --git a/regress/mdoc/Dt/nobody.in b/regress/mdoc/Dt/nobody.in
new file mode 100644
index 00000000..cc184f9c
--- /dev/null
+++ b/regress/mdoc/Dt/nobody.in
@@ -0,0 +1,3 @@
+.Dd June 20, 2014
+.Dt DT-NOBODY 1
+.Os OpenBSD
diff --git a/regress/mdoc/Dt/nobody.out_ascii b/regress/mdoc/Dt/nobody.out_ascii
new file mode 100644
index 00000000..1de2b81a
--- /dev/null
+++ b/regress/mdoc/Dt/nobody.out_ascii
@@ -0,0 +1,3 @@
+DT-NOBODY(1) General Commands Manual DT-NOBODY(1)
+
+OpenBSD June 20, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/nobody.out_lint b/regress/mdoc/Dt/nobody.out_lint
new file mode 100644
index 00000000..f5439fcd
--- /dev/null
+++ b/regress/mdoc/Dt/nobody.out_lint
@@ -0,0 +1 @@
+mandoc: nobody.in: WARNING: no document body
diff --git a/regress/mdoc/Dt/nosec.in b/regress/mdoc/Dt/nosec.in
new file mode 100644
index 00000000..6873c46b
--- /dev/null
+++ b/regress/mdoc/Dt/nosec.in
@@ -0,0 +1,8 @@
+.Dd August 5, 2014
+.Dt DT-NOSEC
+.Os OpenBSD
+.Sh NAME
+.Nm Dt-nosec
+.Nd title macro without manual section
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dt/nosec.out_ascii b/regress/mdoc/Dt/nosec.out_ascii
new file mode 100644
index 00000000..028db82e
--- /dev/null
+++ b/regress/mdoc/Dt/nosec.out_ascii
@@ -0,0 +1,9 @@
+DT-NOSEC LOCAL DT-NOSEC
+
+NNAAMMEE
+ DDtt--nnoosseecc - title macro without manual section
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/nosec.out_lint b/regress/mdoc/Dt/nosec.out_lint
new file mode 100644
index 00000000..bddda2d7
--- /dev/null
+++ b/regress/mdoc/Dt/nosec.out_lint
@@ -0,0 +1 @@
+mandoc: nosec.in:2:2: WARNING: missing manual section, using "": Dt DT-NOSEC
diff --git a/regress/mdoc/Dt/order.in b/regress/mdoc/Dt/order.in
new file mode 100644
index 00000000..04bbaa51
--- /dev/null
+++ b/regress/mdoc/Dt/order.in
@@ -0,0 +1,8 @@
+.Dd June 13, 2014
+.Os OpenBSD
+.Dt DT-ORDER 1
+.Sh NAME
+.Nm Dt-order
+.Nd prologue macros out of order
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Dt/order.out_ascii b/regress/mdoc/Dt/order.out_ascii
new file mode 100644
index 00000000..6524bcab
--- /dev/null
+++ b/regress/mdoc/Dt/order.out_ascii
@@ -0,0 +1,9 @@
+DT-ORDER(1) General Commands Manual DT-ORDER(1)
+
+NNAAMMEE
+ DDtt--oorrddeerr - prologue macros out of order
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD June 13, 2014 OpenBSD
diff --git a/regress/mdoc/Dt/order.out_lint b/regress/mdoc/Dt/order.out_lint
new file mode 100644
index 00000000..5700ef89
--- /dev/null
+++ b/regress/mdoc/Dt/order.out_lint
@@ -0,0 +1 @@
+mandoc: order.in:3:2: WARNING: prologue macros out of order: Dt after Os
diff --git a/regress/mdoc/Dv/Makefile b/regress/mdoc/Dv/Makefile
new file mode 100644
index 00000000..cfe3ad0b
--- /dev/null
+++ b/regress/mdoc/Dv/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = font noarg
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Dv/font.in b/regress/mdoc/Dv/font.in
new file mode 100644
index 00000000..8e3c5bcb
--- /dev/null
+++ b/regress/mdoc/Dv/font.in
@@ -0,0 +1,13 @@
+.Dd October 21, 2011
+.Dt DV-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dv-font
+.Nd formatting of defined variables
+.Sh DESCRIPTION
+The
+.Dv BUFSIZ
+macro.
+.Pp
+And with
+.Dv some \\fIembedded\\fP string .
diff --git a/regress/mdoc/Dv/font.out_ascii b/regress/mdoc/Dv/font.out_ascii
new file mode 100644
index 00000000..88f0760d
--- /dev/null
+++ b/regress/mdoc/Dv/font.out_ascii
@@ -0,0 +1,11 @@
+DV-FONT(1) General Commands Manual DV-FONT(1)
+
+NNAAMMEE
+ DDvv--ffoonntt - formatting of defined variables
+
+DDEESSCCRRIIPPTTIIOONN
+ The BUFSIZ macro.
+
+ And with some _e_m_b_e_d_d_e_d string.
+
+OpenBSD October 21, 2011 OpenBSD
diff --git a/regress/mdoc/Dv/noarg.in b/regress/mdoc/Dv/noarg.in
new file mode 100644
index 00000000..86155b3a
--- /dev/null
+++ b/regress/mdoc/Dv/noarg.in
@@ -0,0 +1,12 @@
+.Dd July 2, 2014
+.Dt DV-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Dv-noarg
+.Nd defined variable macro without an argument
+.Sh DESCRIPTION
+with variable:
+.Dv NULL
+no variable:
+.Dv
+end of test document
diff --git a/regress/mdoc/Dv/noarg.out_ascii b/regress/mdoc/Dv/noarg.out_ascii
new file mode 100644
index 00000000..b40d6635
--- /dev/null
+++ b/regress/mdoc/Dv/noarg.out_ascii
@@ -0,0 +1,9 @@
+DV-NOARG(1) General Commands Manual DV-NOARG(1)
+
+NNAAMMEE
+ DDvv--nnooaarrgg - defined variable macro without an argument
+
+DDEESSCCRRIIPPTTIIOONN
+ with variable: NULL no variable: end of test document
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Dv/noarg.out_lint b/regress/mdoc/Dv/noarg.out_lint
new file mode 100644
index 00000000..cac45101
--- /dev/null
+++ b/regress/mdoc/Dv/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Dv
diff --git a/regress/mdoc/Em/Makefile b/regress/mdoc/Em/Makefile
new file mode 100644
index 00000000..13de4337
--- /dev/null
+++ b/regress/mdoc/Em/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2014/11/17 06:44:35 schwarze Exp $
+
+REGRESS_TARGETS = font noarg punct
+LINT_TARGETS = noarg punct
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Em/font.in b/regress/mdoc/Em/font.in
new file mode 100644
index 00000000..3e547d63
--- /dev/null
+++ b/regress/mdoc/Em/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt EM-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Em-font
+.Nd changing fonts inside the emphasis macro
+.Sh DESCRIPTION
+normal text
+.Em emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Em/font.out_ascii b/regress/mdoc/Em/font.out_ascii
new file mode 100644
index 00000000..f461c7ae
--- /dev/null
+++ b/regress/mdoc/Em/font.out_ascii
@@ -0,0 +1,9 @@
+EM-FONT(1) General Commands Manual EM-FONT(1)
+
+NNAAMMEE
+ EEmm--ffoonntt - changing fonts inside the emphasis macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Em/noarg.in b/regress/mdoc/Em/noarg.in
new file mode 100644
index 00000000..9096280a
--- /dev/null
+++ b/regress/mdoc/Em/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt EM-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Em-noarg
+.Nd emphasis macro without arguments
+.Sh DESCRIPTION
+with argument
+.Em arg
+no argument
+.Em
+end of test document
diff --git a/regress/mdoc/Em/noarg.out_ascii b/regress/mdoc/Em/noarg.out_ascii
new file mode 100644
index 00000000..2489797a
--- /dev/null
+++ b/regress/mdoc/Em/noarg.out_ascii
@@ -0,0 +1,9 @@
+EM-NOARG(1) General Commands Manual EM-NOARG(1)
+
+NNAAMMEE
+ EEmm--nnooaarrgg - emphasis macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ with argument _a_r_g no argument end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Em/noarg.out_lint b/regress/mdoc/Em/noarg.out_lint
new file mode 100644
index 00000000..dfc13809
--- /dev/null
+++ b/regress/mdoc/Em/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Em
diff --git a/regress/mdoc/Em/punct.in b/regress/mdoc/Em/punct.in
new file mode 100644
index 00000000..b49ca505
--- /dev/null
+++ b/regress/mdoc/Em/punct.in
@@ -0,0 +1,82 @@
+.Dd November 17, 2014
+.Dt EM-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Em-punct
+.Nd punctuation following an emphasis macro
+.Sh DESCRIPTION
+Leading punctuation:
+.Em ( b
+.Em [ b
+.Em | b
+.Em . b
+.Em , b
+.Em ; b
+.Em : b
+.Em ? b
+.Em ! b
+.Em ) b
+.Em ] b
+.Pp
+Trailing punctuation:
+.Em a (
+.Em a [
+.Em a |
+.Em a .
+.Em a ,
+.Em a ;
+.Em a :
+.Em a ?
+.Em a !
+.Em a )
+.Em a ]
+.Pp
+Middle punctuation:
+.Em a ( b
+.Em a [ b
+.Em a | b
+.Em a . b
+.Em a , b
+.Em a ; b
+.Em a : b
+.Em a ? b
+.Em a ! b
+.Em a ) b
+.Em a ] b
+.Pp
+Isolated punctuation:
+.Em a Em ( Em b
+.Em a Em [ Em b
+.Em a Em | Em b
+.Em a Em . Em b
+.Em a Em , Em b
+.Em a Em ; Em b
+.Em a Em : Em b
+.Em a Em ? Em b
+.Em a Em ! Em b
+.Em a Em ) Em b
+.Em a Em ] Em b
+.Pp
+Isolated trailing punctuation:
+.Em a Em (
+.Em a Em [
+.Em a Em |
+.Em a Em .
+.Em a Em ,
+.Em a Em ;
+.Em a Em :
+.Em a Em ?
+.Em a Em !
+.Em a Em )
+.Em a Em ]
+.Pp
+Multiple isolated punctuation:
+.Em a Em ( [ Em b
+.Em a Em ) ] Em b
+.Pp
+Multiple punctuation:
+.Em [ ( arg ) ] .
+.Pp
+Quoted:
+.Em "a . b Nm"
+.Em ". b Nm"
diff --git a/regress/mdoc/Em/punct.out_ascii b/regress/mdoc/Em/punct.out_ascii
new file mode 100644
index 00000000..4396e669
--- /dev/null
+++ b/regress/mdoc/Em/punct.out_ascii
@@ -0,0 +1,26 @@
+EM-PUNCT(1) General Commands Manual EM-PUNCT(1)
+
+NNAAMMEE
+ EEmm--ppuunncctt - punctuation following an emphasis macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Leading punctuation: (_b [_b | _b . _b , _b ; _b : _b ? _b ! _b ) _b ] _b
+
+ Trailing punctuation: _a ( _a [ _a | _a. _a, _a; _a: _a? _a! _a) _a]
+
+ Middle punctuation: _a (_b _a [_b _a | _b _a. _b _a, _b _a; _b _a: _b _a? _b _a! _b _a) _b _a]
+ _b
+
+ Isolated punctuation: _a (_b _a [_b _a | _b _a . _b _a , _b _a ; _b _a : _b _a ? _b _a ! _b
+ _a ) _b _a ] _b
+
+ Isolated trailing punctuation: _a ( _a [ _a | _a . _a , _a ; _a : _a ? _a ! _a )
+ _a ]
+
+ Multiple isolated punctuation: _a ([_b _a )] _b
+
+ Multiple punctuation: [(_a_r_g)].
+
+ Quoted: _a _. _b _N_m _. _b _N_m
+
+OpenBSD November 17, 2014 OpenBSD
diff --git a/regress/mdoc/Em/punct.out_lint b/regress/mdoc/Em/punct.out_lint
new file mode 100644
index 00000000..7d16f436
--- /dev/null
+++ b/regress/mdoc/Em/punct.out_lint
@@ -0,0 +1,24 @@
+mandoc: punct.in:48:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:49:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:50:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:51:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:52:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:53:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:54:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:55:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:56:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:57:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:58:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:61:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:62:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:63:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:64:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:65:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:66:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:67:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:68:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:69:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:70:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:71:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:74:7: WARNING: skipping empty macro: Em
+mandoc: punct.in:75:7: WARNING: skipping empty macro: Em
diff --git a/regress/mdoc/Eo/Makefile b/regress/mdoc/Eo/Makefile
new file mode 100644
index 00000000..0034e271
--- /dev/null
+++ b/regress/mdoc/Eo/Makefile
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile,v 1.4 2015/02/11 14:14:53 schwarze Exp $
+
+REGRESS_TARGETS = break empty obsolete unclosed
+LINT_TARGETS = break obsolete unclosed
+
+# groff-1.22.3 defect:
+# - When .Ec is missing, groff prints no page footer.
+
+SKIP_GROFF = unclosed
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Eo/break.in b/regress/mdoc/Eo/break.in
new file mode 100644
index 00000000..001d7ac5
--- /dev/null
+++ b/regress/mdoc/Eo/break.in
@@ -0,0 +1,68 @@
+.Dd February 1, 2015
+.Dt EO-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Eo-break
+.Nd breaking a custom enclosure block
+.Sh DESCRIPTION
+break
+.Eo <<
+eo
+.Bo
+bo
+ec
+.Ec >>
+bc
+.Bc
+no closing
+.Eo <<
+eo
+.Bo
+bo
+ec
+.Ec
+bc
+.Bc
+no content
+.Eo <<
+.Bo
+.Ec >>
+bc
+.Bc
+opening only
+.Eo <<
+.Bo
+.Ec
+bc
+.Bc
+broken
+.Bo
+bo
+.Eo <<
+eo
+bc
+.Bc
+ec
+.Ec >>
+no content
+.Bo
+bo
+.Eo <<
+.Bc
+.Ec >>
+no opening
+.Bo
+bo
+.Eo
+eo
+bc
+.Bc
+ec
+.Ec >>
+closing only
+.Bo
+bo
+.Eo
+.Bc
+.Ec >>
+final text
diff --git a/regress/mdoc/Eo/break.out_ascii b/regress/mdoc/Eo/break.out_ascii
new file mode 100644
index 00000000..d4a66343
--- /dev/null
+++ b/regress/mdoc/Eo/break.out_ascii
@@ -0,0 +1,11 @@
+EO-BREAK(1) General Commands Manual EO-BREAK(1)
+
+NNAAMMEE
+ EEoo--bbrreeaakk - breaking a custom enclosure block
+
+DDEESSCCRRIIPPTTIIOONN
+ break <<eo [bo ec>> bc] no closing <<eo [bo ec bc] no content <<[>> bc]
+ opening only <<[ bc] broken [bo <<eo bc] ec>> no content [bo <<]>> no
+ opening [bo eo bc] ec>> closing only [bo ]>> final text
+
+OpenBSD February 1, 2015 OpenBSD
diff --git a/regress/mdoc/Eo/break.out_lint b/regress/mdoc/Eo/break.out_lint
new file mode 100644
index 00000000..e3608386
--- /dev/null
+++ b/regress/mdoc/Eo/break.out_lint
@@ -0,0 +1,8 @@
+mandoc: break.in:14:2: WARNING: blocks badly nested: Eo breaks Bo
+mandoc: break.in:23:2: WARNING: blocks badly nested: Eo breaks Bo
+mandoc: break.in:29:2: WARNING: blocks badly nested: Eo breaks Bo
+mandoc: break.in:35:2: WARNING: blocks badly nested: Eo breaks Bo
+mandoc: break.in:44:2: WARNING: blocks badly nested: Bo breaks Eo
+mandoc: break.in:51:2: WARNING: blocks badly nested: Bo breaks Eo
+mandoc: break.in:59:2: WARNING: blocks badly nested: Bo breaks Eo
+mandoc: break.in:66:2: WARNING: blocks badly nested: Bo breaks Eo
diff --git a/regress/mdoc/Eo/empty.in b/regress/mdoc/Eo/empty.in
new file mode 100644
index 00000000..bf637f27
--- /dev/null
+++ b/regress/mdoc/Eo/empty.in
@@ -0,0 +1,51 @@
+.Dd February 1, 2015
+.Dt EO-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Eo-empty
+.Nd empty implicit enclosure macros
+.Sh DESCRIPTION
+completely empty
+.Eo
+.Ec
+closing only
+.Eo
+.Ec >>
+content only
+.Eo
+text
+.Ec
+opening only
+.Eo <<
+.Ec
+no opening
+.Eo
+text
+.Ec >>
+no content
+.Eo <<
+.Ec >>
+no closing
+.Eo <<
+text
+.Ec
+all
+.Eo <<
+text
+.Ec >>
+completely empty
+.No prefix Ns Eo
+.Ec
+closing only
+.No prefix Ns Eo
+.Ec >>
+no opening
+.No prefix Ns Eo
+text
+.Ec >>
+no closing
+.Eo <<
+.No prefix Ns Ec
+stray closing
+.Ec >>
+end of file
diff --git a/regress/mdoc/Eo/empty.out_ascii b/regress/mdoc/Eo/empty.out_ascii
new file mode 100644
index 00000000..a28e5727
--- /dev/null
+++ b/regress/mdoc/Eo/empty.out_ascii
@@ -0,0 +1,13 @@
+EO-EMPTY(1) General Commands Manual EO-EMPTY(1)
+
+NNAAMMEE
+ EEoo--eemmppttyy - empty implicit enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ completely empty closing only >> content only text opening only << no
+ opening text>> no content <<>> no closing <<text all <<text>> completely
+ empty prefix closing only prefix>> no opening prefixtext>> no closing
+ <<prefix stray closing
+ >> end of file
+
+OpenBSD February 1, 2015 OpenBSD
diff --git a/regress/mdoc/Eo/obsolete.in b/regress/mdoc/Eo/obsolete.in
new file mode 100644
index 00000000..fe0bb087
--- /dev/null
+++ b/regress/mdoc/Eo/obsolete.in
@@ -0,0 +1,20 @@
+.Dd July 2, 2014
+.Dt EO-OBSOLETE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Eo-obsolete
+.Nd obsolete enclosure macros
+.Sh DESCRIPTION
+.En no prior \&Es
+.Pp
+.Es << >> surplus
+initial text
+.En enclosed words with Fl flags
+middle text
+.En more enclosed words
+final text
+.Pp
+.Es
+initial text
+.En after empty \&Es
+final text
diff --git a/regress/mdoc/Eo/obsolete.out_ascii b/regress/mdoc/Eo/obsolete.out_ascii
new file mode 100644
index 00000000..bb2f15c5
--- /dev/null
+++ b/regress/mdoc/Eo/obsolete.out_ascii
@@ -0,0 +1,14 @@
+EO-OBSOLETE(1) General Commands Manual EO-OBSOLETE(1)
+
+NNAAMMEE
+ EEoo--oobbssoolleettee - obsolete enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ no prior Es
+
+ surplus initial text <<enclosed words with --ffllaaggss>> middle text <<more
+ enclosed words>> final text
+
+ initial text after empty Es final text
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Eo/obsolete.out_lint b/regress/mdoc/Eo/obsolete.out_lint
new file mode 100644
index 00000000..d9577b9c
--- /dev/null
+++ b/regress/mdoc/Eo/obsolete.out_lint
@@ -0,0 +1,6 @@
+mandoc: obsolete.in:8:2: WARNING: obsolete macro: En
+mandoc: obsolete.in:10:2: WARNING: obsolete macro: Es
+mandoc: obsolete.in:12:2: WARNING: obsolete macro: En
+mandoc: obsolete.in:14:2: WARNING: obsolete macro: En
+mandoc: obsolete.in:17:2: WARNING: obsolete macro: Es
+mandoc: obsolete.in:19:2: WARNING: obsolete macro: En
diff --git a/regress/mdoc/Eo/unclosed.in b/regress/mdoc/Eo/unclosed.in
new file mode 100644
index 00000000..59b6d527
--- /dev/null
+++ b/regress/mdoc/Eo/unclosed.in
@@ -0,0 +1,9 @@
+.Dd February 11, 2015
+.Dt EO-UNCLOSED 1
+.Os OpenBSD
+.Sh NAME
+.Nm Eo-unclosed
+.Nd unclosed custom enclosure block
+.Sh DESCRIPTION
+before block
+.Eo <<
diff --git a/regress/mdoc/Eo/unclosed.out_ascii b/regress/mdoc/Eo/unclosed.out_ascii
new file mode 100644
index 00000000..0d32206f
--- /dev/null
+++ b/regress/mdoc/Eo/unclosed.out_ascii
@@ -0,0 +1,9 @@
+EO-UNCLOSED(1) General Commands Manual EO-UNCLOSED(1)
+
+NNAAMMEE
+ EEoo--uunncclloosseedd - unclosed custom enclosure block
+
+DDEESSCCRRIIPPTTIIOONN
+ before block <<
+
+OpenBSD February 11, 2015 OpenBSD
diff --git a/regress/mdoc/Eo/unclosed.out_lint b/regress/mdoc/Eo/unclosed.out_lint
new file mode 100644
index 00000000..49dae22e
--- /dev/null
+++ b/regress/mdoc/Eo/unclosed.out_lint
@@ -0,0 +1 @@
+mandoc: unclosed.in:9:2: ERROR: appending missing end of block: Eo
diff --git a/regress/mdoc/Er/Makefile b/regress/mdoc/Er/Makefile
new file mode 100644
index 00000000..1be2a84a
--- /dev/null
+++ b/regress/mdoc/Er/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = noarg font
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Er/font.in b/regress/mdoc/Er/font.in
new file mode 100644
index 00000000..4e3d337b
--- /dev/null
+++ b/regress/mdoc/Er/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt ER-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Er-font
+.Nd changing fonts inside the error code macro
+.Sh DESCRIPTION
+normal text
+.Er EFONT\\fIemphasis\\fPEBACK
+trailing text
diff --git a/regress/mdoc/Er/font.out_ascii b/regress/mdoc/Er/font.out_ascii
new file mode 100644
index 00000000..cfe462bd
--- /dev/null
+++ b/regress/mdoc/Er/font.out_ascii
@@ -0,0 +1,9 @@
+ER-FONT(1) General Commands Manual ER-FONT(1)
+
+NNAAMMEE
+ EErr--ffoonntt - changing fonts inside the error code macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text EFONT_e_m_p_h_a_s_i_sEBACK trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Er/noarg.in b/regress/mdoc/Er/noarg.in
new file mode 100644
index 00000000..96aa2cee
--- /dev/null
+++ b/regress/mdoc/Er/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt ER-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Er-noarg
+.Nd error constant macro without an argument
+.Sh DESCRIPTION
+with error:
+.Er ENOENT
+no error:
+.Er
+end of test document
diff --git a/regress/mdoc/Er/noarg.out_ascii b/regress/mdoc/Er/noarg.out_ascii
new file mode 100644
index 00000000..83f45f07
--- /dev/null
+++ b/regress/mdoc/Er/noarg.out_ascii
@@ -0,0 +1,9 @@
+ER-NOARG(1) General Commands Manual ER-NOARG(1)
+
+NNAAMMEE
+ EErr--nnooaarrgg - error constant macro without an argument
+
+DDEESSCCRRIIPPTTIIOONN
+ with error: ENOENT no error: end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Er/noarg.out_lint b/regress/mdoc/Er/noarg.out_lint
new file mode 100644
index 00000000..b8594294
--- /dev/null
+++ b/regress/mdoc/Er/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Er
diff --git a/regress/mdoc/Ev/Makefile b/regress/mdoc/Ev/Makefile
new file mode 100644
index 00000000..cfe3ad0b
--- /dev/null
+++ b/regress/mdoc/Ev/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = font noarg
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ev/font.in b/regress/mdoc/Ev/font.in
new file mode 100644
index 00000000..a9213d81
--- /dev/null
+++ b/regress/mdoc/Ev/font.in
@@ -0,0 +1,13 @@
+.Dd October 21, 2011
+.Dt EV-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ev-font
+.Nd formatting of environment variables
+.Sh DESCRIPTION
+The
+.Ev PATH
+variable.
+.Pp
+And with
+.Ev some \\fIembedded\\fP string .
diff --git a/regress/mdoc/Ev/font.out_ascii b/regress/mdoc/Ev/font.out_ascii
new file mode 100644
index 00000000..fad07429
--- /dev/null
+++ b/regress/mdoc/Ev/font.out_ascii
@@ -0,0 +1,11 @@
+EV-FONT(1) General Commands Manual EV-FONT(1)
+
+NNAAMMEE
+ EEvv--ffoonntt - formatting of environment variables
+
+DDEESSCCRRIIPPTTIIOONN
+ The PATH variable.
+
+ And with some _e_m_b_e_d_d_e_d string.
+
+OpenBSD October 21, 2011 OpenBSD
diff --git a/regress/mdoc/Ev/noarg.in b/regress/mdoc/Ev/noarg.in
new file mode 100644
index 00000000..84c1815d
--- /dev/null
+++ b/regress/mdoc/Ev/noarg.in
@@ -0,0 +1,12 @@
+.Dd July 2, 2014
+.Dt EV-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ev-noarg
+.Nd environment variable macro without an argument
+.Sh DESCRIPTION
+with variable:
+.Ev HOME
+no variable:
+.Ev
+end of test document
diff --git a/regress/mdoc/Ev/noarg.out_ascii b/regress/mdoc/Ev/noarg.out_ascii
new file mode 100644
index 00000000..11705a38
--- /dev/null
+++ b/regress/mdoc/Ev/noarg.out_ascii
@@ -0,0 +1,9 @@
+EV-NOARG(1) General Commands Manual EV-NOARG(1)
+
+NNAAMMEE
+ EEvv--nnooaarrgg - environment variable macro without an argument
+
+DDEESSCCRRIIPPTTIIOONN
+ with variable: HOME no variable: end of test document
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Ev/noarg.out_lint b/regress/mdoc/Ev/noarg.out_lint
new file mode 100644
index 00000000..a41541b0
--- /dev/null
+++ b/regress/mdoc/Ev/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Ev
diff --git a/regress/mdoc/Ex/Makefile b/regress/mdoc/Ex/Makefile
new file mode 100644
index 00000000..8a714ce1
--- /dev/null
+++ b/regress/mdoc/Ex/Makefile
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile,v 1.1 2014/08/14 02:00:53 schwarze Exp $
+
+REGRESS_TARGETS = args noname nostd
+LINT_TARGETS = noname nostd
+
+# groff-1.22.2 defect:
+# - .Ex without -std produces no output
+
+SKIP_GROFF = nostd
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ex/args.in b/regress/mdoc/Ex/args.in
new file mode 100644
index 00000000..39a53b74
--- /dev/null
+++ b/regress/mdoc/Ex/args.in
@@ -0,0 +1,15 @@
+.Dd July 29, 2014
+.Dt EX-ARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ex-args
+.Nd arguments to the exit value macro
+.Sh EXIT STATUS
+no arguments:
+.Ex -std
+.Pp
+one argument:
+.Ex -std one
+.Pp
+two arguments:
+.Ex -std one two
diff --git a/regress/mdoc/Ex/args.out_ascii b/regress/mdoc/Ex/args.out_ascii
new file mode 100644
index 00000000..d217c36a
--- /dev/null
+++ b/regress/mdoc/Ex/args.out_ascii
@@ -0,0 +1,16 @@
+EX-ARGS(1) General Commands Manual EX-ARGS(1)
+
+NNAAMMEE
+ EExx--aarrggss - arguments to the exit value macro
+
+EEXXIITT SSTTAATTUUSS
+ no arguments:
+ The EExx--aarrggss utility exits 0 on success, and >0 if an error occurs.
+
+ one argument:
+ The oonnee utility exits 0 on success, and >0 if an error occurs.
+
+ two arguments:
+ The oonnee and ttwwoo utilities exit 0 on success, and >0 if an error occurs.
+
+OpenBSD July 29, 2014 OpenBSD
diff --git a/regress/mdoc/Ex/noname.in b/regress/mdoc/Ex/noname.in
new file mode 100644
index 00000000..9aa742f2
--- /dev/null
+++ b/regress/mdoc/Ex/noname.in
@@ -0,0 +1,15 @@
+.Dd July 29, 2014
+.Dt EX-NONAME 1
+.Os OpenBSD
+.Sh NAME
+.Nm
+.Nd exit value macro without an available name
+.Sh EXIT STATUS
+no arguments:
+.Ex -std
+.Pp
+one argument:
+.Ex -std one
+.Pp
+two arguments:
+.Ex -std one two
diff --git a/regress/mdoc/Ex/noname.out_ascii b/regress/mdoc/Ex/noname.out_ascii
new file mode 100644
index 00000000..00da4a6b
--- /dev/null
+++ b/regress/mdoc/Ex/noname.out_ascii
@@ -0,0 +1,16 @@
+EX-NONAME(1) General Commands Manual EX-NONAME(1)
+
+NNAAMMEE
+ - exit value macro without an available name
+
+EEXXIITT SSTTAATTUUSS
+ no arguments:
+ The utility exits 0 on success, and >0 if an error occurs.
+
+ one argument:
+ The oonnee utility exits 0 on success, and >0 if an error occurs.
+
+ two arguments:
+ The oonnee and ttwwoo utilities exit 0 on success, and >0 if an error occurs.
+
+OpenBSD July 29, 2014 OpenBSD
diff --git a/regress/mdoc/Ex/noname.out_lint b/regress/mdoc/Ex/noname.out_lint
new file mode 100644
index 00000000..c844104e
--- /dev/null
+++ b/regress/mdoc/Ex/noname.out_lint
@@ -0,0 +1,2 @@
+mandoc: noname.in:5:2: ERROR: missing manual name, using "": Nm
+mandoc: noname.in:9:2: WARNING: missing utility name, using "": Ex
diff --git a/regress/mdoc/Ex/nostd.in b/regress/mdoc/Ex/nostd.in
new file mode 100644
index 00000000..4722cba8
--- /dev/null
+++ b/regress/mdoc/Ex/nostd.in
@@ -0,0 +1,15 @@
+.Dd July 29, 2014
+.Dt EX-NOSTD 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ex-nostd
+.Nd exit value macros without -std arguments
+.Sh EXIT STATUS
+no arguments:
+.Ex
+.Pp
+one argument:
+.Ex one
+.Pp
+two arguments:
+.Ex one two
diff --git a/regress/mdoc/Ex/nostd.out_ascii b/regress/mdoc/Ex/nostd.out_ascii
new file mode 100644
index 00000000..04abc9e9
--- /dev/null
+++ b/regress/mdoc/Ex/nostd.out_ascii
@@ -0,0 +1,16 @@
+EX-NOSTD(1) General Commands Manual EX-NOSTD(1)
+
+NNAAMMEE
+ EExx--nnoossttdd - exit value macros without -std arguments
+
+EEXXIITT SSTTAATTUUSS
+ no arguments:
+ The EExx--nnoossttdd utility exits 0 on success, and >0 if an error occurs.
+
+ one argument:
+ The oonnee utility exits 0 on success, and >0 if an error occurs.
+
+ two arguments:
+ The oonnee and ttwwoo utilities exit 0 on success, and >0 if an error occurs.
+
+OpenBSD July 29, 2014 OpenBSD
diff --git a/regress/mdoc/Ex/nostd.out_lint b/regress/mdoc/Ex/nostd.out_lint
new file mode 100644
index 00000000..0aaaa123
--- /dev/null
+++ b/regress/mdoc/Ex/nostd.out_lint
@@ -0,0 +1,3 @@
+mandoc: nostd.in:9:2: WARNING: missing -std argument, adding it: Ex
+mandoc: nostd.in:12:2: WARNING: missing -std argument, adding it: Ex
+mandoc: nostd.in:15:2: WARNING: missing -std argument, adding it: Ex
diff --git a/regress/mdoc/Fd/Makefile b/regress/mdoc/Fd/Makefile
new file mode 100644
index 00000000..7cd78c65
--- /dev/null
+++ b/regress/mdoc/Fd/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.3 2015/02/06 03:31:11 schwarze Exp $
+
+REGRESS_TARGETS = break empty eos font
+LINT_TARGETS = empty
+SKIP_TMAN = eos
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Fd/break.in b/regress/mdoc/Fd/break.in
new file mode 100644
index 00000000..e6fd9023
--- /dev/null
+++ b/regress/mdoc/Fd/break.in
@@ -0,0 +1,26 @@
+.Dd June 9, 2010
+.Dt FD-BREAK 2
+.Os OpenBSD
+.Sh NAME
+.Nm Fd-break
+.Nd line break before old-style header include file
+.Sh SYNOPSIS
+.Fd #include <fcntl.h>
+.Ft int
+.Fn open "const char *path" "int flags" "mode_t mode"
+.Fd #include <sys/types.h>
+.Fd #include <unistd.h>
+.Ft int
+.Fn dup "int oldd"
+.Ft ssize_t
+.Fn write "int d" "const void *buf" "size_t nbytes"
+.Sh DESCRIPTION
+.Fd #include <fcntl.h>
+.Ft int
+.Fn open "const char *path" "int flags" "mode_t mode"
+.Fd #include <sys/types.h>
+.Fd #include <unistd.h>
+.Ft int
+.Fn dup "int oldd"
+.Ft ssize_t
+.Fn write "int d" "const void *buf" "size_t nbytes"
diff --git a/regress/mdoc/Fd/break.out_ascii b/regress/mdoc/Fd/break.out_ascii
new file mode 100644
index 00000000..fdd6aae4
--- /dev/null
+++ b/regress/mdoc/Fd/break.out_ascii
@@ -0,0 +1,27 @@
+FD-BREAK(2) System Calls Manual FD-BREAK(2)
+
+NNAAMMEE
+ FFdd--bbrreeaakk - line break before old-style header include file
+
+SSYYNNOOPPSSIISS
+ ##iinncclluuddee <<ffccnnttll..hh>>
+
+ _i_n_t
+ ooppeenn(_c_o_n_s_t _c_h_a_r _*_p_a_t_h, _i_n_t _f_l_a_g_s, _m_o_d_e___t _m_o_d_e);
+
+ ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
+ ##iinncclluuddee <<uunniissttdd..hh>>
+
+ _i_n_t
+ dduupp(_i_n_t _o_l_d_d);
+
+ _s_s_i_z_e___t
+ wwrriittee(_i_n_t _d, _c_o_n_s_t _v_o_i_d _*_b_u_f, _s_i_z_e___t _n_b_y_t_e_s);
+
+DDEESSCCRRIIPPTTIIOONN
+ ##iinncclluuddee <<ffccnnttll..hh>>
+ _i_n_t ooppeenn(_c_o_n_s_t _c_h_a_r _*_p_a_t_h, _i_n_t _f_l_a_g_s, _m_o_d_e___t _m_o_d_e) ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
+ ##iinncclluuddee <<uunniissttdd..hh>>
+ _i_n_t dduupp(_i_n_t _o_l_d_d) _s_s_i_z_e___t wwrriittee(_i_n_t _d, _c_o_n_s_t _v_o_i_d _*_b_u_f, _s_i_z_e___t _n_b_y_t_e_s)
+
+OpenBSD June 9, 2010 OpenBSD
diff --git a/regress/mdoc/Fd/empty.in b/regress/mdoc/Fd/empty.in
new file mode 100644
index 00000000..5951316d
--- /dev/null
+++ b/regress/mdoc/Fd/empty.in
@@ -0,0 +1,14 @@
+.Dd February 5, 2015
+.Dt FD-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fd-empty
+.Nd empty preprocessor directive macros
+.Sh SYNOPSIS
+.In sys/types.h
+.Fd
+.In stdlib.h
+.Sh DESCRIPTION
+leading text
+.Fd
+trailing text
diff --git a/regress/mdoc/Fd/empty.out_ascii b/regress/mdoc/Fd/empty.out_ascii
new file mode 100644
index 00000000..d525b482
--- /dev/null
+++ b/regress/mdoc/Fd/empty.out_ascii
@@ -0,0 +1,13 @@
+FD-EMPTY(1) General Commands Manual FD-EMPTY(1)
+
+NNAAMMEE
+ FFdd--eemmppttyy - empty preprocessor directive macros
+
+SSYYNNOOPPSSIISS
+ ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
+ ##iinncclluuddee <<ssttddlliibb..hh>>
+
+DDEESSCCRRIIPPTTIIOONN
+ leading text trailing text
+
+OpenBSD February 5, 2015 OpenBSD
diff --git a/regress/mdoc/Fd/empty.out_lint b/regress/mdoc/Fd/empty.out_lint
new file mode 100644
index 00000000..15f76270
--- /dev/null
+++ b/regress/mdoc/Fd/empty.out_lint
@@ -0,0 +1,2 @@
+mandoc: empty.in:9:2: WARNING: skipping empty macro: Fd
+mandoc: empty.in:13:2: WARNING: skipping empty macro: Fd
diff --git a/regress/mdoc/Fd/eos.in b/regress/mdoc/Fd/eos.in
new file mode 100644
index 00000000..f2efb028
--- /dev/null
+++ b/regress/mdoc/Fd/eos.in
@@ -0,0 +1,10 @@
+.Dd November 17, 2012
+.Dt FD-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fd-eos
+.Nd end of sentence handling after the legacy include macro
+.Sh DESCRIPTION
+Let's use
+.Fd string.h .
+And then something else.
diff --git a/regress/mdoc/Fd/eos.out_ascii b/regress/mdoc/Fd/eos.out_ascii
new file mode 100644
index 00000000..3d54ac3e
--- /dev/null
+++ b/regress/mdoc/Fd/eos.out_ascii
@@ -0,0 +1,10 @@
+FD-EOS(1) General Commands Manual FD-EOS(1)
+
+NNAAMMEE
+ FFdd--eeooss - end of sentence handling after the legacy include macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Let's use ssttrriinngg..hh ..
+ And then something else.
+
+OpenBSD November 17, 2012 OpenBSD
diff --git a/regress/mdoc/Fd/font.in b/regress/mdoc/Fd/font.in
new file mode 100644
index 00000000..a3a0a830
--- /dev/null
+++ b/regress/mdoc/Fd/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt FD-FONT 2
+.Os OpenBSD
+.Sh NAME
+.Nm Fd-font
+.Nd changing the font inside the old-style include macro
+.Sh DESCRIPTION
+normal text
+.Fd prefix\\fIheader\\fPsuffix
+trailing text
diff --git a/regress/mdoc/Fd/font.out_ascii b/regress/mdoc/Fd/font.out_ascii
new file mode 100644
index 00000000..7a3428fe
--- /dev/null
+++ b/regress/mdoc/Fd/font.out_ascii
@@ -0,0 +1,10 @@
+FD-FONT(2) System Calls Manual FD-FONT(2)
+
+NNAAMMEE
+ FFdd--ffoonntt - changing the font inside the old-style include macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text pprreeffiixx_h_e_a_d_e_rssuuffffiixx
+ trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Fl/Makefile b/regress/mdoc/Fl/Makefile
new file mode 100644
index 00000000..e9e01a19
--- /dev/null
+++ b/regress/mdoc/Fl/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.8 2014/08/21 12:56:24 schwarze Exp $
+
+REGRESS_TARGETS = noarg multiarg parsed punct font
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Fl/font.in b/regress/mdoc/Fl/font.in
new file mode 100644
index 00000000..c7514d31
--- /dev/null
+++ b/regress/mdoc/Fl/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt FL-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fl-font
+.Nd changing fonts inside the flag macro
+.Sh DESCRIPTION
+normal text
+.Fl bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Fl/font.out_ascii b/regress/mdoc/Fl/font.out_ascii
new file mode 100644
index 00000000..495c8975
--- /dev/null
+++ b/regress/mdoc/Fl/font.out_ascii
@@ -0,0 +1,9 @@
+FL-FONT(1) General Commands Manual FL-FONT(1)
+
+NNAAMMEE
+ FFll--ffoonntt - changing fonts inside the flag macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text --bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Fl/multiarg.in b/regress/mdoc/Fl/multiarg.in
new file mode 100644
index 00000000..77a9068e
--- /dev/null
+++ b/regress/mdoc/Fl/multiarg.in
@@ -0,0 +1,14 @@
+.Dd December 24, 2009
+.Dt FL-MULTIARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fl-multiarg
+.Nd multiple arguments to a Fl macro
+.Sh DESCRIPTION
+Each group of flags in
+.Fl a b c def
+gets its own dash.
+.Pp
+Punctuation characters like in
+.Op Fl a | b
+get no dash.
diff --git a/regress/mdoc/Fl/multiarg.out_ascii b/regress/mdoc/Fl/multiarg.out_ascii
new file mode 100644
index 00000000..0ad669e2
--- /dev/null
+++ b/regress/mdoc/Fl/multiarg.out_ascii
@@ -0,0 +1,11 @@
+FL-MULTIARG(1) General Commands Manual FL-MULTIARG(1)
+
+NNAAMMEE
+ FFll--mmuullttiiaarrgg - multiple arguments to a Fl macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Each group of flags in --aa --bb --cc --ddeeff gets its own dash.
+
+ Punctuation characters like in [--aa | --bb] get no dash.
+
+OpenBSD December 24, 2009 OpenBSD
diff --git a/regress/mdoc/Fl/noarg.in b/regress/mdoc/Fl/noarg.in
new file mode 100644
index 00000000..0c604dbc
--- /dev/null
+++ b/regress/mdoc/Fl/noarg.in
@@ -0,0 +1,19 @@
+.Dd August 21, 2014
+.Dt FL-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fl-noarg
+.Nd Fl macro without arguments
+.Sh DESCRIPTION
+Without an argument, it yields
+.Fl
+a dash.
+.Pp
+This is true even before middle
+.Fl | and
+trailing punctuation
+.Fl .
+.Pp
+Following macros
+.Fl Op flag
+follow without white space.
diff --git a/regress/mdoc/Fl/noarg.out_ascii b/regress/mdoc/Fl/noarg.out_ascii
new file mode 100644
index 00000000..eb230269
--- /dev/null
+++ b/regress/mdoc/Fl/noarg.out_ascii
@@ -0,0 +1,13 @@
+FL-NOARG(1) General Commands Manual FL-NOARG(1)
+
+NNAAMMEE
+ FFll--nnooaarrgg - Fl macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ Without an argument, it yields -- a dash.
+
+ This is true even before middle -- | --aanndd trailing punctuation --.
+
+ Following macros --[flag] follow without white space.
+
+OpenBSD August 21, 2014 OpenBSD
diff --git a/regress/mdoc/Fl/parsed.in b/regress/mdoc/Fl/parsed.in
new file mode 100644
index 00000000..4c93e016
--- /dev/null
+++ b/regress/mdoc/Fl/parsed.in
@@ -0,0 +1,18 @@
+.Dd April 7, 2010
+.Dt FL-PARSED 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fl-parsed
+.Nd is the Fl macro parsed?
+.Sh DESCRIPTION
+.Op Fl Ux
+.Pp
+.Op Ux
+.Pp
+.Op Fl Cm x
+.Pp
+.Fl W all
+versus
+.Fl W Ns Cm all
+.Pp
+.Fl Cm help
diff --git a/regress/mdoc/Fl/parsed.out_ascii b/regress/mdoc/Fl/parsed.out_ascii
new file mode 100644
index 00000000..3b6de9d4
--- /dev/null
+++ b/regress/mdoc/Fl/parsed.out_ascii
@@ -0,0 +1,17 @@
+FL-PARSED(1) General Commands Manual FL-PARSED(1)
+
+NNAAMMEE
+ FFll--ppaarrsseedd - is the Fl macro parsed?
+
+DDEESSCCRRIIPPTTIIOONN
+ [--UNIX]
+
+ [UNIX]
+
+ [--xx]
+
+ --WW --aallll versus --WWaallll
+
+ --hheellpp
+
+OpenBSD April 7, 2010 OpenBSD
diff --git a/regress/mdoc/Fl/punct.in b/regress/mdoc/Fl/punct.in
new file mode 100644
index 00000000..ac7eecc7
--- /dev/null
+++ b/regress/mdoc/Fl/punct.in
@@ -0,0 +1,39 @@
+.Dd August 21, 2014
+.Dt FL-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fl-punct
+.Nd punctuation handling by the Fl macro
+.Sh DESCRIPTION
+closing punctuation
+.Fl a )
+only one
+.Fl )
+only more than one
+.Fl ) )
+middle
+.Fl a ) z
+start
+.Fl ) z
+dot
+.Fl . z
+comma
+.Fl , z
+semicolon
+.Fl ; z
+colon
+.Fl : z
+quest
+.Fl ? z
+excl
+.Fl ! z
+paren
+.Fl ) z
+bracket
+.Fl ] z
+bar
+.Fl | m
+op paren
+.Fl ( a
+op bracket
+.Fl [ a
diff --git a/regress/mdoc/Fl/punct.out_ascii b/regress/mdoc/Fl/punct.out_ascii
new file mode 100644
index 00000000..b619154d
--- /dev/null
+++ b/regress/mdoc/Fl/punct.out_ascii
@@ -0,0 +1,12 @@
+FL-PUNCT(1) General Commands Manual FL-PUNCT(1)
+
+NNAAMMEE
+ FFll--ppuunncctt - punctuation handling by the Fl macro
+
+DDEESSCCRRIIPPTTIIOONN
+ closing punctuation --aa) only one --) only more than one --)) middle --aa) --zz
+ start --) --zz dot --. --zz comma --, --zz semicolon --; --zz colon --: --zz quest --? --zz
+ excl --! --zz paren --) --zz bracket --] --zz bar -- | --mm op paren (--aa op bracket
+ [--aa
+
+OpenBSD August 21, 2014 OpenBSD
diff --git a/regress/mdoc/Fo/Makefile b/regress/mdoc/Fo/Makefile
new file mode 100644
index 00000000..71242c8e
--- /dev/null
+++ b/regress/mdoc/Fo/Makefile
@@ -0,0 +1,15 @@
+# $OpenBSD: Makefile,v 1.13 2015/02/16 11:39:34 schwarze Exp $
+
+REGRESS_TARGETS = basic break eos font noarg nohead
+REGRESS_TARGETS += obsolete punct section warn
+LINT_TARGETS = noarg nohead obsolete warn
+
+# groff-1.22.3 defects:
+# - .Fo without an argument prints unbalanced parentheses
+# - .nr nS is ignored
+
+SKIP_GROFF = nohead section
+
+SKIP_TMAN = eos
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Fo/basic.in b/regress/mdoc/Fo/basic.in
new file mode 100644
index 00000000..5572ba63
--- /dev/null
+++ b/regress/mdoc/Fo/basic.in
@@ -0,0 +1,24 @@
+.Dd July 7, 2012
+.Dt FO-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-basic
+.Nd function blocks
+.Sh SYNOPSIS
+.Ft double
+.Fo sin
+.Fa "double x"
+.Fc
+.Ft double
+.Fo atan2
+.Fa "double y" "double x"
+.Fc
+.Sh DESCRIPTION
+.Ft double
+.Fo sin
+.Fa "double x"
+.Fc
+.Ft double
+.Fo atan2
+.Fa "double y" "double x"
+.Fc
diff --git a/regress/mdoc/Fo/basic.out_ascii b/regress/mdoc/Fo/basic.out_ascii
new file mode 100644
index 00000000..7ab11d47
--- /dev/null
+++ b/regress/mdoc/Fo/basic.out_ascii
@@ -0,0 +1,16 @@
+FO-BASIC(1) General Commands Manual FO-BASIC(1)
+
+NNAAMMEE
+ FFoo--bbaassiicc - function blocks
+
+SSYYNNOOPPSSIISS
+ _d_o_u_b_l_e
+ ssiinn(_d_o_u_b_l_e _x);
+
+ _d_o_u_b_l_e
+ aattaann22(_d_o_u_b_l_e _y, _d_o_u_b_l_e _x);
+
+DDEESSCCRRIIPPTTIIOONN
+ _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x) _d_o_u_b_l_e aattaann22(_d_o_u_b_l_e _y, _d_o_u_b_l_e _x)
+
+OpenBSD July 7, 2012 OpenBSD
diff --git a/regress/mdoc/Fo/break.in b/regress/mdoc/Fo/break.in
new file mode 100644
index 00000000..48a0a1a2
--- /dev/null
+++ b/regress/mdoc/Fo/break.in
@@ -0,0 +1,49 @@
+.Dd April 8, 2014
+.Dt FO-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-break
+.Nd line breaks in function blocks
+.Sh SYNOPSIS
+.Fd using \&Fn:
+.Ft my_long_return_type *
+.Fn my_long_function "my_long_type first_argument" "my_long_type second_argument"
+.Ft void
+.Fn "this function name is so ridiculously long \
+that it will not fit on the line" "my_long_type first_argument" \
+"my_long_type second_argument" "my_long_type third_argument"
+.Fd using \&Fo and single-argument \&Fa:
+.Ft my_long_return_type *
+.Fo my_long_function
+.Fa "my_long_type first_argument"
+.Fa "my_long_type second_argument"
+.Fc
+.Ft void
+.Fo "this function name is so ridiculously long \
+that it will not fit on the line"
+.Fa "my_long_type first_argument"
+.Fa "my_long_type second_argument"
+.Fa "my_long_type third_argument"
+.Fc
+.Fd using \&Fo and multi-argument \&Fa:
+.Ft my_long_return_type *
+.Fo my_long_function
+.Fa "my_long_type first_argument" "my_long_type second_argument"
+.Fc
+.Sh DESCRIPTION
+using Fn:
+.br
+.Fn my_long_function "my_long_type first_argument" "my_long_type second_argument"
+.Pp
+using Fo and single-argument Fa:
+.br
+.Fo my_long_function
+.Fa "my_long_type first_argument"
+.Fa "my_long_type second_argument"
+.Fc
+.Pp
+using Fo and multi-argument Fa:
+.br
+.Fo my_long_function
+.Fa "my_long_type first_argument" "my_long_type second_argument"
+.Fc
diff --git a/regress/mdoc/Fo/break.out_ascii b/regress/mdoc/Fo/break.out_ascii
new file mode 100644
index 00000000..d8a5df70
--- /dev/null
+++ b/regress/mdoc/Fo/break.out_ascii
@@ -0,0 +1,48 @@
+FO-BREAK(1) General Commands Manual FO-BREAK(1)
+
+NNAAMMEE
+ FFoo--bbrreeaakk - line breaks in function blocks
+
+SSYYNNOOPPSSIISS
+ uussiinngg FFnn::
+
+ _m_y___l_o_n_g___r_e_t_u_r_n___t_y_p_e _*
+ mmyy__lloonngg__ffuunnccttiioonn(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t,
+ _m_y___l_o_n_g___t_y_p_e _s_e_c_o_n_d___a_r_g_u_m_e_n_t);
+
+ _v_o_i_d
+ tthhiiss ffuunnccttiioonn nnaammee iiss ssoo rriiddiiccuulloouussllyy lloonngg tthhaatt iitt wwiillll nnoott ffiitt oonn tthhee
+ lliinnee(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t, _m_y___l_o_n_g___t_y_p_e _s_e_c_o_n_d___a_r_g_u_m_e_n_t,
+ _m_y___l_o_n_g___t_y_p_e _t_h_i_r_d___a_r_g_u_m_e_n_t);
+
+ uussiinngg FFoo aanndd ssiinnggllee--aarrgguummeenntt FFaa::
+
+ _m_y___l_o_n_g___r_e_t_u_r_n___t_y_p_e _*
+ mmyy__lloonngg__ffuunnccttiioonn(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t,
+ _m_y___l_o_n_g___t_y_p_e _s_e_c_o_n_d___a_r_g_u_m_e_n_t);
+
+ _v_o_i_d
+ tthhiiss ffuunnccttiioonn nnaammee iiss ssoo rriiddiiccuulloouussllyy lloonngg tthhaatt iitt wwiillll nnoott ffiitt oonn tthhee
+ lliinnee(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t, _m_y___l_o_n_g___t_y_p_e _s_e_c_o_n_d___a_r_g_u_m_e_n_t,
+ _m_y___l_o_n_g___t_y_p_e _t_h_i_r_d___a_r_g_u_m_e_n_t);
+
+ uussiinngg FFoo aanndd mmuullttii--aarrgguummeenntt FFaa::
+
+ _m_y___l_o_n_g___r_e_t_u_r_n___t_y_p_e _*
+ mmyy__lloonngg__ffuunnccttiioonn(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t,
+ _m_y___l_o_n_g___t_y_p_e _s_e_c_o_n_d___a_r_g_u_m_e_n_t);
+
+DDEESSCCRRIIPPTTIIOONN
+ using Fn:
+ mmyy__lloonngg__ffuunnccttiioonn(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t, _m_y___l_o_n_g___t_y_p_e
+ _s_e_c_o_n_d___a_r_g_u_m_e_n_t)
+
+ using Fo and single-argument Fa:
+ mmyy__lloonngg__ffuunnccttiioonn(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t,
+ _m_y___l_o_n_g___t_y_p_e _s_e_c_o_n_d___a_r_g_u_m_e_n_t)
+
+ using Fo and multi-argument Fa:
+ mmyy__lloonngg__ffuunnccttiioonn(_m_y___l_o_n_g___t_y_p_e _f_i_r_s_t___a_r_g_u_m_e_n_t,
+ _m_y___l_o_n_g___t_y_p_e _s_e_c_o_n_d___a_r_g_u_m_e_n_t)
+
+OpenBSD April 8, 2014 OpenBSD
diff --git a/regress/mdoc/Fo/eos.in b/regress/mdoc/Fo/eos.in
new file mode 100644
index 00000000..a97e00f9
--- /dev/null
+++ b/regress/mdoc/Fo/eos.in
@@ -0,0 +1,15 @@
+.Dd November 17, 2012
+.Dt FO-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-eos
+.Nd end of sentence handling after a function block
+.Sh DESCRIPTION
+As an example of a trigonometric function, let us consider
+.Fn "double sin" "double x" .
+Or do you prefer
+.Ft double
+.Fo cos
+.Fa double x
+.Fc .
+Either will do.
diff --git a/regress/mdoc/Fo/eos.out_ascii b/regress/mdoc/Fo/eos.out_ascii
new file mode 100644
index 00000000..a09113cf
--- /dev/null
+++ b/regress/mdoc/Fo/eos.out_ascii
@@ -0,0 +1,10 @@
+FO-EOS(1) General Commands Manual FO-EOS(1)
+
+NNAAMMEE
+ FFoo--eeooss - end of sentence handling after a function block
+
+DDEESSCCRRIIPPTTIIOONN
+ As an example of a trigonometric function, let us consider ddoouubbllee
+ ssiinn(_d_o_u_b_l_e _x). Or do you prefer _d_o_u_b_l_e ccooss(_d_o_u_b_l_e, _x). Either will do.
+
+OpenBSD November 17, 2012 OpenBSD
diff --git a/regress/mdoc/Fo/font.in b/regress/mdoc/Fo/font.in
new file mode 100644
index 00000000..894a86aa
--- /dev/null
+++ b/regress/mdoc/Fo/font.in
@@ -0,0 +1,19 @@
+.Dd July 9, 2012
+.Dt FO-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-font
+.Nd font nesting in function blocks
+.Sh DESCRIPTION
+.Fn prefix\\fIname\\fPsuffix "type arg"
+trailing text
+.Pp
+.Fo prefix\\fIname\\fPsuffix
+.Fa "type arg"
+.Fc
+trailing text
+.Pp
+.Fo function
+.Fa prefix\\fBbold\\fPsuffix
+.Fc
+trailing text
diff --git a/regress/mdoc/Fo/font.out_ascii b/regress/mdoc/Fo/font.out_ascii
new file mode 100644
index 00000000..3490ad8a
--- /dev/null
+++ b/regress/mdoc/Fo/font.out_ascii
@@ -0,0 +1,13 @@
+FO-FONT(1) General Commands Manual FO-FONT(1)
+
+NNAAMMEE
+ FFoo--ffoonntt - font nesting in function blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ pprreeffiixx_n_a_m_essuuffffiixx(_t_y_p_e _a_r_g) trailing text
+
+ pprreeffiixx_n_a_m_essuuffffiixx(_t_y_p_e _a_r_g) trailing text
+
+ ffuunnccttiioonn(_p_r_e_f_i_xbboolldd_s_u_f_f_i_x) trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Fo/noarg.in b/regress/mdoc/Fo/noarg.in
new file mode 100644
index 00000000..24eab004
--- /dev/null
+++ b/regress/mdoc/Fo/noarg.in
@@ -0,0 +1,44 @@
+.Dd July 12, 2012
+.Dt FN-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fn-noarg
+.Nd function name macro without arguments
+.Sh DESCRIPTION
+with arguments:
+.Ft int
+.Fn abs "int i"
+.Ft long
+.Fo labs bogus
+.Fa "long i"
+.Fc
+void function arguments:
+.Ft int
+.Fn rand
+.Ft long
+.Fo random
+.Fc
+.Ft u_int32_t
+.Fo arc4random
+.Fa
+.Fc
+no name arguments:
+.Ft int
+.Fn
+no type arguments:
+.Ft
+.Fn abs "int i"
+no type and void function arguments:
+.Ft
+.Fn rand
+.Ft
+.Fo random
+.Fc
+.Ft
+.Fo arc4random
+.Fa
+.Fc
+no arguments at all:
+.Ft
+.Fn
+end of test document
diff --git a/regress/mdoc/Fo/noarg.out_ascii b/regress/mdoc/Fo/noarg.out_ascii
new file mode 100644
index 00000000..bd895e4a
--- /dev/null
+++ b/regress/mdoc/Fo/noarg.out_ascii
@@ -0,0 +1,12 @@
+FN-NOARG(1) General Commands Manual FN-NOARG(1)
+
+NNAAMMEE
+ FFnn--nnooaarrgg - function name macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ with arguments: _i_n_t aabbss(_i_n_t _i) _l_o_n_g llaabbss(_l_o_n_g _i) void function arguments:
+ _i_n_t rraanndd() _l_o_n_g rraannddoomm() _u___i_n_t_3_2___t aarrcc44rraannddoomm() no name arguments: _i_n_t no
+ type arguments: aabbss(_i_n_t _i) no type and void function arguments: rraanndd()
+ rraannddoomm() aarrcc44rraannddoomm() no arguments at all: end of test document
+
+OpenBSD July 12, 2012 OpenBSD
diff --git a/regress/mdoc/Fo/noarg.out_lint b/regress/mdoc/Fo/noarg.out_lint
new file mode 100644
index 00000000..4c72b01d
--- /dev/null
+++ b/regress/mdoc/Fo/noarg.out_lint
@@ -0,0 +1,10 @@
+mandoc: noarg.in:23:2: WARNING: skipping empty macro: Fa
+mandoc: noarg.in:27:2: WARNING: skipping empty macro: Fn
+mandoc: noarg.in:29:2: WARNING: skipping empty macro: Ft
+mandoc: noarg.in:32:2: WARNING: skipping empty macro: Ft
+mandoc: noarg.in:34:2: WARNING: skipping empty macro: Ft
+mandoc: noarg.in:37:2: WARNING: skipping empty macro: Ft
+mandoc: noarg.in:39:2: WARNING: skipping empty macro: Fa
+mandoc: noarg.in:42:2: WARNING: skipping empty macro: Ft
+mandoc: noarg.in:43:2: WARNING: skipping empty macro: Fn
+mandoc: noarg.in:12:10: ERROR: skipping excess arguments: Fo ... bogus
diff --git a/regress/mdoc/Fo/nohead.in b/regress/mdoc/Fo/nohead.in
new file mode 100644
index 00000000..c41b5e6e
--- /dev/null
+++ b/regress/mdoc/Fo/nohead.in
@@ -0,0 +1,13 @@
+.Dd February 5, 2015
+.Dt FO-NOHEAD 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-nohead
+.Nd function block macro without head argument
+.Sh DESCRIPTION
+initial text
+.Ft int
+.Fo
+.Fa int
+.Fc
+final text
diff --git a/regress/mdoc/Fo/nohead.out_ascii b/regress/mdoc/Fo/nohead.out_ascii
new file mode 100644
index 00000000..c1ad57d7
--- /dev/null
+++ b/regress/mdoc/Fo/nohead.out_ascii
@@ -0,0 +1,9 @@
+FO-NOHEAD(1) General Commands Manual FO-NOHEAD(1)
+
+NNAAMMEE
+ FFoo--nnoohheeaadd - function block macro without head argument
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text _i_n_t(_i_n_t) final text
+
+OpenBSD February 5, 2015 OpenBSD
diff --git a/regress/mdoc/Fo/nohead.out_lint b/regress/mdoc/Fo/nohead.out_lint
new file mode 100644
index 00000000..aa0d5242
--- /dev/null
+++ b/regress/mdoc/Fo/nohead.out_lint
@@ -0,0 +1 @@
+mandoc: nohead.in:10:2: WARNING: missing function name, using "": Fo
diff --git a/regress/mdoc/Fo/obsolete.in b/regress/mdoc/Fo/obsolete.in
new file mode 100644
index 00000000..4901cbd5
--- /dev/null
+++ b/regress/mdoc/Fo/obsolete.in
@@ -0,0 +1,12 @@
+.Dd July 2, 2014
+.Dt FO-OBSOLETE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-obsolete
+.Nd obsolete function macros
+.Sh DESCRIPTION
+old function type
+.Ot fortran
+.Pp
+function return value
+.Fr value
diff --git a/regress/mdoc/Fo/obsolete.out_ascii b/regress/mdoc/Fo/obsolete.out_ascii
new file mode 100644
index 00000000..3e2cc617
--- /dev/null
+++ b/regress/mdoc/Fo/obsolete.out_ascii
@@ -0,0 +1,11 @@
+FO-OBSOLETE(1) General Commands Manual FO-OBSOLETE(1)
+
+NNAAMMEE
+ FFoo--oobbssoolleettee - obsolete function macros
+
+DDEESSCCRRIIPPTTIIOONN
+ old function type _f_o_r_t_r_a_n
+
+ function return value _v_a_l_u_e
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Fo/obsolete.out_lint b/regress/mdoc/Fo/obsolete.out_lint
new file mode 100644
index 00000000..c1ad3d85
--- /dev/null
+++ b/regress/mdoc/Fo/obsolete.out_lint
@@ -0,0 +1,2 @@
+mandoc: obsolete.in:9:2: WARNING: obsolete macro: Ot
+mandoc: obsolete.in:12:2: WARNING: obsolete macro: Fr
diff --git a/regress/mdoc/Fo/punct.in b/regress/mdoc/Fo/punct.in
new file mode 100644
index 00000000..0b407ffb
--- /dev/null
+++ b/regress/mdoc/Fo/punct.in
@@ -0,0 +1,9 @@
+.Dd November 20, 2014
+.Dt FO-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-punct
+.Nd punctuation on function name input lines
+.Sh DESCRIPTION
+.Ft double
+.Fn sin , cos
diff --git a/regress/mdoc/Fo/punct.out_ascii b/regress/mdoc/Fo/punct.out_ascii
new file mode 100644
index 00000000..4e8b1abe
--- /dev/null
+++ b/regress/mdoc/Fo/punct.out_ascii
@@ -0,0 +1,9 @@
+FO-PUNCT(1) General Commands Manual FO-PUNCT(1)
+
+NNAAMMEE
+ FFoo--ppuunncctt - punctuation on function name input lines
+
+DDEESSCCRRIIPPTTIIOONN
+ _d_o_u_b_l_e ssiinn(), cos
+
+OpenBSD November 20, 2014 OpenBSD
diff --git a/regress/mdoc/Fo/section.in b/regress/mdoc/Fo/section.in
new file mode 100644
index 00000000..7816ca49
--- /dev/null
+++ b/regress/mdoc/Fo/section.in
@@ -0,0 +1,83 @@
+.Dd April 7, 2010
+.Dt FN-SECTION 3
+.Os OpenBSD
+.Sh NAME
+.Nm Fn-section
+.Nd special handling of Fn in various sections
+.Sh SYNOPSIS
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh DESCRIPTION
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh RETURN VALUES
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh ENVIRONMENT
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh FILES
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh EXAMPLES
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh DIAGNOSTICS
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh ERRORS
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh SEE ALSO
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh STANDARDS
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh HISTORY
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh AUTHORS
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh CAVEATS
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh BUGS
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.Sh CUSTOM
+.nr nS 1
+.Ft int
+.Fn abs "int j"
+.Ft double
+.Fn sin "double x"
+.nr nS 0
diff --git a/regress/mdoc/Fo/section.out_ascii b/regress/mdoc/Fo/section.out_ascii
new file mode 100644
index 00000000..9273ce84
--- /dev/null
+++ b/regress/mdoc/Fo/section.out_ascii
@@ -0,0 +1,59 @@
+FN-SECTION(3) Library Functions Manual FN-SECTION(3)
+
+NNAAMMEE
+ FFnn--sseeccttiioonn - special handling of Fn in various sections
+
+SSYYNNOOPPSSIISS
+ _i_n_t
+ aabbss(_i_n_t _j);
+
+ _d_o_u_b_l_e
+ ssiinn(_d_o_u_b_l_e _x);
+
+DDEESSCCRRIIPPTTIIOONN
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+RREETTUURRNN VVAALLUUEESS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+EENNVVIIRROONNMMEENNTT
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+FFIILLEESS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+EEXXAAMMPPLLEESS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+DDIIAAGGNNOOSSTTIICCSS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+EERRRROORRSS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+SSEEEE AALLSSOO
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+SSTTAANNDDAARRDDSS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+HHIISSTTOORRYY
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+AAUUTTHHOORRSS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+CCAAVVEEAATTSS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+BBUUGGSS
+ _i_n_t aabbss(_i_n_t _j) _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x)
+
+CCUUSSTTOOMM
+ _i_n_t
+ aabbss(_i_n_t _j);
+
+ _d_o_u_b_l_e
+ ssiinn(_d_o_u_b_l_e _x);
+
+OpenBSD April 7, 2010 OpenBSD
diff --git a/regress/mdoc/Fo/warn.in b/regress/mdoc/Fo/warn.in
new file mode 100644
index 00000000..d41e658c
--- /dev/null
+++ b/regress/mdoc/Fo/warn.in
@@ -0,0 +1,13 @@
+.Dd October 11, 2014
+.Dt FO-WARN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Fo-warn
+.Nd warnings related to function blocks
+.Sh SYNOPSIS
+.Ft double
+.Fo sin()
+.Fa "double x"
+.Fc
+.Ft double
+.Fn atan2 "double y, double x"
diff --git a/regress/mdoc/Fo/warn.out_ascii b/regress/mdoc/Fo/warn.out_ascii
new file mode 100644
index 00000000..fd1890b5
--- /dev/null
+++ b/regress/mdoc/Fo/warn.out_ascii
@@ -0,0 +1,13 @@
+FO-WARN(1) General Commands Manual FO-WARN(1)
+
+NNAAMMEE
+ FFoo--wwaarrnn - warnings related to function blocks
+
+SSYYNNOOPPSSIISS
+ _d_o_u_b_l_e
+ ssiinn(())(_d_o_u_b_l_e _x);
+
+ _d_o_u_b_l_e
+ aattaann22(_d_o_u_b_l_e _y_, _d_o_u_b_l_e _x);
+
+OpenBSD October 11, 2014 OpenBSD
diff --git a/regress/mdoc/Fo/warn.out_lint b/regress/mdoc/Fo/warn.out_lint
new file mode 100644
index 00000000..09fc534f
--- /dev/null
+++ b/regress/mdoc/Fo/warn.out_lint
@@ -0,0 +1,2 @@
+mandoc: warn.in:9:8: WARNING: parenthesis in function name: sin()
+mandoc: warn.in:13:19: WARNING: comma in function argument: double y, double x
diff --git a/regress/mdoc/Ft/Makefile b/regress/mdoc/Ft/Makefile
new file mode 100644
index 00000000..915e456c
--- /dev/null
+++ b/regress/mdoc/Ft/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2012/07/09 17:52:09 schwarze Exp $
+
+REGRESS_TARGETS = font
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ft/font.in b/regress/mdoc/Ft/font.in
new file mode 100644
index 00000000..6304aadd
--- /dev/null
+++ b/regress/mdoc/Ft/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt FT-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ft-font
+.Nd changing fonts inside the function return type macro
+.Sh DESCRIPTION
+normal text
+.Ft emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Ft/font.out_ascii b/regress/mdoc/Ft/font.out_ascii
new file mode 100644
index 00000000..ded66eca
--- /dev/null
+++ b/regress/mdoc/Ft/font.out_ascii
@@ -0,0 +1,9 @@
+FT-FONT(1) General Commands Manual FT-FONT(1)
+
+NNAAMMEE
+ FFtt--ffoonntt - changing fonts inside the function return type macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Ic/Makefile b/regress/mdoc/Ic/Makefile
new file mode 100644
index 00000000..1be2a84a
--- /dev/null
+++ b/regress/mdoc/Ic/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = noarg font
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ic/font.in b/regress/mdoc/Ic/font.in
new file mode 100644
index 00000000..26e80298
--- /dev/null
+++ b/regress/mdoc/Ic/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt IC-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ic-font
+.Nd changing fonts inside the internal command macro
+.Sh DESCRIPTION
+normal text
+.Ic bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Ic/font.out_ascii b/regress/mdoc/Ic/font.out_ascii
new file mode 100644
index 00000000..6267aed3
--- /dev/null
+++ b/regress/mdoc/Ic/font.out_ascii
@@ -0,0 +1,9 @@
+IC-FONT(1) General Commands Manual IC-FONT(1)
+
+NNAAMMEE
+ IIcc--ffoonntt - changing fonts inside the internal command macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Ic/noarg.in b/regress/mdoc/Ic/noarg.in
new file mode 100644
index 00000000..76c22e7b
--- /dev/null
+++ b/regress/mdoc/Ic/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt IC-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ic-noarg
+.Nd interactive command without an argument
+.Sh DESCRIPTION
+with command:
+.Ic ls
+no command:
+.Ic
+end of test document
diff --git a/regress/mdoc/Ic/noarg.out_ascii b/regress/mdoc/Ic/noarg.out_ascii
new file mode 100644
index 00000000..c5dda265
--- /dev/null
+++ b/regress/mdoc/Ic/noarg.out_ascii
@@ -0,0 +1,9 @@
+IC-NOARG(1) General Commands Manual IC-NOARG(1)
+
+NNAAMMEE
+ IIcc--nnooaarrgg - interactive command without an argument
+
+DDEESSCCRRIIPPTTIIOONN
+ with command: llss no command: end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Ic/noarg.out_lint b/regress/mdoc/Ic/noarg.out_lint
new file mode 100644
index 00000000..5ae495bd
--- /dev/null
+++ b/regress/mdoc/Ic/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Ic
diff --git a/regress/mdoc/In/Makefile b/regress/mdoc/In/Makefile
new file mode 100644
index 00000000..790827bb
--- /dev/null
+++ b/regress/mdoc/In/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.6 2015/02/06 01:07:07 schwarze Exp $
+
+REGRESS_TARGETS = break eos font noarg
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/In/break.in b/regress/mdoc/In/break.in
new file mode 100644
index 00000000..0e26731b
--- /dev/null
+++ b/regress/mdoc/In/break.in
@@ -0,0 +1,26 @@
+.Dd June 6, 2010
+.Dt IN-BREAK 2
+.Os OpenBSD
+.Sh NAME
+.Nm In-break
+.Nd line break before header include file
+.Sh SYNOPSIS
+.In fcntl.h
+.Ft int
+.Fn open "const char *path" "int flags" "mode_t mode"
+.In sys/types.h
+.In unistd.h
+.Ft int
+.Fn dup "int oldd"
+.Ft ssize_t
+.Fn write "int d" "const void *buf" "size_t nbytes"
+.Sh DESCRIPTION
+.In fcntl.h
+.Ft int
+.Fn open "const char *path" "int flags" "mode_t mode"
+.In sys/types.h
+.In unistd.h
+.Ft int
+.Fn dup "int oldd"
+.Ft ssize_t
+.Fn write "int d" "const void *buf" "size_t nbytes"
diff --git a/regress/mdoc/In/break.out_ascii b/regress/mdoc/In/break.out_ascii
new file mode 100644
index 00000000..d6488f81
--- /dev/null
+++ b/regress/mdoc/In/break.out_ascii
@@ -0,0 +1,26 @@
+IN-BREAK(2) System Calls Manual IN-BREAK(2)
+
+NNAAMMEE
+ IInn--bbrreeaakk - line break before header include file
+
+SSYYNNOOPPSSIISS
+ ##iinncclluuddee <<ffccnnttll..hh>>
+
+ _i_n_t
+ ooppeenn(_c_o_n_s_t _c_h_a_r _*_p_a_t_h, _i_n_t _f_l_a_g_s, _m_o_d_e___t _m_o_d_e);
+
+ ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
+ ##iinncclluuddee <<uunniissttdd..hh>>
+
+ _i_n_t
+ dduupp(_i_n_t _o_l_d_d);
+
+ _s_s_i_z_e___t
+ wwrriittee(_i_n_t _d, _c_o_n_s_t _v_o_i_d _*_b_u_f, _s_i_z_e___t _n_b_y_t_e_s);
+
+DDEESSCCRRIIPPTTIIOONN
+ <_f_c_n_t_l_._h> _i_n_t ooppeenn(_c_o_n_s_t _c_h_a_r _*_p_a_t_h, _i_n_t _f_l_a_g_s, _m_o_d_e___t _m_o_d_e)
+ <_s_y_s_/_t_y_p_e_s_._h> <_u_n_i_s_t_d_._h> _i_n_t dduupp(_i_n_t _o_l_d_d) _s_s_i_z_e___t wwrriittee(_i_n_t _d, _c_o_n_s_t
+ _v_o_i_d _*_b_u_f, _s_i_z_e___t _n_b_y_t_e_s)
+
+OpenBSD June 6, 2010 OpenBSD
diff --git a/regress/mdoc/In/eos.in b/regress/mdoc/In/eos.in
new file mode 100644
index 00000000..929c2be9
--- /dev/null
+++ b/regress/mdoc/In/eos.in
@@ -0,0 +1,10 @@
+.Dd November 16, 2012
+.Dt IN-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm In-eos
+.Nd end of sentence handling after the include macro
+.Sh DESCRIPTION
+Let's use
+.In string.h .
+And then something else.
diff --git a/regress/mdoc/In/eos.out_ascii b/regress/mdoc/In/eos.out_ascii
new file mode 100644
index 00000000..4f5a1036
--- /dev/null
+++ b/regress/mdoc/In/eos.out_ascii
@@ -0,0 +1,9 @@
+IN-EOS(1) General Commands Manual IN-EOS(1)
+
+NNAAMMEE
+ IInn--eeooss - end of sentence handling after the include macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Let's use <_s_t_r_i_n_g_._h>. And then something else.
+
+OpenBSD November 16, 2012 OpenBSD
diff --git a/regress/mdoc/In/font.in b/regress/mdoc/In/font.in
new file mode 100644
index 00000000..e24ab18d
--- /dev/null
+++ b/regress/mdoc/In/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt IN-FONT 2
+.Os OpenBSD
+.Sh NAME
+.Nm In-font
+.Nd changing the font inside the include macro
+.Sh DESCRIPTION
+normal text
+.In prefix\\fBheader\\fPsuffix
+trailing text
diff --git a/regress/mdoc/In/font.out_ascii b/regress/mdoc/In/font.out_ascii
new file mode 100644
index 00000000..7d1948e4
--- /dev/null
+++ b/regress/mdoc/In/font.out_ascii
@@ -0,0 +1,9 @@
+IN-FONT(2) System Calls Manual IN-FONT(2)
+
+NNAAMMEE
+ IInn--ffoonntt - changing the font inside the include macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text <_p_r_e_f_i_xhheeaaddeerr_s_u_f_f_i_x> trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/In/noarg.in b/regress/mdoc/In/noarg.in
new file mode 100644
index 00000000..f443637a
--- /dev/null
+++ b/regress/mdoc/In/noarg.in
@@ -0,0 +1,20 @@
+.Dd February 5, 2015
+.Dt IN-NOARG 2
+.Os OpenBSD
+.Sh NAME
+.Nm In-noarg
+.Nd include file macros without argument
+.Sh SYNOPSIS
+.In math.h
+.Ft double
+.Fn sin "double x"
+.In
+.Ft double
+.Fn cos "double x"
+.Sh DESCRIPTION
+.In math.h
+.Ft double
+.Fn sin "double x"
+.In
+.Ft double
+.Fn cos "double x"
diff --git a/regress/mdoc/In/noarg.out_ascii b/regress/mdoc/In/noarg.out_ascii
new file mode 100644
index 00000000..1a86acd6
--- /dev/null
+++ b/regress/mdoc/In/noarg.out_ascii
@@ -0,0 +1,18 @@
+IN-NOARG(2) System Calls Manual IN-NOARG(2)
+
+NNAAMMEE
+ IInn--nnooaarrgg - include file macros without argument
+
+SSYYNNOOPPSSIISS
+ ##iinncclluuddee <<mmaatthh..hh>>
+
+ _d_o_u_b_l_e
+ ssiinn(_d_o_u_b_l_e _x);
+
+ _d_o_u_b_l_e
+ ccooss(_d_o_u_b_l_e _x);
+
+DDEESSCCRRIIPPTTIIOONN
+ <_m_a_t_h_._h> _d_o_u_b_l_e ssiinn(_d_o_u_b_l_e _x) _d_o_u_b_l_e ccooss(_d_o_u_b_l_e _x)
+
+OpenBSD February 5, 2015 OpenBSD
diff --git a/regress/mdoc/In/noarg.out_lint b/regress/mdoc/In/noarg.out_lint
new file mode 100644
index 00000000..3b4e6d22
--- /dev/null
+++ b/regress/mdoc/In/noarg.out_lint
@@ -0,0 +1,2 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: In
+mandoc: noarg.in:18:2: WARNING: skipping empty macro: In
diff --git a/regress/mdoc/Lb/Makefile b/regress/mdoc/Lb/Makefile
new file mode 100644
index 00000000..952e0881
--- /dev/null
+++ b/regress/mdoc/Lb/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.6 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = break badargs eos
+LINT_TARGETS = badargs
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Lb/badargs.in b/regress/mdoc/Lb/badargs.in
new file mode 100644
index 00000000..f1fea204
--- /dev/null
+++ b/regress/mdoc/Lb/badargs.in
@@ -0,0 +1,10 @@
+.Dd January 2, 2011
+.Dt LB-BADARGS 3
+.Os OpenBSD
+.Sh NAME
+.Nm Lb-badargs
+.Nd bad arguments to the library macro
+.Sh LIBRARY
+.Lb murks
+.Lb
+.Lb mylib another
diff --git a/regress/mdoc/Lb/badargs.out_ascii b/regress/mdoc/Lb/badargs.out_ascii
new file mode 100644
index 00000000..f5bd4afe
--- /dev/null
+++ b/regress/mdoc/Lb/badargs.out_ascii
@@ -0,0 +1,10 @@
+LB-BADARGS(3) Library Functions Manual LB-BADARGS(3)
+
+NNAAMMEE
+ LLbb--bbaaddaarrggss - bad arguments to the library macro
+
+LLIIBBRRAARRYY
+ library ``murks''
+ library ``mylib'' another
+
+OpenBSD January 2, 2011 OpenBSD
diff --git a/regress/mdoc/Lb/badargs.out_lint b/regress/mdoc/Lb/badargs.out_lint
new file mode 100644
index 00000000..52af647d
--- /dev/null
+++ b/regress/mdoc/Lb/badargs.out_lint
@@ -0,0 +1 @@
+mandoc: badargs.in:9:2: WARNING: skipping empty macro: Lb
diff --git a/regress/mdoc/Lb/break.in b/regress/mdoc/Lb/break.in
new file mode 100644
index 00000000..a6c3d1bf
--- /dev/null
+++ b/regress/mdoc/Lb/break.in
@@ -0,0 +1,12 @@
+.Dd June 30, 2010
+.Dt LB-BREAK 3
+.Os OpenBSD
+.Sh NAME
+.Nm Lb-break
+.Nd output line breaks after the library macro
+.Sh LIBRARY
+.Lb mylib
+text
+.Sh DESCRIPTION
+.Lb mylib
+text
diff --git a/regress/mdoc/Lb/break.out_ascii b/regress/mdoc/Lb/break.out_ascii
new file mode 100644
index 00000000..6c9e5698
--- /dev/null
+++ b/regress/mdoc/Lb/break.out_ascii
@@ -0,0 +1,13 @@
+LB-BREAK(3) Library Functions Manual LB-BREAK(3)
+
+NNAAMMEE
+ LLbb--bbrreeaakk - output line breaks after the library macro
+
+LLIIBBRRAARRYY
+ library ``mylib''
+ text
+
+DDEESSCCRRIIPPTTIIOONN
+ library ``mylib'' text
+
+OpenBSD June 30, 2010 OpenBSD
diff --git a/regress/mdoc/Lb/eos.in b/regress/mdoc/Lb/eos.in
new file mode 100644
index 00000000..f48e71a2
--- /dev/null
+++ b/regress/mdoc/Lb/eos.in
@@ -0,0 +1,10 @@
+.Dd November 17, 2012
+.Dt LB-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Lb-eos
+.Nd end of sentence handling after the library macro
+.Sh DESCRIPTION
+Let's use the
+.Lb mylib .
+And some other libraries.
diff --git a/regress/mdoc/Lb/eos.out_ascii b/regress/mdoc/Lb/eos.out_ascii
new file mode 100644
index 00000000..bbb726f1
--- /dev/null
+++ b/regress/mdoc/Lb/eos.out_ascii
@@ -0,0 +1,9 @@
+LB-EOS(1) General Commands Manual LB-EOS(1)
+
+NNAAMMEE
+ LLbb--eeooss - end of sentence handling after the library macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Let's use the library ``mylib''. And some other libraries.
+
+OpenBSD November 17, 2012 OpenBSD
diff --git a/regress/mdoc/Li/Makefile b/regress/mdoc/Li/Makefile
new file mode 100644
index 00000000..f5afd199
--- /dev/null
+++ b/regress/mdoc/Li/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = punct font
+LINT_TARGETS = punct
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Li/font.in b/regress/mdoc/Li/font.in
new file mode 100644
index 00000000..d15d61bb
--- /dev/null
+++ b/regress/mdoc/Li/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt LI-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Li-font
+.Nd changing fonts inside the literal in-line macro
+.Sh DESCRIPTION
+normal text
+.Li literal\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Li/font.out_ascii b/regress/mdoc/Li/font.out_ascii
new file mode 100644
index 00000000..4e012881
--- /dev/null
+++ b/regress/mdoc/Li/font.out_ascii
@@ -0,0 +1,9 @@
+LI-FONT(1) General Commands Manual LI-FONT(1)
+
+NNAAMMEE
+ LLii--ffoonntt - changing fonts inside the literal in-line macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text literal_e_m_p_h_a_s_i_sback trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Li/punct.in b/regress/mdoc/Li/punct.in
new file mode 100644
index 00000000..331e55da
--- /dev/null
+++ b/regress/mdoc/Li/punct.in
@@ -0,0 +1,83 @@
+.Dd November 17, 2014
+.Dt LI-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Li-punct
+.Nd punctuation following a literal macro
+.Sh DESCRIPTION
+Leading punctuation:
+.Li ( b
+.Li [ b
+.Li | b
+.Li . b
+.Li , b
+.Li ; b
+.Li : b
+.Li ? b
+.Li ! b
+.Li ) b
+.Li ] b
+.Pp
+Trailing punctuation:
+.Li a (
+.Li a [
+.Li a |
+.Li a .
+.Li a ,
+.Li a ;
+.Li a :
+.Li a ?
+.Li a !
+.Li a )
+.Li a ]
+.Pp
+Middle punctuation:
+.Li a ( b
+.Li a [ b
+.Li a | b
+.Li a . b
+.Li a , b
+.Li a ; b
+.Li a : b
+.Li a ? b
+.Li a ! b
+.Li a ) b
+.Li a ] b
+.Pp
+Isolated punctuation:
+.Li a Li ( Li b
+.Li a Li [ Li b
+.Li a Li | Li b
+.Li a Li . Li b
+.Li a Li , Li b
+.Li a Li ; Li b
+.Li a Li : Li b
+.Li a Li ? Li b
+.Li a Li ! Li b
+.Li a Li ) Li b
+.Li a Li ] Li b
+.Pp
+Isolated trailing punctuation:
+.Li a Li (
+.Li a Li [
+.Li a Li |
+.Li a Li .
+.Li a Li ,
+.Li a Li ;
+.Li a Li :
+.Li a Li ?
+.Li a Li !
+.Li a Li )
+.Li a Li ]
+.Pp
+Multiple isolated punctuation:
+.Li a Li ( [ Li b
+.Li a Li ) ] Li b
+.Pp
+Multiple punctuation:
+.Li [ ( arg ) ] .
+.Pp
+Quoted:
+.Li "a . b Nm"
+.Li ". b Nm"
+.Li "."
diff --git a/regress/mdoc/Li/punct.out_ascii b/regress/mdoc/Li/punct.out_ascii
new file mode 100644
index 00000000..ae7d3f62
--- /dev/null
+++ b/regress/mdoc/Li/punct.out_ascii
@@ -0,0 +1,26 @@
+LI-PUNCT(1) General Commands Manual LI-PUNCT(1)
+
+NNAAMMEE
+ LLii--ppuunncctt - punctuation following a literal macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Leading punctuation: (b [b | b . b , b ; b : b ? b ! b ) b ] b
+
+ Trailing punctuation: a ( a [ a | a. a, a; a: a? a! a) a]
+
+ Middle punctuation: a (b a [b a | b a. b a, b a; b a: b a? b a! b a) b a]
+ b
+
+ Isolated punctuation: a (b a [b a | b a . b a , b a ; b a : b a ? b a ! b
+ a ) b a ] b
+
+ Isolated trailing punctuation: a ( a [ a | a . a , a ; a : a ? a ! a )
+ a ]
+
+ Multiple isolated punctuation: a ([b a )] b
+
+ Multiple punctuation: [(arg)].
+
+ Quoted: a . b Nm . b Nm .
+
+OpenBSD November 17, 2014 OpenBSD
diff --git a/regress/mdoc/Li/punct.out_lint b/regress/mdoc/Li/punct.out_lint
new file mode 100644
index 00000000..3abdf12f
--- /dev/null
+++ b/regress/mdoc/Li/punct.out_lint
@@ -0,0 +1,24 @@
+mandoc: punct.in:48:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:49:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:50:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:51:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:52:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:53:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:54:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:55:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:56:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:57:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:58:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:61:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:62:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:63:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:64:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:65:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:66:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:67:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:68:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:69:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:70:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:71:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:74:7: WARNING: skipping empty macro: Li
+mandoc: punct.in:75:7: WARNING: skipping empty macro: Li
diff --git a/regress/mdoc/Lk/Makefile b/regress/mdoc/Lk/Makefile
new file mode 100644
index 00000000..d9cbbe95
--- /dev/null
+++ b/regress/mdoc/Lk/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = link noarg font
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Lk/font.in b/regress/mdoc/Lk/font.in
new file mode 100644
index 00000000..23af0554
--- /dev/null
+++ b/regress/mdoc/Lk/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt LK-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Lk-font
+.Nd changing the font inside the hyperlink macro
+.Sh DESCRIPTION
+normal text
+.Lk http://www.\\fIopenbsd\\fP.org/ Open\\fBBSD\\fPweb
+trailing text
diff --git a/regress/mdoc/Lk/font.out_ascii b/regress/mdoc/Lk/font.out_ascii
new file mode 100644
index 00000000..5c0425a1
--- /dev/null
+++ b/regress/mdoc/Lk/font.out_ascii
@@ -0,0 +1,9 @@
+LK-FONT(1) General Commands Manual LK-FONT(1)
+
+NNAAMMEE
+ LLkk--ffoonntt - changing the font inside the hyperlink macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _O_p_e_nBBSSDD_w_e_b_: hhttttpp::////wwwwww.._o_p_e_n_b_s_d..oorrgg// trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Lk/link.in b/regress/mdoc/Lk/link.in
new file mode 100644
index 00000000..b5ea4901
--- /dev/null
+++ b/regress/mdoc/Lk/link.in
@@ -0,0 +1,16 @@
+.Dd August 8, 2010
+.Dt LK-LINK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Lk-link
+.Nd formatting of hyperlinks
+.Sh DESCRIPTION
+Here are some web sites of BSD operating systems:
+.Lk http://www.freebsd.org/ FreeBSD
+.Lk http://www.netbsd.org/ NetBSD
+.Lk http://www.openbsd.org/ OpenBSD
+.Sh SEE ALSO
+Here are some web sites of BSD operating systems:
+.Lk http://www.freebsd.org/ FreeBSD
+.Lk http://www.netbsd.org/ NetBSD
+.Lk http://www.openbsd.org/ OpenBSD
diff --git a/regress/mdoc/Lk/link.out_ascii b/regress/mdoc/Lk/link.out_ascii
new file mode 100644
index 00000000..90d736e0
--- /dev/null
+++ b/regress/mdoc/Lk/link.out_ascii
@@ -0,0 +1,16 @@
+LK-LINK(1) General Commands Manual LK-LINK(1)
+
+NNAAMMEE
+ LLkk--lliinnkk - formatting of hyperlinks
+
+DDEESSCCRRIIPPTTIIOONN
+ Here are some web sites of BSD operating systems: _F_r_e_e_B_S_D_:
+ hhttttpp::////wwwwww..ffrreeeebbssdd..oorrgg// _N_e_t_B_S_D_: hhttttpp::////wwwwww..nneettbbssdd..oorrgg// _O_p_e_n_B_S_D_:
+ hhttttpp::////wwwwww..ooppeennbbssdd..oorrgg//
+
+SSEEEE AALLSSOO
+ Here are some web sites of BSD operating systems: _F_r_e_e_B_S_D_:
+ hhttttpp::////wwwwww..ffrreeeebbssdd..oorrgg// _N_e_t_B_S_D_: hhttttpp::////wwwwww..nneettbbssdd..oorrgg// _O_p_e_n_B_S_D_:
+ hhttttpp::////wwwwww..ooppeennbbssdd..oorrgg//
+
+OpenBSD August 8, 2010 OpenBSD
diff --git a/regress/mdoc/Lk/noarg.in b/regress/mdoc/Lk/noarg.in
new file mode 100644
index 00000000..068c57f6
--- /dev/null
+++ b/regress/mdoc/Lk/noarg.in
@@ -0,0 +1,14 @@
+.Dd January 19, 2011
+.Dt LK-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Lk-noarg
+.Nd hyperlink macro without arguments
+.Sh DESCRIPTION
+two arguments
+.Lk http://mdocml.bsd.lv/ mandoc
+one argument
+.Lk http://www.openbsd.org/
+no argument
+.Lk
+end of test document
diff --git a/regress/mdoc/Lk/noarg.out_ascii b/regress/mdoc/Lk/noarg.out_ascii
new file mode 100644
index 00000000..8c201f3d
--- /dev/null
+++ b/regress/mdoc/Lk/noarg.out_ascii
@@ -0,0 +1,10 @@
+LK-NOARG(1) General Commands Manual LK-NOARG(1)
+
+NNAAMMEE
+ LLkk--nnooaarrgg - hyperlink macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ two arguments _m_a_n_d_o_c_: hhttttpp::////mmddooccmmll..bbssdd..llvv// one argument
+ hhttttpp::////wwwwww..ooppeennbbssdd..oorrgg// no argument end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Lk/noarg.out_lint b/regress/mdoc/Lk/noarg.out_lint
new file mode 100644
index 00000000..d5a3af14
--- /dev/null
+++ b/regress/mdoc/Lk/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:13:2: WARNING: skipping empty macro: Lk
diff --git a/regress/mdoc/Makefile b/regress/mdoc/Makefile
new file mode 100644
index 00000000..86bdcb7a
--- /dev/null
+++ b/regress/mdoc/Makefile
@@ -0,0 +1,9 @@
+# $OpenBSD: Makefile,v 1.32 2017/01/11 17:39:45 schwarze Exp $
+
+SUBDIR = Ad An Ap Aq Ar At Bd Bf Bk Bl Brq Bx Cd Cm
+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 Ud Ux Va Vt Xr blank break
+
+.include "../Makefile.sub"
+.include <bsd.subdir.mk>
diff --git a/regress/mdoc/Makefile.inc b/regress/mdoc/Makefile.inc
new file mode 100644
index 00000000..3c6f2384
--- /dev/null
+++ b/regress/mdoc/Makefile.inc
@@ -0,0 +1,3 @@
+# $OpenBSD: Makefile.inc,v 1.1 2009/10/28 03:20:42 schwarze Exp $
+
+.include "../Makefile.inc"
diff --git a/regress/mdoc/Ms/Makefile b/regress/mdoc/Ms/Makefile
new file mode 100644
index 00000000..1be2a84a
--- /dev/null
+++ b/regress/mdoc/Ms/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = noarg font
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ms/font.in b/regress/mdoc/Ms/font.in
new file mode 100644
index 00000000..dc841740
--- /dev/null
+++ b/regress/mdoc/Ms/font.in
@@ -0,0 +1,10 @@
+.Dd November 20, 2014
+.Dt MS-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ms-font
+.Nd changing fonts inside the mathematical symbol macro
+.Sh DESCRIPTION
+normal text
+.Ms bold\\fIemphasis\\fPback | after : punctuation
+trailing text
diff --git a/regress/mdoc/Ms/font.out_ascii b/regress/mdoc/Ms/font.out_ascii
new file mode 100644
index 00000000..280aa407
--- /dev/null
+++ b/regress/mdoc/Ms/font.out_ascii
@@ -0,0 +1,9 @@
+MS-FONT(1) General Commands Manual MS-FONT(1)
+
+NNAAMMEE
+ MMss--ffoonntt - changing fonts inside the mathematical symbol macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk | aafftteerr: ppuunnccttuuaattiioonn trailing text
+
+OpenBSD November 20, 2014 OpenBSD
diff --git a/regress/mdoc/Ms/noarg.in b/regress/mdoc/Ms/noarg.in
new file mode 100644
index 00000000..ae283587
--- /dev/null
+++ b/regress/mdoc/Ms/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt MS-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ms-noarg
+.Nd mathematical symbol without an argument
+.Sh DESCRIPTION
+with command:
+.Ms alpha
+no command:
+.Ms
+end of test document
diff --git a/regress/mdoc/Ms/noarg.out_ascii b/regress/mdoc/Ms/noarg.out_ascii
new file mode 100644
index 00000000..fa90d0f3
--- /dev/null
+++ b/regress/mdoc/Ms/noarg.out_ascii
@@ -0,0 +1,9 @@
+MS-NOARG(1) General Commands Manual MS-NOARG(1)
+
+NNAAMMEE
+ MMss--nnooaarrgg - mathematical symbol without an argument
+
+DDEESSCCRRIIPPTTIIOONN
+ with command: aallpphhaa no command: end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Ms/noarg.out_lint b/regress/mdoc/Ms/noarg.out_lint
new file mode 100644
index 00000000..265fb3e6
--- /dev/null
+++ b/regress/mdoc/Ms/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Ms
diff --git a/regress/mdoc/Mt/Makefile b/regress/mdoc/Mt/Makefile
new file mode 100644
index 00000000..34cbbe19
--- /dev/null
+++ b/regress/mdoc/Mt/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.5 2012/07/09 17:52:09 schwarze Exp $
+
+REGRESS_TARGETS = simple font
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Mt/font.in b/regress/mdoc/Mt/font.in
new file mode 100644
index 00000000..66c5ba1f
--- /dev/null
+++ b/regress/mdoc/Mt/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt MT-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Mt-font
+.Nd changing fonts inside the mailto macro
+.Sh DESCRIPTION
+normal text
+.Mt emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Mt/font.out_ascii b/regress/mdoc/Mt/font.out_ascii
new file mode 100644
index 00000000..f19cc2bf
--- /dev/null
+++ b/regress/mdoc/Mt/font.out_ascii
@@ -0,0 +1,9 @@
+MT-FONT(1) General Commands Manual MT-FONT(1)
+
+NNAAMMEE
+ MMtt--ffoonntt - changing fonts inside the mailto macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Mt/simple.in b/regress/mdoc/Mt/simple.in
new file mode 100644
index 00000000..d9e36c3a
--- /dev/null
+++ b/regress/mdoc/Mt/simple.in
@@ -0,0 +1,12 @@
+.Dd February 17, 2010
+.Dt MT-SIMPLE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Mt-simple
+.Nd mailto
+.Sh DESCRIPTION
+Please send mail to
+.Mt schwarze@openbsd.org .
+.Pp
+Do not send mail to
+.Mt .
diff --git a/regress/mdoc/Mt/simple.out_ascii b/regress/mdoc/Mt/simple.out_ascii
new file mode 100644
index 00000000..65cde864
--- /dev/null
+++ b/regress/mdoc/Mt/simple.out_ascii
@@ -0,0 +1,11 @@
+MT-SIMPLE(1) General Commands Manual MT-SIMPLE(1)
+
+NNAAMMEE
+ MMtt--ssiimmppllee - mailto
+
+DDEESSCCRRIIPPTTIIOONN
+ Please send mail to _s_c_h_w_a_r_z_e_@_o_p_e_n_b_s_d_._o_r_g.
+
+ Do not send mail to _~.
+
+OpenBSD February 17, 2010 OpenBSD
diff --git a/regress/mdoc/Nd/Makefile b/regress/mdoc/Nd/Makefile
new file mode 100644
index 00000000..d67804c4
--- /dev/null
+++ b/regress/mdoc/Nd/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.5 2015/02/11 13:37:31 schwarze Exp $
+
+REGRESS_TARGETS = broken hyph noarg par
+LINT_TARGETS = broken noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Nd/broken.in b/regress/mdoc/Nd/broken.in
new file mode 100644
index 00000000..e61804ac
--- /dev/null
+++ b/regress/mdoc/Nd/broken.in
@@ -0,0 +1,22 @@
+.Dd February 11, 2015
+.Dt ND-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Oo
+.Nm Nd-broken
+.Nd description lines ended
+.Oc
+by explicit blocks
+.Sh DESCRIPTION
+Start nested lists:
+.Bl -tag -width Ds
+.Bl -tag -width Ds
+.It inner tag
+inner text
+.Nd inner description
+.El
+back to outer list
+.It outer tag
+outer text
+.El
+end of file
diff --git a/regress/mdoc/Nd/broken.out_ascii b/regress/mdoc/Nd/broken.out_ascii
new file mode 100644
index 00000000..5752f975
--- /dev/null
+++ b/regress/mdoc/Nd/broken.out_ascii
@@ -0,0 +1,17 @@
+ND-BROKEN(1) General Commands Manual ND-BROKEN(1)
+
+NNAAMMEE
+ [NNdd--bbrrookkeenn - description lines ended] by explicit blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ Start nested lists:
+
+ inner tag
+ inner text - inner description
+ back to outer list
+
+ outer tag
+ outer text
+ end of file
+
+OpenBSD February 11, 2015 OpenBSD
diff --git a/regress/mdoc/Nd/broken.out_lint b/regress/mdoc/Nd/broken.out_lint
new file mode 100644
index 00000000..2fc6732b
--- /dev/null
+++ b/regress/mdoc/Nd/broken.out_lint
@@ -0,0 +1,6 @@
+mandoc: broken.in:5:2: WARNING: bad NAME section content: Oo
+mandoc: broken.in:9:1: WARNING: bad NAME section content: text
+mandoc: broken.in:4:2: WARNING: NAME section without Nm before Nd
+mandoc: broken.in:4:2: WARNING: NAME section without description
+mandoc: broken.in:13:2: WARNING: moving content out of list: Bl
+mandoc: broken.in:18:1: WARNING: moving content out of list: text
diff --git a/regress/mdoc/Nd/hyph.in b/regress/mdoc/Nd/hyph.in
new file mode 100644
index 00000000..7922835d
--- /dev/null
+++ b/regress/mdoc/Nd/hyph.in
@@ -0,0 +1,11 @@
+.Dd October 5, 2013
+.Dt ND-HYPH 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nd-hyph
+.Nd when there is already a hyphen within the the word, \
+line-breaking is permitted at that place
+.Sh DESCRIPTION
+Even in the document description line in the
+.Sx NAME
+section.
diff --git a/regress/mdoc/Nd/hyph.out_ascii b/regress/mdoc/Nd/hyph.out_ascii
new file mode 100644
index 00000000..8388b664
--- /dev/null
+++ b/regress/mdoc/Nd/hyph.out_ascii
@@ -0,0 +1,10 @@
+ND-HYPH(1) General Commands Manual ND-HYPH(1)
+
+NNAAMMEE
+ NNdd--hhyypphh - when there is already a hyphen within the the word, line-
+ breaking is permitted at that place
+
+DDEESSCCRRIIPPTTIIOONN
+ Even in the document description line in the _N_A_M_E section.
+
+OpenBSD October 5, 2013 OpenBSD
diff --git a/regress/mdoc/Nd/noarg.in b/regress/mdoc/Nd/noarg.in
new file mode 100644
index 00000000..1c4b619a
--- /dev/null
+++ b/regress/mdoc/Nd/noarg.in
@@ -0,0 +1,8 @@
+.Dd January 2, 2011
+.Dt ND-ARG0 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nd-arg0
+.Nd
+.Sh DESCRIPTION
+empty description line
diff --git a/regress/mdoc/Nd/noarg.out_ascii b/regress/mdoc/Nd/noarg.out_ascii
new file mode 100644
index 00000000..fc78701f
--- /dev/null
+++ b/regress/mdoc/Nd/noarg.out_ascii
@@ -0,0 +1,9 @@
+ND-ARG0(1) General Commands Manual ND-ARG0(1)
+
+NNAAMMEE
+ NNdd--aarrgg00 -
+
+DDEESSCCRRIIPPTTIIOONN
+ empty description line
+
+OpenBSD January 2, 2011 OpenBSD
diff --git a/regress/mdoc/Nd/noarg.out_lint b/regress/mdoc/Nd/noarg.out_lint
new file mode 100644
index 00000000..04e1d91f
--- /dev/null
+++ b/regress/mdoc/Nd/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:6:2: WARNING: missing description line, using "": Nd
diff --git a/regress/mdoc/Nd/par.in b/regress/mdoc/Nd/par.in
new file mode 100644
index 00000000..b056f754
--- /dev/null
+++ b/regress/mdoc/Nd/par.in
@@ -0,0 +1,15 @@
+.Dd February 3, 2015
+.Dt ND-PAR 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nd-par
+.Nd paragraph macro
+after one-line description
+.Pp
+Usually, there shouldn't be additional text in the NAME section.
+.Sh DESCRIPTION
+The text belongs here.
+.Nd stray
+description macro
+.Pp
+Back to normal state.
diff --git a/regress/mdoc/Nd/par.out_ascii b/regress/mdoc/Nd/par.out_ascii
new file mode 100644
index 00000000..c87847b8
--- /dev/null
+++ b/regress/mdoc/Nd/par.out_ascii
@@ -0,0 +1,13 @@
+ND-PAR(1) General Commands Manual ND-PAR(1)
+
+NNAAMMEE
+ NNdd--ppaarr - paragraph macro after one-line description
+
+ Usually, there shouldn't be additional text in the NAME section.
+
+DDEESSCCRRIIPPTTIIOONN
+ The text belongs here. - stray description macro
+
+ Back to normal state.
+
+OpenBSD February 3, 2015 OpenBSD
diff --git a/regress/mdoc/Nm/Makefile b/regress/mdoc/Nm/Makefile
new file mode 100644
index 00000000..d87f43fd
--- /dev/null
+++ b/regress/mdoc/Nm/Makefile
@@ -0,0 +1,24 @@
+# $OpenBSD: Makefile,v 1.13 2017/02/06 03:44:37 schwarze Exp $
+
+REGRESS_TARGETS = badNAME badNAMEuse break broken
+REGRESS_TARGETS += empty emptyNAME emptyNAMEuse
+REGRESS_TARGETS += font long par parns punct
+
+LINT_TARGETS = badNAME badNAMEuse break
+
+# groff-1.22.3/mandoc differences:
+# - When the head of an Nm block in the SYNOPSIS is broken by an
+# explicit block end macro on the same line, formatting differs,
+# but doesn't make sense either way.
+# - Groff doesn't support the nS register.
+
+SKIP_GROFF = broken parns
+SKIP_TMAN = broken par parns
+
+# groff-1.22.3 defect:
+# When a SYNOPSIS Nm block head breaks a sub block, all the
+# remaining content in the document gets lost.
+
+SKIP_GROFF += break
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Nm/badNAME.in b/regress/mdoc/Nm/badNAME.in
new file mode 100644
index 00000000..a882c059
--- /dev/null
+++ b/regress/mdoc/Nm/badNAME.in
@@ -0,0 +1,8 @@
+.Dd July 12, 2012
+.Dt NM-BADNAME 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bx
+.Nd text production macro on the NAME \&Nm line
+.Sh SYNOPSIS
+badNAME
diff --git a/regress/mdoc/Nm/badNAME.out_ascii b/regress/mdoc/Nm/badNAME.out_ascii
new file mode 100644
index 00000000..3c1ff360
--- /dev/null
+++ b/regress/mdoc/Nm/badNAME.out_ascii
@@ -0,0 +1,9 @@
+NM-BADNAME(1) General Commands Manual NM-BADNAME(1)
+
+NNAAMMEE
+ BSD - text production macro on the NAME Nm line
+
+SSYYNNOOPPSSIISS
+ badNAME
+
+OpenBSD July 12, 2012 OpenBSD
diff --git a/regress/mdoc/Nm/badNAME.out_lint b/regress/mdoc/Nm/badNAME.out_lint
new file mode 100644
index 00000000..8a5963d7
--- /dev/null
+++ b/regress/mdoc/Nm/badNAME.out_lint
@@ -0,0 +1,2 @@
+mandoc: badNAME.in:5:2: ERROR: missing manual name, using "": Nm
+mandoc: badNAME.in:5:5: WARNING: bad NAME section content: Bx
diff --git a/regress/mdoc/Nm/badNAMEuse.in b/regress/mdoc/Nm/badNAMEuse.in
new file mode 100644
index 00000000..0ede18d8
--- /dev/null
+++ b/regress/mdoc/Nm/badNAMEuse.in
@@ -0,0 +1,9 @@
+.Dd July 12, 2012
+.Dt NM-BADNAMEUSE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Bx
+.Nd text production macro on the NAME \&Nm line, used later
+.Sh SYNOPSIS
+.Nm some_name
+.Nm
diff --git a/regress/mdoc/Nm/badNAMEuse.out_ascii b/regress/mdoc/Nm/badNAMEuse.out_ascii
new file mode 100644
index 00000000..fd3aa7a5
--- /dev/null
+++ b/regress/mdoc/Nm/badNAMEuse.out_ascii
@@ -0,0 +1,10 @@
+NM-BADNAMEUSE(1) General Commands Manual NM-BADNAMEUSE(1)
+
+NNAAMMEE
+ BSD - text production macro on the NAME Nm line, used later
+
+SSYYNNOOPPSSIISS
+ ssoommee__nnaammee
+ ssoommee__nnaammee
+
+OpenBSD July 12, 2012 OpenBSD
diff --git a/regress/mdoc/Nm/badNAMEuse.out_lint b/regress/mdoc/Nm/badNAMEuse.out_lint
new file mode 100644
index 00000000..7b1c802f
--- /dev/null
+++ b/regress/mdoc/Nm/badNAMEuse.out_lint
@@ -0,0 +1,2 @@
+mandoc: badNAMEuse.in:5:2: ERROR: missing manual name, using "": Nm
+mandoc: badNAMEuse.in:5:5: WARNING: bad NAME section content: Bx
diff --git a/regress/mdoc/Nm/break.in b/regress/mdoc/Nm/break.in
new file mode 100644
index 00000000..203ba98e
--- /dev/null
+++ b/regress/mdoc/Nm/break.in
@@ -0,0 +1,12 @@
+.Dd August 17, 2014
+.Dt NM-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-break
+.Nd name block head breaking another block
+.Sh SYNOPSIS
+.Nm before Bo within
+.Sh DESCRIPTION
+initial text
+.Nm
+final text
diff --git a/regress/mdoc/Nm/break.out_ascii b/regress/mdoc/Nm/break.out_ascii
new file mode 100644
index 00000000..8b94c330
--- /dev/null
+++ b/regress/mdoc/Nm/break.out_ascii
@@ -0,0 +1,12 @@
+NM-BREAK(1) General Commands Manual NM-BREAK(1)
+
+NNAAMMEE
+ NNmm--bbrreeaakk - name block head breaking another block
+
+SSYYNNOOPPSSIISS
+ bbeeffoorree [[wwiitthhiinn]]
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text NNmm--bbrreeaakk final text
+
+OpenBSD August 17, 2014 OpenBSD
diff --git a/regress/mdoc/Nm/break.out_lint b/regress/mdoc/Nm/break.out_lint
new file mode 100644
index 00000000..409b5812
--- /dev/null
+++ b/regress/mdoc/Nm/break.out_lint
@@ -0,0 +1 @@
+mandoc: break.in:9:2: ERROR: inserting missing end of block: Sh breaks Bo
diff --git a/regress/mdoc/Nm/broken.in b/regress/mdoc/Nm/broken.in
new file mode 100644
index 00000000..58a28bad
--- /dev/null
+++ b/regress/mdoc/Nm/broken.in
@@ -0,0 +1,10 @@
+.Dd February 2, 2015
+.Dt NM-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-broken
+.Nd broken synapsis name block
+.Sh SYNOPSIS
+.Ft int
+.Fo function
+.Nm name Fc tail
diff --git a/regress/mdoc/Nm/broken.out_ascii b/regress/mdoc/Nm/broken.out_ascii
new file mode 100644
index 00000000..1f9ed5a2
--- /dev/null
+++ b/regress/mdoc/Nm/broken.out_ascii
@@ -0,0 +1,11 @@
+NM-BROKEN(1) General Commands Manual NM-BROKEN(1)
+
+NNAAMMEE
+ NNmm--bbrrookkeenn - broken synapsis name block
+
+SSYYNNOOPPSSIISS
+ _i_n_t
+ ffuunnccttiioonn(nnaammee);
+ tail
+
+OpenBSD February 2, 2015 OpenBSD
diff --git a/regress/mdoc/Nm/empty.in b/regress/mdoc/Nm/empty.in
new file mode 100644
index 00000000..d135c5c0
--- /dev/null
+++ b/regress/mdoc/Nm/empty.in
@@ -0,0 +1,13 @@
+.Dd June 30, 2010
+.Dt NM-EMPTY 2
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-empty
+.Nd handling of empty name macros
+.Sh SYNOPSIS
+.Nm
+.Nm
+.Sh DESCRIPTION
+The
+.Nm
+utility ...
diff --git a/regress/mdoc/Nm/empty.out_ascii b/regress/mdoc/Nm/empty.out_ascii
new file mode 100644
index 00000000..b01d299e
--- /dev/null
+++ b/regress/mdoc/Nm/empty.out_ascii
@@ -0,0 +1,13 @@
+NM-EMPTY(2) System Calls Manual NM-EMPTY(2)
+
+NNAAMMEE
+ NNmm--eemmppttyy - handling of empty name macros
+
+SSYYNNOOPPSSIISS
+ NNmm--eemmppttyy
+ NNmm--eemmppttyy
+
+DDEESSCCRRIIPPTTIIOONN
+ The NNmm--eemmppttyy utility ...
+
+OpenBSD June 30, 2010 OpenBSD
diff --git a/regress/mdoc/Nm/emptyNAME.in b/regress/mdoc/Nm/emptyNAME.in
new file mode 100644
index 00000000..ac635a8c
--- /dev/null
+++ b/regress/mdoc/Nm/emptyNAME.in
@@ -0,0 +1,8 @@
+.Dd July 12, 2012
+.Dt NM-EMPTYNAME 1
+.Os OpenBSD
+.Sh NAME
+.Nm
+.Nd empty NAME \&Nm line
+.Sh SYNOPSIS
+emptyNAME
diff --git a/regress/mdoc/Nm/emptyNAME.out_ascii b/regress/mdoc/Nm/emptyNAME.out_ascii
new file mode 100644
index 00000000..4041e0f8
--- /dev/null
+++ b/regress/mdoc/Nm/emptyNAME.out_ascii
@@ -0,0 +1,9 @@
+NM-EMPTYNAME(1) General Commands Manual NM-EMPTYNAME(1)
+
+NNAAMMEE
+ - empty NAME Nm line
+
+SSYYNNOOPPSSIISS
+ emptyNAME
+
+OpenBSD July 12, 2012 OpenBSD
diff --git a/regress/mdoc/Nm/emptyNAMEuse.in b/regress/mdoc/Nm/emptyNAMEuse.in
new file mode 100644
index 00000000..9e75e619
--- /dev/null
+++ b/regress/mdoc/Nm/emptyNAMEuse.in
@@ -0,0 +1,9 @@
+.Dd July 12, 2012
+.Dt NM-EMPTYNAMEUSE 1
+.Os OpenBSD
+.Sh NAME
+.Nm
+.Nd empty NAME \&Nm line, used later
+.Sh SYNOPSIS
+.Nm some_name
+.Nm
diff --git a/regress/mdoc/Nm/emptyNAMEuse.out_ascii b/regress/mdoc/Nm/emptyNAMEuse.out_ascii
new file mode 100644
index 00000000..452a7e29
--- /dev/null
+++ b/regress/mdoc/Nm/emptyNAMEuse.out_ascii
@@ -0,0 +1,10 @@
+NM-EMPTYNAMEUSE(1) General Commands Manual NM-EMPTYNAMEUSE(1)
+
+NNAAMMEE
+ - empty NAME Nm line, used later
+
+SSYYNNOOPPSSIISS
+ ssoommee__nnaammee
+ ssoommee__nnaammee
+
+OpenBSD July 12, 2012 OpenBSD
diff --git a/regress/mdoc/Nm/font.in b/regress/mdoc/Nm/font.in
new file mode 100644
index 00000000..c68a501b
--- /dev/null
+++ b/regress/mdoc/Nm/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt NM-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-font
+.Nd changing fonts inside the name macro
+.Sh DESCRIPTION
+normal text
+.Nm bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Nm/font.out_ascii b/regress/mdoc/Nm/font.out_ascii
new file mode 100644
index 00000000..d6516ae5
--- /dev/null
+++ b/regress/mdoc/Nm/font.out_ascii
@@ -0,0 +1,9 @@
+NM-FONT(1) General Commands Manual NM-FONT(1)
+
+NNAAMMEE
+ NNmm--ffoonntt - changing fonts inside the name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Nm/long.in b/regress/mdoc/Nm/long.in
new file mode 100644
index 00000000..662360e4
--- /dev/null
+++ b/regress/mdoc/Nm/long.in
@@ -0,0 +1,11 @@
+.Dd April 4, 2014
+.Dt NM-LONG 1
+.Os OpenBSD
+.Sh NAME
+.Nm \&Nm-long
+.Nd long \&Nm in the SYNOPSIS
+.Sh SYNOPSIS
+.Nm "This is a terribly long name, it is so long that it does not fit \
+one one single line -"
+.Fl o
+.Ar
diff --git a/regress/mdoc/Nm/long.out_ascii b/regress/mdoc/Nm/long.out_ascii
new file mode 100644
index 00000000..f6792581
--- /dev/null
+++ b/regress/mdoc/Nm/long.out_ascii
@@ -0,0 +1,14 @@
+NM-LONG(1) General Commands Manual NM-LONG(1)
+
+NNAAMMEE
+ NNmm--lloonngg - long Nm in the SYNOPSIS
+
+SSYYNNOOPPSSIISS
+ TThhiiss iiss aa tteerrrriibbllyy lloonngg nnaammee,, iitt iiss ssoo lloonngg tthhaatt iitt ddooeess nnoott ffiitt oonnee oonnee
+ ssiinnggllee
+ lliinnee
+ --
+ --oo
+ _f_i_l_e _._._.
+
+OpenBSD April 4, 2014 OpenBSD
diff --git a/regress/mdoc/Nm/par.in b/regress/mdoc/Nm/par.in
new file mode 100644
index 00000000..1d5e3ebd
--- /dev/null
+++ b/regress/mdoc/Nm/par.in
@@ -0,0 +1,11 @@
+.Dd February 3, 2015
+.Dt NM-PAR 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-par
+.Nd paragraph macro in a synopsis name block
+.Sh SYNOPSIS
+.Nm
+.Fl a
+.Pp
+.Fl b
diff --git a/regress/mdoc/Nm/par.out_ascii b/regress/mdoc/Nm/par.out_ascii
new file mode 100644
index 00000000..8943d37f
--- /dev/null
+++ b/regress/mdoc/Nm/par.out_ascii
@@ -0,0 +1,11 @@
+NM-PAR(1) General Commands Manual NM-PAR(1)
+
+NNAAMMEE
+ NNmm--ppaarr - paragraph macro in a synopsis name block
+
+SSYYNNOOPPSSIISS
+ NNmm--ppaarr --aa
+
+ --bb
+
+OpenBSD February 3, 2015 OpenBSD
diff --git a/regress/mdoc/Nm/parns.in b/regress/mdoc/Nm/parns.in
new file mode 100644
index 00000000..03f2d641
--- /dev/null
+++ b/regress/mdoc/Nm/parns.in
@@ -0,0 +1,23 @@
+.Dd February 3, 2015
+.Dt NM-PAR 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-par
+.Nd paragraph macro in a name block
+.Sh DESCRIPTION
+.nr nS 1
+.Nm
+.Fl a
+.Pp
+.Fl b
+.Nm
+.Fl a
+.nr nS 0
+.Pp
+.Fl b
+.nr nS 1
+.Nm
+.Oo Fl a
+.nr nS 0
+.Pp
+.Fl b Oc
diff --git a/regress/mdoc/Nm/parns.out_ascii b/regress/mdoc/Nm/parns.out_ascii
new file mode 100644
index 00000000..daa6331e
--- /dev/null
+++ b/regress/mdoc/Nm/parns.out_ascii
@@ -0,0 +1,17 @@
+NM-PAR(1) General Commands Manual NM-PAR(1)
+
+NNAAMMEE
+ NNmm--ppaarr - paragraph macro in a name block
+
+DDEESSCCRRIIPPTTIIOONN
+ NNmm--ppaarr --aa
+
+ --bb
+ NNmm--ppaarr --aa
+
+ --bb
+ NNmm--ppaarr [--aa
+
+ --bb]
+
+OpenBSD February 3, 2015 OpenBSD
diff --git a/regress/mdoc/Nm/punct.in b/regress/mdoc/Nm/punct.in
new file mode 100644
index 00000000..254adfdf
--- /dev/null
+++ b/regress/mdoc/Nm/punct.in
@@ -0,0 +1,39 @@
+.Dd August 21, 2014
+.Dt NM-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Nm-punct
+.Nd punctuation handling by the Nm macro
+.Sh DESCRIPTION
+closing punctuation
+.Nm a )
+only one
+.Nm )
+only more than one
+.Nm ) )
+middle
+.Nm a ) z
+start
+.Nm ) z
+dot
+.Nm . z
+comma
+.Nm , z
+semicolon
+.Nm ; z
+colon
+.Nm : z
+quest
+.Nm ? z
+excl
+.Nm ! z
+paren
+.Nm ) z
+bracket
+.Nm ] z
+bar
+.Nm | m
+op paren
+.Nm ( a
+op bracket
+.Nm [ a
diff --git a/regress/mdoc/Nm/punct.out_ascii b/regress/mdoc/Nm/punct.out_ascii
new file mode 100644
index 00000000..74cb98f4
--- /dev/null
+++ b/regress/mdoc/Nm/punct.out_ascii
@@ -0,0 +1,12 @@
+NM-PUNCT(1) General Commands Manual NM-PUNCT(1)
+
+NNAAMMEE
+ NNmm--ppuunncctt - punctuation handling by the Nm macro
+
+DDEESSCCRRIIPPTTIIOONN
+ closing punctuation aa) only one NNmm--ppuunncctt) only more than one NNmm--ppuunncctt))
+ middle aa) zz start NNmm--ppuunncctt) z dot NNmm--ppuunncctt. z comma NNmm--ppuunncctt, z semicolon
+ NNmm--ppuunncctt; z colon NNmm--ppuunncctt: z quest NNmm--ppuunncctt? z excl NNmm--ppuunncctt! z paren
+ NNmm--ppuunncctt) z bracket NNmm--ppuunncctt] z bar | mm op paren (aa op bracket [aa
+
+OpenBSD August 21, 2014 OpenBSD
diff --git a/regress/mdoc/No/Makefile b/regress/mdoc/No/Makefile
new file mode 100644
index 00000000..3110bf2b
--- /dev/null
+++ b/regress/mdoc/No/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/11/17 06:44:35 schwarze Exp $
+
+REGRESS_TARGETS = punct spacing
+LINT_TARGETS = punct
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/No/punct.in b/regress/mdoc/No/punct.in
new file mode 100644
index 00000000..b4d8ef73
--- /dev/null
+++ b/regress/mdoc/No/punct.in
@@ -0,0 +1,83 @@
+.Dd November 17, 2014
+.Dt NO-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm No-punct
+.Nd punctuation after the normal macro
+.Sh DESCRIPTION
+Leading punctuation:
+.No ( b
+.No [ b
+.No | b
+.No . b
+.No , b
+.No ; b
+.No : b
+.No ? b
+.No ! b
+.No ) b
+.No ] b
+.Pp
+Trailing punctuation:
+.No a (
+.No a [
+.No a |
+.No a .
+.No a ,
+.No a ;
+.No a :
+.No a ?
+.No a !
+.No a )
+.No a ]
+.Pp
+Middle punctuation:
+.No a ( b
+.No a [ b
+.No a | b
+.No a . b
+.No a , b
+.No a ; b
+.No a : b
+.No a ? b
+.No a ! b
+.No a ) b
+.No a ] b
+.Pp
+Isolated punctuation:
+.No a No ( No b
+.No a No [ No b
+.No a No | No b
+.No a No . No b
+.No a No , No b
+.No a No ; No b
+.No a No : No b
+.No a No ? No b
+.No a No ! No b
+.No a No ) No b
+.No a No ] No b
+.Pp
+Isolated trailing punctuation:
+.No a No (
+.No a No [
+.No a No |
+.No a No .
+.No a No ,
+.No a No ;
+.No a No :
+.No a No ?
+.No a No !
+.No a No )
+.No a No ]
+.Pp
+Multiple isolated punctuation:
+.No a No ( [ No b
+.No a No ) ] No b
+.Pp
+Multiple punctuation:
+.No [ ( arg ) ] .
+.Pp
+Quoted:
+.No "a . b Nm"
+.No ". b Nm"
+.No "."
diff --git a/regress/mdoc/No/punct.out_ascii b/regress/mdoc/No/punct.out_ascii
new file mode 100644
index 00000000..eca39c42
--- /dev/null
+++ b/regress/mdoc/No/punct.out_ascii
@@ -0,0 +1,26 @@
+NO-PUNCT(1) General Commands Manual NO-PUNCT(1)
+
+NNAAMMEE
+ NNoo--ppuunncctt - punctuation after the normal macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Leading punctuation: (b [b | b . b , b ; b : b ? b ! b ) b ] b
+
+ Trailing punctuation: a ( a [ a | a. a, a; a: a? a! a) a]
+
+ Middle punctuation: a (b a [b a | b a. b a, b a; b a: b a? b a! b a) b a]
+ b
+
+ Isolated punctuation: a (b a [b a | b a . b a , b a ; b a : b a ? b a ! b
+ a ) b a ] b
+
+ Isolated trailing punctuation: a ( a [ a | a . a , a ; a : a ? a ! a )
+ a ]
+
+ Multiple isolated punctuation: a ([b a )] b
+
+ Multiple punctuation: [(arg)].
+
+ Quoted: a . b Nm . b Nm .
+
+OpenBSD November 17, 2014 OpenBSD
diff --git a/regress/mdoc/No/punct.out_lint b/regress/mdoc/No/punct.out_lint
new file mode 100644
index 00000000..cd2fd00f
--- /dev/null
+++ b/regress/mdoc/No/punct.out_lint
@@ -0,0 +1,24 @@
+mandoc: punct.in:48:7: WARNING: skipping empty macro: No
+mandoc: punct.in:49:7: WARNING: skipping empty macro: No
+mandoc: punct.in:50:7: WARNING: skipping empty macro: No
+mandoc: punct.in:51:7: WARNING: skipping empty macro: No
+mandoc: punct.in:52:7: WARNING: skipping empty macro: No
+mandoc: punct.in:53:7: WARNING: skipping empty macro: No
+mandoc: punct.in:54:7: WARNING: skipping empty macro: No
+mandoc: punct.in:55:7: WARNING: skipping empty macro: No
+mandoc: punct.in:56:7: WARNING: skipping empty macro: No
+mandoc: punct.in:57:7: WARNING: skipping empty macro: No
+mandoc: punct.in:58:7: WARNING: skipping empty macro: No
+mandoc: punct.in:61:7: WARNING: skipping empty macro: No
+mandoc: punct.in:62:7: WARNING: skipping empty macro: No
+mandoc: punct.in:63:7: WARNING: skipping empty macro: No
+mandoc: punct.in:64:7: WARNING: skipping empty macro: No
+mandoc: punct.in:65:7: WARNING: skipping empty macro: No
+mandoc: punct.in:66:7: WARNING: skipping empty macro: No
+mandoc: punct.in:67:7: WARNING: skipping empty macro: No
+mandoc: punct.in:68:7: WARNING: skipping empty macro: No
+mandoc: punct.in:69:7: WARNING: skipping empty macro: No
+mandoc: punct.in:70:7: WARNING: skipping empty macro: No
+mandoc: punct.in:71:7: WARNING: skipping empty macro: No
+mandoc: punct.in:74:7: WARNING: skipping empty macro: No
+mandoc: punct.in:75:7: WARNING: skipping empty macro: No
diff --git a/regress/mdoc/No/spacing.in b/regress/mdoc/No/spacing.in
new file mode 100644
index 00000000..bfaffe31
--- /dev/null
+++ b/regress/mdoc/No/spacing.in
@@ -0,0 +1,24 @@
+.Dd October 1, 2010
+.Dt NO-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm No-spacing
+.Nd spacing around the normal macro
+.Sh DESCRIPTION
+Text before
+.No and
+after the macro.
+Macros on the line
+.Op before
+.No and
+.Op after
+the macro.
+Macros
+.Em before No and Em after
+the macro on the same line.
+Punctuation before (
+.No and
+) after the macro.
+The macro
+.Op No in
+an enclosure.
diff --git a/regress/mdoc/No/spacing.out_ascii b/regress/mdoc/No/spacing.out_ascii
new file mode 100644
index 00000000..5a25b4a3
--- /dev/null
+++ b/regress/mdoc/No/spacing.out_ascii
@@ -0,0 +1,11 @@
+NO-SPACING(1) General Commands Manual NO-SPACING(1)
+
+NNAAMMEE
+ NNoo--ssppaacciinngg - spacing around the normal macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Text before and after the macro. Macros on the line [before] and [after]
+ the macro. Macros _b_e_f_o_r_e and _a_f_t_e_r the macro on the same line.
+ Punctuation before ( and ) after the macro. The macro [in] an enclosure.
+
+OpenBSD October 1, 2010 OpenBSD
diff --git a/regress/mdoc/Ns/Makefile b/regress/mdoc/Ns/Makefile
new file mode 100644
index 00000000..45db66cc
--- /dev/null
+++ b/regress/mdoc/Ns/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.5 2014/07/02 11:42:56 schwarze Exp $
+
+REGRESS_TARGETS = position punct
+LINT_TARGETS = position
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ns/position.in b/regress/mdoc/Ns/position.in
new file mode 100644
index 00000000..1325df25
--- /dev/null
+++ b/regress/mdoc/Ns/position.in
@@ -0,0 +1,29 @@
+.Dd September 15, 2013
+.Dt NS-POSITION 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ns-position
+.Nd effect of the position of the no space macro on the line
+.Sh DESCRIPTION
+At the beginning of a macro line:
+.Op before
+.Ns Op after
+.Pp
+After just a block closing macro:
+.Oo before
+.Oc Ns Op after
+.Pp
+After some macro and a block closing:
+.Oo before
+.No still before Oc Ns Op after
+.Pp
+In the middle of a macro line:
+.Oo before Oc Ns Op after
+.Pp
+At the end of a macro line:
+.Oo before Oc Ns
+.Op after
+.Pp
+At the end of partial implicit:
+.Op before Ns
+.Op after
diff --git a/regress/mdoc/Ns/position.out_ascii b/regress/mdoc/Ns/position.out_ascii
new file mode 100644
index 00000000..a2bd6c45
--- /dev/null
+++ b/regress/mdoc/Ns/position.out_ascii
@@ -0,0 +1,19 @@
+NS-POSITION(1) General Commands Manual NS-POSITION(1)
+
+NNAAMMEE
+ NNss--ppoossiittiioonn - effect of the position of the no space macro on the line
+
+DDEESSCCRRIIPPTTIIOONN
+ At the beginning of a macro line: [before] [after]
+
+ After just a block closing macro: [before][after]
+
+ After some macro and a block closing: [before still before][after]
+
+ In the middle of a macro line: [before][after]
+
+ At the end of a macro line: [before][after]
+
+ At the end of partial implicit: [before][after]
+
+OpenBSD September 15, 2013 OpenBSD
diff --git a/regress/mdoc/Ns/position.out_lint b/regress/mdoc/Ns/position.out_lint
new file mode 100644
index 00000000..d21bfe12
--- /dev/null
+++ b/regress/mdoc/Ns/position.out_lint
@@ -0,0 +1 @@
+mandoc: position.in:10:2: WARNING: skipping no-space macro
diff --git a/regress/mdoc/Ns/punct.in b/regress/mdoc/Ns/punct.in
new file mode 100644
index 00000000..d55cd322
--- /dev/null
+++ b/regress/mdoc/Ns/punct.in
@@ -0,0 +1,13 @@
+.Dd October 1, 2010
+.Dt NS-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ns-punct
+.Nd punctuation after the no space macro
+.Sh DESCRIPTION
+Normal words:
+.No no Ns ns No no
+Opening punctuation:
+.No no Ns ( ns No no
+Closing punctuation:
+.No no Ns ns ) No no
diff --git a/regress/mdoc/Ns/punct.out_ascii b/regress/mdoc/Ns/punct.out_ascii
new file mode 100644
index 00000000..2afbf866
--- /dev/null
+++ b/regress/mdoc/Ns/punct.out_ascii
@@ -0,0 +1,10 @@
+NS-PUNCT(1) General Commands Manual NS-PUNCT(1)
+
+NNAAMMEE
+ NNss--ppuunncctt - punctuation after the no space macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Normal words: nons no Opening punctuation: no(ns no Closing punctuation:
+ nons) no
+
+OpenBSD October 1, 2010 OpenBSD
diff --git a/regress/mdoc/Oo/Makefile b/regress/mdoc/Oo/Makefile
new file mode 100644
index 00000000..086f9bdf
--- /dev/null
+++ b/regress/mdoc/Oo/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2012/07/07 14:10:55 schwarze Exp $
+
+REGRESS_TARGETS=punct
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Oo/punct.in b/regress/mdoc/Oo/punct.in
new file mode 100644
index 00000000..c9e9d732
--- /dev/null
+++ b/regress/mdoc/Oo/punct.in
@@ -0,0 +1,23 @@
+.Dd July 6, 2012
+.Dt OO-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Oo-punct
+.Nd punctuation handling by the Oo macro
+.Sh DESCRIPTION
+at the beginning:
+.Oo ( z
+.Oo | z
+.Oo . z
+.Oc Oc Oc
+.Pp
+in the middle:
+.Oo a ( z
+.Oo a | z
+.Oo a . z
+.Oc Oc Oc
+.Pp
+at the end:
+.Oo Oo a (
+.Oc |
+.Oc
diff --git a/regress/mdoc/Oo/punct.out_ascii b/regress/mdoc/Oo/punct.out_ascii
new file mode 100644
index 00000000..ca487cf6
--- /dev/null
+++ b/regress/mdoc/Oo/punct.out_ascii
@@ -0,0 +1,13 @@
+OO-PUNCT(1) General Commands Manual OO-PUNCT(1)
+
+NNAAMMEE
+ OOoo--ppuunncctt - punctuation handling by the Oo macro
+
+DDEESSCCRRIIPPTTIIOONN
+ at the beginning: ([z [| z [. z]]]
+
+ in the middle: [a (z [a | z [a. z]]]
+
+ at the end: [[a (] |]
+
+OpenBSD July 6, 2012 OpenBSD
diff --git a/regress/mdoc/Op/Makefile b/regress/mdoc/Op/Makefile
new file mode 100644
index 00000000..ab934a4e
--- /dev/null
+++ b/regress/mdoc/Op/Makefile
@@ -0,0 +1,9 @@
+# $OpenBSD: Makefile,v 1.3 2014/07/02 11:42:56 schwarze Exp $
+
+REGRESS_TARGETS = break broken punct
+LINT_TARGETS = break broken
+
+SKIP_GROFF = break
+SKIP_ASCII = break
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Op/break.in b/regress/mdoc/Op/break.in
new file mode 100644
index 00000000..5ca7ffe2
--- /dev/null
+++ b/regress/mdoc/Op/break.in
@@ -0,0 +1,29 @@
+.Dd July 2, 2014
+.Dt OP-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Op-break
+.Nd partial explicit block broken by partial implicit block
+.Sh DESCRIPTION
+before both
+.Op inside first Do inside both
+inside second
+.Dc
+after both
+.Pp
+0
+.Op 1 Op 12 Do 123
+3
+.Dc
+0
+.\" The following does not work yet:
+.ig
+.Pp
+0
+.Op 1 Op 12 Do 123 Do 1234
+34
+.Dc
+4
+.Dc
+0
+..
diff --git a/regress/mdoc/Op/break.out_lint b/regress/mdoc/Op/break.out_lint
new file mode 100644
index 00000000..49c0fd12
--- /dev/null
+++ b/regress/mdoc/Op/break.out_lint
@@ -0,0 +1,3 @@
+mandoc: break.in:9:2: WARNING: blocks badly nested: Op breaks Do
+mandoc: break.in:15:7: WARNING: blocks badly nested: Op breaks Do
+mandoc: break.in:15:2: WARNING: blocks badly nested: Op breaks Do
diff --git a/regress/mdoc/Op/broken.in b/regress/mdoc/Op/broken.in
new file mode 100644
index 00000000..43574317
--- /dev/null
+++ b/regress/mdoc/Op/broken.in
@@ -0,0 +1,24 @@
+.Dd July 2, 2014
+.Dt OP-BROKEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm Op-broken
+.Nd partial implicit block broken by partial explicit block
+.Sh DESCRIPTION
+before both
+.Do inside first
+.Op inside both Dc inside second
+after both
+.Pp
+0
+.Do 1
+.Op 12 Op 123 Dc 23
+0
+.\" The following does not work yet, see mdoc_macro.c rev. 1.47.
+.ig
+.Pp
+0
+.Do 1 Do 12
+.Op 123 Op 1234 Dc 134 Dc 34
+0
+..
diff --git a/regress/mdoc/Op/broken.out_ascii b/regress/mdoc/Op/broken.out_ascii
new file mode 100644
index 00000000..f9641277
--- /dev/null
+++ b/regress/mdoc/Op/broken.out_ascii
@@ -0,0 +1,11 @@
+OP-BROKEN(1) General Commands Manual OP-BROKEN(1)
+
+NNAAMMEE
+ OOpp--bbrrookkeenn - partial implicit block broken by partial explicit block
+
+DDEESSCCRRIIPPTTIIOONN
+ before both ``inside first [inside both'' inside second] after both
+
+ 0 ``1 [12 [123'' 23]] 0
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Op/broken.out_lint b/regress/mdoc/Op/broken.out_lint
new file mode 100644
index 00000000..f82e1bda
--- /dev/null
+++ b/regress/mdoc/Op/broken.out_lint
@@ -0,0 +1,2 @@
+mandoc: broken.in:10:17: WARNING: blocks badly nested: Do breaks Op
+mandoc: broken.in:15:15: WARNING: blocks badly nested: Do breaks Op
diff --git a/regress/mdoc/Op/punct.in b/regress/mdoc/Op/punct.in
new file mode 100644
index 00000000..02a25c9c
--- /dev/null
+++ b/regress/mdoc/Op/punct.in
@@ -0,0 +1,31 @@
+.Dd June 24, 2011
+.Dt OP-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Op-punct
+.Nd punctuation handling by the Op macro
+.Sh DESCRIPTION
+at the beginning:
+.Op ( z
+.Op | z
+.Op . z
+.Pp
+in the middle:
+.Op a ( z
+.Op a | z
+.Op a . z
+.Pp
+at the end:
+.Op a (
+.Op a |
+.Op a .
+.Pp
+punctuation only:
+.Op (
+.Op |
+.Op .
+.Pp
+more than one:
+.Op ( (
+.Op | |
+.Op . .
diff --git a/regress/mdoc/Op/punct.out_ascii b/regress/mdoc/Op/punct.out_ascii
new file mode 100644
index 00000000..53251b52
--- /dev/null
+++ b/regress/mdoc/Op/punct.out_ascii
@@ -0,0 +1,17 @@
+OP-PUNCT(1) General Commands Manual OP-PUNCT(1)
+
+NNAAMMEE
+ OOpp--ppuunncctt - punctuation handling by the Op macro
+
+DDEESSCCRRIIPPTTIIOONN
+ at the beginning: ([z] [| z] [. z]
+
+ in the middle: [a (z] [a | z] [a. z]
+
+ at the end: [a (] [a |] [a].
+
+ punctuation only: ([] [|] [].
+
+ more than one: (([] [| |] []..
+
+OpenBSD June 24, 2011 OpenBSD
diff --git a/regress/mdoc/Os/Makefile b/regress/mdoc/Os/Makefile
new file mode 100644
index 00000000..d228b09d
--- /dev/null
+++ b/regress/mdoc/Os/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.2 2014/11/21 01:52:45 schwarze Exp $
+
+REGRESS_TARGETS = dupe late long missing
+LINT_TARGETS = dupe late missing
+SKIP_GROFF = long
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Os/dupe.in b/regress/mdoc/Os/dupe.in
new file mode 100644
index 00000000..a4918bef
--- /dev/null
+++ b/regress/mdoc/Os/dupe.in
@@ -0,0 +1,11 @@
+.Dd June 18, 2014
+.Os NetBSD
+.Dt OS-DUPE 1
+.Os FreeBSD
+.Sh NAME
+.Nm Os-dupe
+.Nd repeated operating system macros
+.Sh DESCRIPTION
+initial text
+.Os OpenBSD
+final text
diff --git a/regress/mdoc/Os/dupe.out_ascii b/regress/mdoc/Os/dupe.out_ascii
new file mode 100644
index 00000000..4f76190a
--- /dev/null
+++ b/regress/mdoc/Os/dupe.out_ascii
@@ -0,0 +1,9 @@
+OS-DUPE(1) General Commands Manual OS-DUPE(1)
+
+NNAAMMEE
+ OOss--dduuppee - repeated operating system macros
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final text
+
+OpenBSD June 18, 2014 OpenBSD
diff --git a/regress/mdoc/Os/dupe.out_lint b/regress/mdoc/Os/dupe.out_lint
new file mode 100644
index 00000000..364b7a6e
--- /dev/null
+++ b/regress/mdoc/Os/dupe.out_lint
@@ -0,0 +1,3 @@
+mandoc: dupe.in:3:2: WARNING: prologue macros out of order: Dt after Os
+mandoc: dupe.in:4:2: WARNING: duplicate prologue macro: Os
+mandoc: dupe.in:10:2: WARNING: duplicate prologue macro: Os
diff --git a/regress/mdoc/Os/late.in b/regress/mdoc/Os/late.in
new file mode 100644
index 00000000..fab68da2
--- /dev/null
+++ b/regress/mdoc/Os/late.in
@@ -0,0 +1,9 @@
+.Dd August 5, 2014
+.Dt OS-LATE 1
+.Sh NAME
+.Nm Os-late
+.Nd late operating system macro
+.Sh DESCRIPTION
+initial text
+.Os OpenBSD
+final text
diff --git a/regress/mdoc/Os/late.out_ascii b/regress/mdoc/Os/late.out_ascii
new file mode 100644
index 00000000..06de3458
--- /dev/null
+++ b/regress/mdoc/Os/late.out_ascii
@@ -0,0 +1,9 @@
+OS-LATE(1) General Commands Manual OS-LATE(1)
+
+NNAAMMEE
+ OOss--llaattee - late operating system macro
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final text
+
+OpenBSD August 5, 2014 OpenBSD
diff --git a/regress/mdoc/Os/late.out_lint b/regress/mdoc/Os/late.out_lint
new file mode 100644
index 00000000..8b0e2f76
--- /dev/null
+++ b/regress/mdoc/Os/late.out_lint
@@ -0,0 +1 @@
+mandoc: late.in:8:2: WARNING: late prologue macro: Os
diff --git a/regress/mdoc/Os/long.in b/regress/mdoc/Os/long.in
new file mode 100644
index 00000000..c4998629
--- /dev/null
+++ b/regress/mdoc/Os/long.in
@@ -0,0 +1,8 @@
+.Dd November 20, 2014
+.Dt OS-LONG 1
+.Os 1234567890123456789012345678901234567890123456789012345678901234567890123456789
+.Sh NAME
+.Nm Os-long
+.Nd long operating system string
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Os/long.out_ascii b/regress/mdoc/Os/long.out_ascii
new file mode 100644
index 00000000..9253e13e
--- /dev/null
+++ b/regress/mdoc/Os/long.out_ascii
@@ -0,0 +1,11 @@
+OS-LONG(1) General Commands Manual OS-LONG(1)
+
+NNAAMMEE
+ OOss--lloonngg - long operating system string
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789
+ November 20, 2014
+1234567890123456789012345678901234567890123456789012345678901234567890123456789
diff --git a/regress/mdoc/Os/missing.in b/regress/mdoc/Os/missing.in
new file mode 100644
index 00000000..44297adb
--- /dev/null
+++ b/regress/mdoc/Os/missing.in
@@ -0,0 +1,7 @@
+.Dd August 5, 2014
+.Dt OS-MISSING 1
+.Sh NAME
+.Nm Os-missing
+.Nd operating system macro missing in prologue
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Os/missing.out_ascii b/regress/mdoc/Os/missing.out_ascii
new file mode 100644
index 00000000..8398c253
--- /dev/null
+++ b/regress/mdoc/Os/missing.out_ascii
@@ -0,0 +1,9 @@
+OS-MISSING(1) General Commands Manual OS-MISSING(1)
+
+NNAAMMEE
+ OOss--mmiissssiinngg - operating system macro missing in prologue
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+ August 5, 2014
diff --git a/regress/mdoc/Os/missing.out_lint b/regress/mdoc/Os/missing.out_lint
new file mode 100644
index 00000000..8b1f80b2
--- /dev/null
+++ b/regress/mdoc/Os/missing.out_lint
@@ -0,0 +1 @@
+mandoc: missing.in: WARNING: missing Os macro, using ""
diff --git a/regress/mdoc/Ox/Makefile b/regress/mdoc/Ox/Makefile
new file mode 100644
index 00000000..7f532eb1
--- /dev/null
+++ b/regress/mdoc/Ox/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.3 2012/07/18 16:55:54 schwarze Exp $
+
+REGRESS_TARGETS = keep
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ox/keep.in b/regress/mdoc/Ox/keep.in
new file mode 100644
index 00000000..2a8bfff0
--- /dev/null
+++ b/regress/mdoc/Ox/keep.in
@@ -0,0 +1,11 @@
+.Dd January 30, 2011
+.Dt OX-KEEP 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ox-keep
+.Nd interaction of unix variant macros and word keeps
+.Sh DESCRIPTION
+Because we use a keep,
+.Bk -words
+.Ox 4.9 must be at the beginning of a new line.
+.Ek
diff --git a/regress/mdoc/Ox/keep.out_ascii b/regress/mdoc/Ox/keep.out_ascii
new file mode 100644
index 00000000..9f01890a
--- /dev/null
+++ b/regress/mdoc/Ox/keep.out_ascii
@@ -0,0 +1,10 @@
+OX-KEEP(1) General Commands Manual OX-KEEP(1)
+
+NNAAMMEE
+ OOxx--kkeeeepp - interaction of unix variant macros and word keeps
+
+DDEESSCCRRIIPPTTIIOONN
+ Because we use a keep,
+ OpenBSD 4.9 must be at the beginning of a new line.
+
+OpenBSD January 30, 2011 OpenBSD
diff --git a/regress/mdoc/Pa/Makefile b/regress/mdoc/Pa/Makefile
new file mode 100644
index 00000000..5f939fd3
--- /dev/null
+++ b/regress/mdoc/Pa/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.4 2014/08/21 12:56:24 schwarze Exp $
+
+REGRESS_TARGETS = font punct
+
+# XXX The FILES target doesn't currently work.
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Pa/font.in b/regress/mdoc/Pa/font.in
new file mode 100644
index 00000000..ce23f772
--- /dev/null
+++ b/regress/mdoc/Pa/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt PA-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Pa-font
+.Nd changing fonts inside the path macro
+.Sh DESCRIPTION
+normal text
+.Pa emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Pa/font.out_ascii b/regress/mdoc/Pa/font.out_ascii
new file mode 100644
index 00000000..5cf318ce
--- /dev/null
+++ b/regress/mdoc/Pa/font.out_ascii
@@ -0,0 +1,9 @@
+PA-FONT(1) General Commands Manual PA-FONT(1)
+
+NNAAMMEE
+ PPaa--ffoonntt - changing fonts inside the path macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Pa/punct.in b/regress/mdoc/Pa/punct.in
new file mode 100644
index 00000000..ea6c81ff
--- /dev/null
+++ b/regress/mdoc/Pa/punct.in
@@ -0,0 +1,39 @@
+.Dd August 21, 2014
+.Dt PA-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Pa-punct
+.Nd punctuation handling by the Pa macro
+.Sh DESCRIPTION
+closing punctuation
+.Pa a )
+only one
+.Pa )
+only more than one
+.Pa ) )
+middle
+.Pa a ) z
+start
+.Pa ) z
+dot
+.Pa . z
+comma
+.Pa , z
+semicolon
+.Pa ; z
+colon
+.Pa : z
+quest
+.Pa ? z
+excl
+.Pa ! z
+paren
+.Pa ) z
+bracket
+.Pa ] z
+bar
+.Pa | m
+op paren
+.Pa ( a
+op bracket
+.Pa [ a
diff --git a/regress/mdoc/Pa/punct.out_ascii b/regress/mdoc/Pa/punct.out_ascii
new file mode 100644
index 00000000..65b247e9
--- /dev/null
+++ b/regress/mdoc/Pa/punct.out_ascii
@@ -0,0 +1,11 @@
+PA-PUNCT(1) General Commands Manual PA-PUNCT(1)
+
+NNAAMMEE
+ PPaa--ppuunncctt - punctuation handling by the Pa macro
+
+DDEESSCCRRIIPPTTIIOONN
+ closing punctuation _a) only one _~) only more than one _~)) middle _a) _z
+ start _~) _z dot _~. _z comma _~, _z semicolon _~; _z colon _~: _z quest _~? _z excl
+ _~! _z paren _~) _z bracket _~] _z bar | _m op paren (_a op bracket [_a
+
+OpenBSD August 21, 2014 OpenBSD
diff --git a/regress/mdoc/Pf/Makefile b/regress/mdoc/Pf/Makefile
new file mode 100644
index 00000000..c222abf1
--- /dev/null
+++ b/regress/mdoc/Pf/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2014/11/30 05:28:00 schwarze Exp $
+
+REGRESS_TARGETS = spacing
+LINT_TARGETS = spacing
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Pf/spacing.in b/regress/mdoc/Pf/spacing.in
new file mode 100644
index 00000000..5a547495
--- /dev/null
+++ b/regress/mdoc/Pf/spacing.in
@@ -0,0 +1,31 @@
+.Dd November 30, 2014
+.Dt PF-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm Pf-spacing
+.Nd spacing around the prefix macro
+.Sh DESCRIPTION
+Closing punctuation goes
+.Pf . right .
+But
+.Pf . . double
+prefixes don't work.
+Opening punctuation goes
+.Pf ( left .
+But again, prefix
+.Pf ( ) pairs
+don't work.
+Even normal text gets
+.Pf pre fixed .
+The first
+.Pf Ar gument
+is not parsed.
+Nothing can be
+.Pf prefixed
+to the next line.
+Trailing punctuation still counts as
+.Em eos Pf .
+.Po But it does not fall out of enclosures Pf . Pc
+.Pp
+It makes no sense at the very
+.Em end Pf
diff --git a/regress/mdoc/Pf/spacing.out_ascii b/regress/mdoc/Pf/spacing.out_ascii
new file mode 100644
index 00000000..cd5c96b2
--- /dev/null
+++ b/regress/mdoc/Pf/spacing.out_ascii
@@ -0,0 +1,15 @@
+PF-SPACING(1) General Commands Manual PF-SPACING(1)
+
+NNAAMMEE
+ PPff--ssppaacciinngg - spacing around the prefix macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Closing punctuation goes .right. But .. double prefixes don't work.
+ Opening punctuation goes (left. But again, prefix () pairs don't work.
+ Even normal text gets prefixed. The first Argument is not parsed.
+ Nothing can be prefixed to the next line. Trailing punctuation still
+ counts as _e_o_s . (But it does not fall out of enclosures .)
+
+ It makes no sense at the very _e_n_d
+
+OpenBSD November 30, 2014 OpenBSD
diff --git a/regress/mdoc/Pf/spacing.out_lint b/regress/mdoc/Pf/spacing.out_lint
new file mode 100644
index 00000000..8444f0dd
--- /dev/null
+++ b/regress/mdoc/Pf/spacing.out_lint
@@ -0,0 +1,3 @@
+mandoc: spacing.in:24:2: WARNING: nothing follows prefix: Pf prefixed
+mandoc: spacing.in:27:9: WARNING: nothing follows prefix: Pf .
+mandoc: spacing.in:31:9: WARNING: nothing follows prefix: Pf at eol
diff --git a/regress/mdoc/Pp/Makefile b/regress/mdoc/Pp/Makefile
new file mode 100644
index 00000000..04e1bc3b
--- /dev/null
+++ b/regress/mdoc/Pp/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2015/02/04 19:11:17 schwarze Exp $
+
+REGRESS_TARGETS = arg
+LINT_TARGETS = arg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Pp/arg.in b/regress/mdoc/Pp/arg.in
new file mode 100644
index 00000000..563a4e98
--- /dev/null
+++ b/regress/mdoc/Pp/arg.in
@@ -0,0 +1,14 @@
+.Dd February 4, 2015
+.Dt PP-ARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Pp-arg
+.Nd paragraph macro with arguments
+.Sh DESCRIPTION
+line 1
+.Pp drop this
+line 2
+.br drop this
+line 3
+.sp 1v drop this
+line 4
diff --git a/regress/mdoc/Pp/arg.out_ascii b/regress/mdoc/Pp/arg.out_ascii
new file mode 100644
index 00000000..543772f8
--- /dev/null
+++ b/regress/mdoc/Pp/arg.out_ascii
@@ -0,0 +1,14 @@
+PP-ARG(1) General Commands Manual PP-ARG(1)
+
+NNAAMMEE
+ PPpp--aarrgg - paragraph macro with arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ line 1
+
+ line 2
+ line 3
+
+ line 4
+
+OpenBSD February 4, 2015 OpenBSD
diff --git a/regress/mdoc/Pp/arg.out_lint b/regress/mdoc/Pp/arg.out_lint
new file mode 100644
index 00000000..2e0a2f63
--- /dev/null
+++ b/regress/mdoc/Pp/arg.out_lint
@@ -0,0 +1,3 @@
+mandoc: arg.in:9:2: ERROR: skipping all arguments: Pp drop
+mandoc: arg.in:11:2: ERROR: skipping all arguments: br drop
+mandoc: arg.in:13:8: ERROR: skipping excess arguments: sp ... drop
diff --git a/regress/mdoc/Qq/Makefile b/regress/mdoc/Qq/Makefile
new file mode 100644
index 00000000..24f19edf
--- /dev/null
+++ b/regress/mdoc/Qq/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2011/12/04 03:09:25 schwarze Exp $
+
+REGRESS_TARGETS=empty
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Qq/empty.in b/regress/mdoc/Qq/empty.in
new file mode 100644
index 00000000..58d6bf3d
--- /dev/null
+++ b/regress/mdoc/Qq/empty.in
@@ -0,0 +1,14 @@
+.Dd October 21, 2010
+.Dt QQ-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Qq-empty
+.Nd empty implicit enclosure macros
+.Sh DESCRIPTION
+An empty
+.Qq
+and a full
+.Qq user@host
+quotation.
+And another
+.Qo full Qc one .
diff --git a/regress/mdoc/Qq/empty.out_ascii b/regress/mdoc/Qq/empty.out_ascii
new file mode 100644
index 00000000..311f1e94
--- /dev/null
+++ b/regress/mdoc/Qq/empty.out_ascii
@@ -0,0 +1,9 @@
+QQ-EMPTY(1) General Commands Manual QQ-EMPTY(1)
+
+NNAAMMEE
+ QQqq--eemmppttyy - empty implicit enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty "" and a full "user@host" quotation. And another "full" one.
+
+OpenBSD October 21, 2010 OpenBSD
diff --git a/regress/mdoc/Rs/Makefile b/regress/mdoc/Rs/Makefile
new file mode 100644
index 00000000..45fd8cb2
--- /dev/null
+++ b/regress/mdoc/Rs/Makefile
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile,v 1.7 2015/02/04 18:03:28 schwarze Exp $
+
+REGRESS_TARGETS = allch args break empty three_authors
+LINT_TARGETS = allch args empty
+
+# groff-1.22.3 defect:
+# - arguments after .Rs cause the macro to be ignored
+
+SKIP_GROFF = args
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Rs/allch.in b/regress/mdoc/Rs/allch.in
new file mode 100644
index 00000000..abffe803
--- /dev/null
+++ b/regress/mdoc/Rs/allch.in
@@ -0,0 +1,48 @@
+.Dd July 7, 2014
+.Dt RS-ALLCH 1
+.Os OpenBSD
+.Sh NAME
+.Nm Rs-allch
+.Nd reference block using all supported child macros
+.Sh DESCRIPTION
+reference on the same line:
+.Rs
+.%A author name
+.%T title of article
+.%B book title
+.%I issuer name
+some
+.%J journal name
+.%R report name
+.%N number of journal
+.%V volume number
+.Em bogus
+text
+.%U "uniform resource locator"
+.%P page number
+.%Q institutional author
+.%C city name
+.%D date of publication
+.%O optional information
+.Re
+.Sh SEE ALSO
+reference after a blank line:
+.Rs
+.%A author name
+.%T title of article
+.%B book title
+.%I issuer name
+some
+.Em bogus
+.%J journal name
+.%R report name
+.%N number of journal
+.%V volume number
+text
+.%U "uniform resource locator"
+.%P page number
+.%Q institutional author
+.%C city name
+.%D date of publication
+.%O optional information
+.Re
diff --git a/regress/mdoc/Rs/allch.out_ascii b/regress/mdoc/Rs/allch.out_ascii
new file mode 100644
index 00000000..78b1230d
--- /dev/null
+++ b/regress/mdoc/Rs/allch.out_ascii
@@ -0,0 +1,21 @@
+RS-ALLCH(1) General Commands Manual RS-ALLCH(1)
+
+NNAAMMEE
+ RRss--aallllcchh - reference block using all supported child macros
+
+DDEESSCCRRIIPPTTIIOONN
+ reference on the same line: some _b_o_g_u_s text author name, "title of
+ article", _b_o_o_k _t_i_t_l_e, _i_s_s_u_e_r _n_a_m_e, _j_o_u_r_n_a_l _n_a_m_e, report name, number of
+ journal, volume number, uniform resource locator, page number,
+ institutional author, city name, date of publication, optional
+ information.
+
+SSEEEE AALLSSOO
+ reference after a blank line:
+
+ some _b_o_g_u_s text author name, "title of article", _b_o_o_k _t_i_t_l_e, _i_s_s_u_e_r _n_a_m_e,
+ _j_o_u_r_n_a_l _n_a_m_e, report name, number of journal, volume number, uniform
+ resource locator, page number, institutional author, city name, date of
+ publication, optional information.
+
+OpenBSD July 7, 2014 OpenBSD
diff --git a/regress/mdoc/Rs/allch.out_lint b/regress/mdoc/Rs/allch.out_lint
new file mode 100644
index 00000000..d8f8988f
--- /dev/null
+++ b/regress/mdoc/Rs/allch.out_lint
@@ -0,0 +1,6 @@
+mandoc: allch.in:14:1: WARNING: invalid content in Rs block: text
+mandoc: allch.in:19:2: WARNING: invalid content in Rs block: Em
+mandoc: allch.in:20:1: WARNING: invalid content in Rs block: text
+mandoc: allch.in:35:1: WARNING: invalid content in Rs block: text
+mandoc: allch.in:36:2: WARNING: invalid content in Rs block: Em
+mandoc: allch.in:41:1: WARNING: invalid content in Rs block: text
diff --git a/regress/mdoc/Rs/args.in b/regress/mdoc/Rs/args.in
new file mode 100644
index 00000000..2f292013
--- /dev/null
+++ b/regress/mdoc/Rs/args.in
@@ -0,0 +1,18 @@
+.Dd February 4, 2015
+.Dt RS-ARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Rs-args
+.Nd arguments on a reference block header line
+.Sh SEE ALSO
+initial text
+.Rs bogus
+.%A author name
+.%B book title
+.Re
+middle text
+.Rs Sy bogus
+.%A author name
+.%B book title
+.Re
+final text
diff --git a/regress/mdoc/Rs/args.out_ascii b/regress/mdoc/Rs/args.out_ascii
new file mode 100644
index 00000000..30cb3c86
--- /dev/null
+++ b/regress/mdoc/Rs/args.out_ascii
@@ -0,0 +1,13 @@
+RS-ARGS(1) General Commands Manual RS-ARGS(1)
+
+NNAAMMEE
+ RRss--aarrggss - arguments on a reference block header line
+
+SSEEEE AALLSSOO
+ initial text
+
+ author name, _b_o_o_k _t_i_t_l_e. middle text
+
+ author name, _b_o_o_k _t_i_t_l_e. final text
+
+OpenBSD February 4, 2015 OpenBSD
diff --git a/regress/mdoc/Rs/args.out_lint b/regress/mdoc/Rs/args.out_lint
new file mode 100644
index 00000000..f5bccd15
--- /dev/null
+++ b/regress/mdoc/Rs/args.out_lint
@@ -0,0 +1,2 @@
+mandoc: args.in:9:5: ERROR: skipping all arguments: Rs bogus
+mandoc: args.in:14:5: ERROR: skipping all arguments: Rs Sy
diff --git a/regress/mdoc/Rs/break.in b/regress/mdoc/Rs/break.in
new file mode 100644
index 00000000..0e8d0301
--- /dev/null
+++ b/regress/mdoc/Rs/break.in
@@ -0,0 +1,27 @@
+.Dd April 15, 2014
+.Dt RS-BREAK 1
+.Os OpenBSD
+.Sh NAME
+.Nm Rs-break
+.Nd line break before reference start
+.Sh DESCRIPTION
+reference on the same line:
+.Rs
+.%A author
+.%J journal
+.%N 42
+.Re
+.Sh SEE ALSO
+reference after a blank line:
+.Rs
+.%A author
+.%J journal
+.%N 42
+.Re
+.Sh SEE Em ALSO
+reference after a blank line:
+.Rs
+.%A author
+.%J journal
+.%N 42
+.Re
diff --git a/regress/mdoc/Rs/break.out_ascii b/regress/mdoc/Rs/break.out_ascii
new file mode 100644
index 00000000..556c82db
--- /dev/null
+++ b/regress/mdoc/Rs/break.out_ascii
@@ -0,0 +1,19 @@
+RS-BREAK(1) General Commands Manual RS-BREAK(1)
+
+NNAAMMEE
+ RRss--bbrreeaakk - line break before reference start
+
+DDEESSCCRRIIPPTTIIOONN
+ reference on the same line: author, _j_o_u_r_n_a_l, 42.
+
+SSEEEE AALLSSOO
+ reference after a blank line:
+
+ author, _j_o_u_r_n_a_l, 42.
+
+SSEEEE _A_L_S_O
+ reference after a blank line:
+
+ author, _j_o_u_r_n_a_l, 42.
+
+OpenBSD April 15, 2014 OpenBSD
diff --git a/regress/mdoc/Rs/empty.in b/regress/mdoc/Rs/empty.in
new file mode 100644
index 00000000..36d80663
--- /dev/null
+++ b/regress/mdoc/Rs/empty.in
@@ -0,0 +1,16 @@
+.Dd February 4, 2015
+.Dt RS-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Rs-empty
+.Nd empty reference blocks
+.Sh DESCRIPTION
+initial text
+.Rs
+.Re
+final text
+.Sh SEE ALSO
+initial text
+.Rs
+.Re
+final text
diff --git a/regress/mdoc/Rs/empty.out_ascii b/regress/mdoc/Rs/empty.out_ascii
new file mode 100644
index 00000000..9dad8f6a
--- /dev/null
+++ b/regress/mdoc/Rs/empty.out_ascii
@@ -0,0 +1,14 @@
+RS-EMPTY(1) General Commands Manual RS-EMPTY(1)
+
+NNAAMMEE
+ RRss--eemmppttyy - empty reference blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final text
+
+SSEEEE AALLSSOO
+ initial text
+
+ final text
+
+OpenBSD February 4, 2015 OpenBSD
diff --git a/regress/mdoc/Rs/empty.out_lint b/regress/mdoc/Rs/empty.out_lint
new file mode 100644
index 00000000..afaf9a10
--- /dev/null
+++ b/regress/mdoc/Rs/empty.out_lint
@@ -0,0 +1,2 @@
+mandoc: empty.in:9:2: WARNING: empty reference block: Rs
+mandoc: empty.in:14:2: WARNING: empty reference block: Rs
diff --git a/regress/mdoc/Rs/three_authors.in b/regress/mdoc/Rs/three_authors.in
new file mode 100644
index 00000000..6ce73bb0
--- /dev/null
+++ b/regress/mdoc/Rs/three_authors.in
@@ -0,0 +1,13 @@
+.Dd May 1, 2009
+.Dt RS-THREE_AUTHORS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Rs-three_authors
+.Nd listing three authors in a reference block
+.Sh AUTHORS
+.Rs
+.%A kristaps
+.%A joerg
+.%A ingo
+.%T mandoc
+.Re
diff --git a/regress/mdoc/Rs/three_authors.out_ascii b/regress/mdoc/Rs/three_authors.out_ascii
new file mode 100644
index 00000000..a267086a
--- /dev/null
+++ b/regress/mdoc/Rs/three_authors.out_ascii
@@ -0,0 +1,9 @@
+RS-THREE_AUTHORS(1) General Commands Manual RS-THREE_AUTHORS(1)
+
+NNAAMMEE
+ RRss--tthhrreeee__aauutthhoorrss - listing three authors in a reference block
+
+AAUUTTHHOORRSS
+ kristaps, joerg, and ingo, _m_a_n_d_o_c.
+
+OpenBSD May 1, 2009 OpenBSD
diff --git a/regress/mdoc/Rv/Makefile b/regress/mdoc/Rv/Makefile
new file mode 100644
index 00000000..238982a3
--- /dev/null
+++ b/regress/mdoc/Rv/Makefile
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile,v 1.1 2014/08/14 02:00:53 schwarze Exp $
+
+REGRESS_TARGETS = args noname nostd
+LINT_TARGETS = noname nostd
+
+# groff-1.22.2 defect:
+# - .Rv without -std produces no output
+
+SKIP_GROFF = nostd
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Rv/args.in b/regress/mdoc/Rv/args.in
new file mode 100644
index 00000000..24f37eab
--- /dev/null
+++ b/regress/mdoc/Rv/args.in
@@ -0,0 +1,15 @@
+.Dd July 29, 2014
+.Dt RV-ARGS 3
+.Os OpenBSD
+.Sh NAME
+.Nm Rv-args
+.Nd arguments to the return value macro
+.Sh RETURN VALUES
+no arguments:
+.Rv -std
+.Pp
+one argument:
+.Rv -std one
+.Pp
+two arguments:
+.Rv -std one two
diff --git a/regress/mdoc/Rv/args.out_ascii b/regress/mdoc/Rv/args.out_ascii
new file mode 100644
index 00000000..d2b92536
--- /dev/null
+++ b/regress/mdoc/Rv/args.out_ascii
@@ -0,0 +1,22 @@
+RV-ARGS(3) Library Functions Manual RV-ARGS(3)
+
+NNAAMMEE
+ RRvv--aarrggss - arguments to the return value macro
+
+RREETTUURRNN VVAALLUUEESS
+ no arguments:
+ Upon successful completion, the value 0 is returned; otherwise the
+ value -1 is returned and the global variable _e_r_r_n_o is set to indicate the
+ error.
+
+ one argument:
+ The oonnee() function returns the value 0 if successful; otherwise the
+ value -1 is returned and the global variable _e_r_r_n_o is set to indicate the
+ error.
+
+ two arguments:
+ The oonnee() and ttwwoo() functions return the value 0 if successful; otherwise
+ the value -1 is returned and the global variable _e_r_r_n_o is set to indicate
+ the error.
+
+OpenBSD July 29, 2014 OpenBSD
diff --git a/regress/mdoc/Rv/noname.in b/regress/mdoc/Rv/noname.in
new file mode 100644
index 00000000..4bb21cce
--- /dev/null
+++ b/regress/mdoc/Rv/noname.in
@@ -0,0 +1,15 @@
+.Dd July 29, 2014
+.Dt RV-NONAME 3
+.Os OpenBSD
+.Sh NAME
+.Nm
+.Nd return value macro without an available name
+.Sh RETURN VALUES
+no arguments:
+.Rv -std
+.Pp
+one argument:
+.Rv -std one
+.Pp
+two arguments:
+.Rv -std one two
diff --git a/regress/mdoc/Rv/noname.out_ascii b/regress/mdoc/Rv/noname.out_ascii
new file mode 100644
index 00000000..8cdd6a2f
--- /dev/null
+++ b/regress/mdoc/Rv/noname.out_ascii
@@ -0,0 +1,22 @@
+RV-NONAME(3) Library Functions Manual RV-NONAME(3)
+
+NNAAMMEE
+ - return value macro without an available name
+
+RREETTUURRNN VVAALLUUEESS
+ no arguments:
+ Upon successful completion, the value 0 is returned; otherwise the
+ value -1 is returned and the global variable _e_r_r_n_o is set to indicate the
+ error.
+
+ one argument:
+ The oonnee() function returns the value 0 if successful; otherwise the
+ value -1 is returned and the global variable _e_r_r_n_o is set to indicate the
+ error.
+
+ two arguments:
+ The oonnee() and ttwwoo() functions return the value 0 if successful; otherwise
+ the value -1 is returned and the global variable _e_r_r_n_o is set to indicate
+ the error.
+
+OpenBSD July 29, 2014 OpenBSD
diff --git a/regress/mdoc/Rv/noname.out_lint b/regress/mdoc/Rv/noname.out_lint
new file mode 100644
index 00000000..a0eec12a
--- /dev/null
+++ b/regress/mdoc/Rv/noname.out_lint
@@ -0,0 +1 @@
+mandoc: noname.in:5:2: ERROR: missing manual name, using "": Nm
diff --git a/regress/mdoc/Rv/nostd.in b/regress/mdoc/Rv/nostd.in
new file mode 100644
index 00000000..0dc9ea12
--- /dev/null
+++ b/regress/mdoc/Rv/nostd.in
@@ -0,0 +1,15 @@
+.Dd July 29, 2014
+.Dt RV-NOSTD 3
+.Os OpenBSD
+.Sh NAME
+.Nm Rv-nostd
+.Nd return value macros without -std arguments
+.Sh RETURN VALUES
+no arguments:
+.Rv
+.Pp
+one argument:
+.Rv one
+.Pp
+two arguments:
+.Rv one two
diff --git a/regress/mdoc/Rv/nostd.out_ascii b/regress/mdoc/Rv/nostd.out_ascii
new file mode 100644
index 00000000..320b8b11
--- /dev/null
+++ b/regress/mdoc/Rv/nostd.out_ascii
@@ -0,0 +1,22 @@
+RV-NOSTD(3) Library Functions Manual RV-NOSTD(3)
+
+NNAAMMEE
+ RRvv--nnoossttdd - return value macros without -std arguments
+
+RREETTUURRNN VVAALLUUEESS
+ no arguments:
+ Upon successful completion, the value 0 is returned; otherwise the
+ value -1 is returned and the global variable _e_r_r_n_o is set to indicate the
+ error.
+
+ one argument:
+ The oonnee() function returns the value 0 if successful; otherwise the
+ value -1 is returned and the global variable _e_r_r_n_o is set to indicate the
+ error.
+
+ two arguments:
+ The oonnee() and ttwwoo() functions return the value 0 if successful; otherwise
+ the value -1 is returned and the global variable _e_r_r_n_o is set to indicate
+ the error.
+
+OpenBSD July 29, 2014 OpenBSD
diff --git a/regress/mdoc/Rv/nostd.out_lint b/regress/mdoc/Rv/nostd.out_lint
new file mode 100644
index 00000000..c58122e0
--- /dev/null
+++ b/regress/mdoc/Rv/nostd.out_lint
@@ -0,0 +1,3 @@
+mandoc: nostd.in:9:2: WARNING: missing -std argument, adding it: Rv
+mandoc: nostd.in:12:2: WARNING: missing -std argument, adding it: Rv
+mandoc: nostd.in:15:2: WARNING: missing -std argument, adding it: Rv
diff --git a/regress/mdoc/Sh/Makefile b/regress/mdoc/Sh/Makefile
new file mode 100644
index 00000000..a1db1161
--- /dev/null
+++ b/regress/mdoc/Sh/Makefile
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile,v 1.7 2017/01/08 00:10:22 schwarze Exp $
+
+REGRESS_TARGETS = badNAME before empty emptyNAME first nohead order
+REGRESS_TARGETS += orderNAME punctNAME subbefore
+LINT_TARGETS = badNAME before empty emptyNAME first nohead order
+LINT_TARGETS += orderNAME punctNAME subbefore
+
+SKIP_GROFF = subbefore first empty
+SKIP_ASCII = first
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sh/badNAME.in b/regress/mdoc/Sh/badNAME.in
new file mode 100644
index 00000000..85ebdbf7
--- /dev/null
+++ b/regress/mdoc/Sh/badNAME.in
@@ -0,0 +1,8 @@
+.Dd July 1, 2014
+.Dt SH-BADNAME 1
+.Os OpenBSD
+.Sh NAME
+.Em bad NAME section
+.Nm Sh-badNAME
+.Sh DESCRIPTION
+The description appears before the name and is not marked up with Nd.
diff --git a/regress/mdoc/Sh/badNAME.out_ascii b/regress/mdoc/Sh/badNAME.out_ascii
new file mode 100644
index 00000000..8c329a85
--- /dev/null
+++ b/regress/mdoc/Sh/badNAME.out_ascii
@@ -0,0 +1,9 @@
+SH-BADNAME(1) General Commands Manual SH-BADNAME(1)
+
+NNAAMMEE
+ _b_a_d _N_A_M_E _s_e_c_t_i_o_n SShh--bbaaddNNAAMMEE
+
+DDEESSCCRRIIPPTTIIOONN
+ The description appears before the name and is not marked up with Nd.
+
+OpenBSD July 1, 2014 OpenBSD
diff --git a/regress/mdoc/Sh/badNAME.out_lint b/regress/mdoc/Sh/badNAME.out_lint
new file mode 100644
index 00000000..9fbbf668
--- /dev/null
+++ b/regress/mdoc/Sh/badNAME.out_lint
@@ -0,0 +1,2 @@
+mandoc: badNAME.in:5:2: WARNING: bad NAME section content: Em
+mandoc: badNAME.in:4:2: WARNING: NAME section without description
diff --git a/regress/mdoc/Sh/before.in b/regress/mdoc/Sh/before.in
new file mode 100644
index 00000000..95b750cc
--- /dev/null
+++ b/regress/mdoc/Sh/before.in
@@ -0,0 +1,13 @@
+.Dd July 7, 2014
+.Dt SH-BEFORE 1
+.Os OpenBSD
+Can
+.Xr mandoc 1
+on
+.Ox
+handle this?
+.Sh NAME
+.Nm Sh-before
+.Nd content before the first section header
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Sh/before.out_ascii b/regress/mdoc/Sh/before.out_ascii
new file mode 100644
index 00000000..246c684a
--- /dev/null
+++ b/regress/mdoc/Sh/before.out_ascii
@@ -0,0 +1,11 @@
+SH-BEFORE(1) General Commands Manual SH-BEFORE(1)
+
+Can mandoc(1) on OpenBSD handle this?
+
+NNAAMMEE
+ SShh--bbeeffoorree - content before the first section header
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD July 7, 2014 OpenBSD
diff --git a/regress/mdoc/Sh/before.out_lint b/regress/mdoc/Sh/before.out_lint
new file mode 100644
index 00000000..314acb29
--- /dev/null
+++ b/regress/mdoc/Sh/before.out_lint
@@ -0,0 +1 @@
+mandoc: before.in:4:1: WARNING: content before first section header: text
diff --git a/regress/mdoc/Sh/empty.in b/regress/mdoc/Sh/empty.in
new file mode 100644
index 00000000..c830ac62
--- /dev/null
+++ b/regress/mdoc/Sh/empty.in
@@ -0,0 +1,10 @@
+.Dd November 21, 2014
+.Dt SH-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sh-empty
+.Nd empty sections
+.Sh SYNOPSIS
+.Sh DESCRIPTION Xo
+.Sh BUGS
+Quite some.
diff --git a/regress/mdoc/Sh/empty.out_ascii b/regress/mdoc/Sh/empty.out_ascii
new file mode 100644
index 00000000..d34892ff
--- /dev/null
+++ b/regress/mdoc/Sh/empty.out_ascii
@@ -0,0 +1,11 @@
+SH-EMPTY(1) General Commands Manual SH-EMPTY(1)
+
+NNAAMMEE
+ SShh--eemmppttyy - empty sections
+
+SSYYNNOOPPSSIISS
+DDEESSCCRRIIPPTTIIOONN
+BBUUGGSS
+ Quite some.
+
+OpenBSD November 21, 2014 OpenBSD
diff --git a/regress/mdoc/Sh/empty.out_lint b/regress/mdoc/Sh/empty.out_lint
new file mode 100644
index 00000000..28d05c97
--- /dev/null
+++ b/regress/mdoc/Sh/empty.out_lint
@@ -0,0 +1 @@
+mandoc: empty.in:9:2: ERROR: inserting missing end of block: Sh breaks Xo
diff --git a/regress/mdoc/Sh/emptyNAME.in b/regress/mdoc/Sh/emptyNAME.in
new file mode 100644
index 00000000..621724e5
--- /dev/null
+++ b/regress/mdoc/Sh/emptyNAME.in
@@ -0,0 +1,6 @@
+.Dd July 1, 2014
+.Dt SH-EMPTYNAME 1
+.Os OpenBSD
+.Sh NAME
+.Sh DESCRIPTION
+The NAME section is empty.
diff --git a/regress/mdoc/Sh/emptyNAME.out_ascii b/regress/mdoc/Sh/emptyNAME.out_ascii
new file mode 100644
index 00000000..32336cd9
--- /dev/null
+++ b/regress/mdoc/Sh/emptyNAME.out_ascii
@@ -0,0 +1,7 @@
+SH-EMPTYNAME(1) General Commands Manual SH-EMPTYNAME(1)
+
+NNAAMMEE
+DDEESSCCRRIIPPTTIIOONN
+ The NAME section is empty.
+
+OpenBSD July 1, 2014 OpenBSD
diff --git a/regress/mdoc/Sh/emptyNAME.out_lint b/regress/mdoc/Sh/emptyNAME.out_lint
new file mode 100644
index 00000000..c6da49bb
--- /dev/null
+++ b/regress/mdoc/Sh/emptyNAME.out_lint
@@ -0,0 +1,2 @@
+mandoc: emptyNAME.in:4:2: WARNING: NAME section without Nm before Nd
+mandoc: emptyNAME.in:4:2: WARNING: NAME section without description
diff --git a/regress/mdoc/Sh/first.in b/regress/mdoc/Sh/first.in
new file mode 100644
index 00000000..f0d4b0b4
--- /dev/null
+++ b/regress/mdoc/Sh/first.in
@@ -0,0 +1,5 @@
+.Dd July 1, 2014
+.Dt SH-FIRST 1
+.Os OpenBSD
+.Sh DESCRIPTION
+The first section is not a NAME section.
diff --git a/regress/mdoc/Sh/first.out_lint b/regress/mdoc/Sh/first.out_lint
new file mode 100644
index 00000000..df39e0d0
--- /dev/null
+++ b/regress/mdoc/Sh/first.out_lint
@@ -0,0 +1 @@
+mandoc: first.in:4:2: WARNING: first section is not "NAME": Sh DESCRIPTION
diff --git a/regress/mdoc/Sh/nohead.in b/regress/mdoc/Sh/nohead.in
new file mode 100644
index 00000000..d4516cc7
--- /dev/null
+++ b/regress/mdoc/Sh/nohead.in
@@ -0,0 +1,12 @@
+.Dd February 5, 2015
+.Dt SH-NOHEAD 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sh-nohead
+.Nd sections without header lines
+.Sh DESCRIPTION
+empty section header:
+.Sh
+empty subsection header:
+.Ss
+text
diff --git a/regress/mdoc/Sh/nohead.out_ascii b/regress/mdoc/Sh/nohead.out_ascii
new file mode 100644
index 00000000..fa42f20c
--- /dev/null
+++ b/regress/mdoc/Sh/nohead.out_ascii
@@ -0,0 +1,9 @@
+SH-NOHEAD(1) General Commands Manual SH-NOHEAD(1)
+
+NNAAMMEE
+ SShh--nnoohheeaadd - sections without header lines
+
+DDEESSCCRRIIPPTTIIOONN
+ empty section header: empty subsection header: text
+
+OpenBSD February 5, 2015 OpenBSD
diff --git a/regress/mdoc/Sh/nohead.out_lint b/regress/mdoc/Sh/nohead.out_lint
new file mode 100644
index 00000000..b93f65e6
--- /dev/null
+++ b/regress/mdoc/Sh/nohead.out_lint
@@ -0,0 +1,2 @@
+mandoc: nohead.in:9:2: WARNING: skipping empty macro: Sh
+mandoc: nohead.in:11:2: WARNING: skipping empty macro: Ss
diff --git a/regress/mdoc/Sh/order.in b/regress/mdoc/Sh/order.in
new file mode 100644
index 00000000..ffab6878
--- /dev/null
+++ b/regress/mdoc/Sh/order.in
@@ -0,0 +1,12 @@
+.Dd July 1, 2014
+.Dt SH-ORDER 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sh-order
+.Nd sections out of conventional order
+.Sh DESCRIPTION
+some text
+.Sh SYNOPSIS
+.Sh SYNOPSIS
+.Sh ERRORS
+.Vt int errno
diff --git a/regress/mdoc/Sh/order.out_ascii b/regress/mdoc/Sh/order.out_ascii
new file mode 100644
index 00000000..0ed56118
--- /dev/null
+++ b/regress/mdoc/Sh/order.out_ascii
@@ -0,0 +1,14 @@
+SH-ORDER(1) General Commands Manual SH-ORDER(1)
+
+NNAAMMEE
+ SShh--oorrddeerr - sections out of conventional order
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+SSYYNNOOPPSSIISS
+SSYYNNOOPPSSIISS
+EERRRROORRSS
+ _i_n_t _e_r_r_n_o
+
+OpenBSD July 1, 2014 OpenBSD
diff --git a/regress/mdoc/Sh/order.out_lint b/regress/mdoc/Sh/order.out_lint
new file mode 100644
index 00000000..67aa5db8
--- /dev/null
+++ b/regress/mdoc/Sh/order.out_lint
@@ -0,0 +1,3 @@
+mandoc: order.in:9:2: WARNING: sections out of conventional order: Sh SYNOPSIS
+mandoc: order.in:10:2: WARNING: duplicate section title: Sh SYNOPSIS
+mandoc: order.in:11:2: WARNING: unexpected section: Sh ERRORS for 2, 3, 4, 9 only
diff --git a/regress/mdoc/Sh/orderNAME.in b/regress/mdoc/Sh/orderNAME.in
new file mode 100644
index 00000000..d8fa1452
--- /dev/null
+++ b/regress/mdoc/Sh/orderNAME.in
@@ -0,0 +1,9 @@
+.Dd January 7, 2017
+.Dt SH-ORDERNAME 1
+.Os OpenBSD
+.Sh NAME
+.Nd name after description in NAME section
+.Ss subsection
+.Nm Sh-orderNAME
+.Sh DESCRIPTION
+The order of Nm and Nd is wrong in the NAME section.
diff --git a/regress/mdoc/Sh/orderNAME.out_ascii b/regress/mdoc/Sh/orderNAME.out_ascii
new file mode 100644
index 00000000..5e9e032f
--- /dev/null
+++ b/regress/mdoc/Sh/orderNAME.out_ascii
@@ -0,0 +1,12 @@
+SH-ORDERNAME(1) General Commands Manual SH-ORDERNAME(1)
+
+NNAAMMEE
+ - name after description in NAME section
+
+ ssuubbsseeccttiioonn
+ SShh--oorrddeerrNNAAMMEE
+
+DDEESSCCRRIIPPTTIIOONN
+ The order of Nm and Nd is wrong in the NAME section.
+
+OpenBSD January 7, 2017 OpenBSD
diff --git a/regress/mdoc/Sh/orderNAME.out_lint b/regress/mdoc/Sh/orderNAME.out_lint
new file mode 100644
index 00000000..0049023d
--- /dev/null
+++ b/regress/mdoc/Sh/orderNAME.out_lint
@@ -0,0 +1,2 @@
+mandoc: orderNAME.in:5:2: WARNING: description not at the end of NAME
+mandoc: orderNAME.in:4:2: WARNING: NAME section without Nm before Nd
diff --git a/regress/mdoc/Sh/punctNAME.in b/regress/mdoc/Sh/punctNAME.in
new file mode 100644
index 00000000..c34648b5
--- /dev/null
+++ b/regress/mdoc/Sh/punctNAME.in
@@ -0,0 +1,10 @@
+.Dd January 7, 2017
+.Dt SH-PUNCTNAME 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sh-punctNAME
+.Nm second_name ;
+.Nm third_name ,
+.Nd wrong punctuation in the NAME section
+.Sh DESCRIPTION
+One comma is missing, and one is misplaced.
diff --git a/regress/mdoc/Sh/punctNAME.out_ascii b/regress/mdoc/Sh/punctNAME.out_ascii
new file mode 100644
index 00000000..8b74eda5
--- /dev/null
+++ b/regress/mdoc/Sh/punctNAME.out_ascii
@@ -0,0 +1,10 @@
+SH-PUNCTNAME(1) General Commands Manual SH-PUNCTNAME(1)
+
+NNAAMMEE
+ SShh--ppuunnccttNNAAMMEE sseeccoonndd__nnaammee; tthhiirrdd__nnaammee, - wrong punctuation in the NAME
+ section
+
+DDEESSCCRRIIPPTTIIOONN
+ One comma is missing, and one is misplaced.
+
+OpenBSD January 7, 2017 OpenBSD
diff --git a/regress/mdoc/Sh/punctNAME.out_lint b/regress/mdoc/Sh/punctNAME.out_lint
new file mode 100644
index 00000000..9ed95e4e
--- /dev/null
+++ b/regress/mdoc/Sh/punctNAME.out_lint
@@ -0,0 +1,4 @@
+mandoc: punctNAME.in:6:2: WARNING: missing comma before name: Nm second_name
+mandoc: punctNAME.in:6:17: WARNING: bad NAME section content: text
+mandoc: punctNAME.in:7:2: WARNING: missing comma before name: Nm third_name
+mandoc: punctNAME.in:7:16: WARNING: bad NAME section content: text
diff --git a/regress/mdoc/Sh/subbefore.in b/regress/mdoc/Sh/subbefore.in
new file mode 100644
index 00000000..ac800e13
--- /dev/null
+++ b/regress/mdoc/Sh/subbefore.in
@@ -0,0 +1,14 @@
+.Dd July 30, 2014
+.Dt SH-SUBBEFORE 1
+.Os OpenBSD
+.Ss Subsection
+Can
+.Xr mandoc 1
+on
+.Ox
+handle this?
+.Sh NAME
+.Nm Sh-subbefore
+.Nd subsection before the first section header
+.Sh DESCRIPTION
+some text
diff --git a/regress/mdoc/Sh/subbefore.out_ascii b/regress/mdoc/Sh/subbefore.out_ascii
new file mode 100644
index 00000000..a53bb7dc
--- /dev/null
+++ b/regress/mdoc/Sh/subbefore.out_ascii
@@ -0,0 +1,12 @@
+SH-SUBBEFORE(1) General Commands Manual SH-SUBBEFORE(1)
+
+ SSuubbsseeccttiioonn
+ Can mandoc(1) on OpenBSD handle this?
+
+NNAAMMEE
+ SShh--ssuubbbbeeffoorree - subsection before the first section header
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+
+OpenBSD July 30, 2014 OpenBSD
diff --git a/regress/mdoc/Sh/subbefore.out_lint b/regress/mdoc/Sh/subbefore.out_lint
new file mode 100644
index 00000000..fd497d25
--- /dev/null
+++ b/regress/mdoc/Sh/subbefore.out_lint
@@ -0,0 +1 @@
+mandoc: subbefore.in:4:2: WARNING: content before first section header: Ss
diff --git a/regress/mdoc/Sm/Makefile b/regress/mdoc/Sm/Makefile
new file mode 100644
index 00000000..197b1d74
--- /dev/null
+++ b/regress/mdoc/Sm/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.7 2014/11/26 19:22:44 schwarze Exp $
+
+REGRESS_TARGETS = noarg badarg scope spacing-No spacing-Op twoarg
+LINT_TARGETS = badarg twoarg
+
+SKIP_TMAN ?= scope
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sm/badarg.in b/regress/mdoc/Sm/badarg.in
new file mode 100644
index 00000000..8684965e
--- /dev/null
+++ b/regress/mdoc/Sm/badarg.in
@@ -0,0 +1,14 @@
+.Dd July 3, 2014
+.Dt SM-BADARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-badarg
+.Nd spacing macro with invalid arguments
+.Sh DESCRIPTION
+.Fl f Ar on
+.Sm off
+.Fl f Ar off
+.Sm bad
+.Fl f Ar bad Pq on
+.Sm bad
+.Fl f Ar bad Pq off
diff --git a/regress/mdoc/Sm/badarg.out_ascii b/regress/mdoc/Sm/badarg.out_ascii
new file mode 100644
index 00000000..6b65fb9a
--- /dev/null
+++ b/regress/mdoc/Sm/badarg.out_ascii
@@ -0,0 +1,9 @@
+SM-BADARG(1) General Commands Manual SM-BADARG(1)
+
+NNAAMMEE
+ SSmm--bbaaddaarrgg - spacing macro with invalid arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ --ff _o_n --ff_o_f_f bad --ff _b_a_d (on) bad--ff_b_a_d(off)
+
+OpenBSD July 3, 2014 OpenBSD
diff --git a/regress/mdoc/Sm/badarg.out_lint b/regress/mdoc/Sm/badarg.out_lint
new file mode 100644
index 00000000..54644f34
--- /dev/null
+++ b/regress/mdoc/Sm/badarg.out_lint
@@ -0,0 +1,2 @@
+mandoc: badarg.in:11:5: WARNING: invalid Boolean argument: Sm bad
+mandoc: badarg.in:13:5: WARNING: invalid Boolean argument: Sm bad
diff --git a/regress/mdoc/Sm/noarg.in b/regress/mdoc/Sm/noarg.in
new file mode 100644
index 00000000..bb777430
--- /dev/null
+++ b/regress/mdoc/Sm/noarg.in
@@ -0,0 +1,20 @@
+.Dd July 2, 2014
+.Dt SM-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-noarg
+.Nd spacing macro without arguments
+.Sh DESCRIPTION
+.Fl f Ar on
+.Sm off
+.Fl f Ar off
+.Sm
+.Fl f Ar toggle Pq now on
+.Sm on
+.Fl f Ar on
+.Sm
+.Fl f Ar toggle Pq now off
+.Pp
+.Sm on
+.Fl f Ar on
+on a new line
diff --git a/regress/mdoc/Sm/noarg.out_ascii b/regress/mdoc/Sm/noarg.out_ascii
new file mode 100644
index 00000000..ea0f2fc6
--- /dev/null
+++ b/regress/mdoc/Sm/noarg.out_ascii
@@ -0,0 +1,11 @@
+SM-NOARG(1) General Commands Manual SM-NOARG(1)
+
+NNAAMMEE
+ SSmm--nnooaarrgg - spacing macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ --ff _o_n --ff_o_f_f --ff _t_o_g_g_l_e (now on) --ff _o_n --ff_t_o_g_g_l_e(nowoff)
+
+ --ff _o_n on a new line
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Sm/scope.in b/regress/mdoc/Sm/scope.in
new file mode 100644
index 00000000..76ce050b
--- /dev/null
+++ b/regress/mdoc/Sm/scope.in
@@ -0,0 +1,30 @@
+.Dd January 2, 2010
+.Dt SM-SCOPE 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-scope
+.Nd scope of the spacing macro
+.Sh DESCRIPTION
+Using an abbreviated example from the
+.Xr ksh 1
+manual.
+.Pp
+Modifiers can be applied to the
+.Pf ${ Ns Ar name Ns }
+form of parameter substitution:
+.Bl -tag -width Ds
+.Sm off
+.It ${ Ar name No :- Ar word No }
+.Sm on
+If
+.Ar name
+is set and not
+.Dv NULL ,
+it is substituted; otherwise,
+.Ar word
+is substituted.
+.El
+.Pp
+In the above modifiers, the
+.Ql \&:
+can be omitted, ...
diff --git a/regress/mdoc/Sm/scope.out_ascii b/regress/mdoc/Sm/scope.out_ascii
new file mode 100644
index 00000000..8a735d1c
--- /dev/null
+++ b/regress/mdoc/Sm/scope.out_ascii
@@ -0,0 +1,17 @@
+SM-SCOPE(1) General Commands Manual SM-SCOPE(1)
+
+NNAAMMEE
+ SSmm--ssccooppee - scope of the spacing macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Using an abbreviated example from the ksh(1) manual.
+
+ Modifiers can be applied to the ${_n_a_m_e} form of parameter substitution:
+
+ ${_n_a_m_e:-_w_o_r_d}
+ If _n_a_m_e is set and not NULL, it is substituted; otherwise, _w_o_r_d
+ is substituted.
+
+ In the above modifiers, the `:' can be omitted, ...
+
+OpenBSD January 2, 2010 OpenBSD
diff --git a/regress/mdoc/Sm/spacing-No.in b/regress/mdoc/Sm/spacing-No.in
new file mode 100644
index 00000000..35b6b10b
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-No.in
@@ -0,0 +1,60 @@
+.Dd July 4, 2010
+.Dt SM-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-spacing
+.Nd basic tests of spacing mode
+.Sh SYNOPSIS
+.Nm mandoc
+.Sm off
+.Fl T Ar mode
+.Sm on
+.Ar
+.Sh DESCRIPTION
+text1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+text2 text3
+.Sm on
+.No macro4
+.Pp
+text1
+.Sm off
+.No macro2 macro3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+.No macro2 No macro3
+.Sm on
+.No macro4
+.Pp
+.No macro1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+.No macro1
+.Sm off
+text2 text3
+.Sm on
+.No macro4
+.Pp
+.No macro1
+.Sm off
+.No macro2 No macro3
+.Sm on
+text4
+.Pp
+.No macro1
+.Sm off
+.No macro2 No macro3
+.Sm on
+.No macro4
diff --git a/regress/mdoc/Sm/spacing-No.out_ascii b/regress/mdoc/Sm/spacing-No.out_ascii
new file mode 100644
index 00000000..d303e3cf
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-No.out_ascii
@@ -0,0 +1,26 @@
+SM-SPACING(1) General Commands Manual SM-SPACING(1)
+
+NNAAMMEE
+ SSmm--ssppaacciinngg - basic tests of spacing mode
+
+SSYYNNOOPPSSIISS
+ mmaannddoocc --TT_m_o_d_e _f_i_l_e _._._.
+
+DDEESSCCRRIIPPTTIIOONN
+ text1 text2 text3 text4
+
+ text1 text2 text3 macro4
+
+ text1 macro2macro3 text4
+
+ text1 macro2macro3 macro4
+
+ macro1 text2 text3 text4
+
+ macro1 text2 text3 macro4
+
+ macro1 macro2macro3 text4
+
+ macro1 macro2macro3 macro4
+
+OpenBSD July 4, 2010 OpenBSD
diff --git a/regress/mdoc/Sm/spacing-Op.in b/regress/mdoc/Sm/spacing-Op.in
new file mode 100644
index 00000000..9d3716a4
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-Op.in
@@ -0,0 +1,63 @@
+.Dd July 4, 2010
+.Dt SM-SPACING-OP 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sm-spacing-Op
+.Nd spacing mode, demonstrated using the .Op macro
+.Sh SYNOPSIS
+.Nm mandoc
+.Sm off
+.Fl T Ar mode
+.Sm on
+.Ar
+.Sh DESCRIPTION
+text1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+text2 text3
+.Sm on
+.Op macro4
+.Pp
+text1
+.Sm off
+.Op macro2 macro3
+.Sm on
+text4
+.Pp
+text1
+.Sm off
+.Op macro2 Op macro3
+.Sm on
+.Op macro4
+.Pp
+.Op macro1
+.Sm off
+text2 text3
+.Sm on
+text4
+.Pp
+.Op macro1
+.Sm off
+text2 text3
+.Sm on
+.Op macro4
+.Pp
+.Op macro1
+.Sm off
+.Op macro2 Op macro3
+.Sm on
+text4
+.Pp
+.Op macro1
+.Sm off
+.Op macro2 Op macro3
+.Sm on
+.Op macro4
+.Pp
+.Sm on
+.Op macro1
diff --git a/regress/mdoc/Sm/spacing-Op.out_ascii b/regress/mdoc/Sm/spacing-Op.out_ascii
new file mode 100644
index 00000000..c5338dce
--- /dev/null
+++ b/regress/mdoc/Sm/spacing-Op.out_ascii
@@ -0,0 +1,28 @@
+SM-SPACING-OP(1) General Commands Manual SM-SPACING-OP(1)
+
+NNAAMMEE
+ SSmm--ssppaacciinngg--OOpp - spacing mode, demonstrated using the .Op macro
+
+SSYYNNOOPPSSIISS
+ mmaannddoocc --TT_m_o_d_e _f_i_l_e _._._.
+
+DDEESSCCRRIIPPTTIIOONN
+ text1 text2 text3 text4
+
+ text1 text2 text3 [macro4]
+
+ text1 [macro2macro3] text4
+
+ text1 [macro2[macro3]] [macro4]
+
+ [macro1] text2 text3 text4
+
+ [macro1] text2 text3 [macro4]
+
+ [macro1] [macro2[macro3]] text4
+
+ [macro1] [macro2[macro3]] [macro4]
+
+ [macro1]
+
+OpenBSD July 4, 2010 OpenBSD
diff --git a/regress/mdoc/Sm/twoarg.in b/regress/mdoc/Sm/twoarg.in
new file mode 100644
index 00000000..8e7b51d7
--- /dev/null
+++ b/regress/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/mdoc/Sm/twoarg.out_ascii b/regress/mdoc/Sm/twoarg.out_ascii
new file mode 100644
index 00000000..b8276c2f
--- /dev/null
+++ b/regress/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/mdoc/Sm/twoarg.out_lint b/regress/mdoc/Sm/twoarg.out_lint
new file mode 100644
index 00000000..581a5500
--- /dev/null
+++ b/regress/mdoc/Sm/twoarg.out_lint
@@ -0,0 +1 @@
+mandoc: twoarg.in:16:5: WARNING: invalid Boolean argument: Sm bad
diff --git a/regress/mdoc/Sq/Makefile b/regress/mdoc/Sq/Makefile
new file mode 100644
index 00000000..24f19edf
--- /dev/null
+++ b/regress/mdoc/Sq/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2011/12/04 03:09:25 schwarze Exp $
+
+REGRESS_TARGETS=empty
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sq/empty.in b/regress/mdoc/Sq/empty.in
new file mode 100644
index 00000000..00af9a27
--- /dev/null
+++ b/regress/mdoc/Sq/empty.in
@@ -0,0 +1,14 @@
+.Dd October 21, 2010
+.Dt SQ-EMPTY 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sq-empty
+.Nd empty implicit enclosure macros
+.Sh DESCRIPTION
+An empty
+.Sq
+and a full
+.Sq user@host
+quotation.
+And another
+.So full Sc one .
diff --git a/regress/mdoc/Sq/empty.out_ascii b/regress/mdoc/Sq/empty.out_ascii
new file mode 100644
index 00000000..4ca5e846
--- /dev/null
+++ b/regress/mdoc/Sq/empty.out_ascii
@@ -0,0 +1,9 @@
+SQ-EMPTY(1) General Commands Manual SQ-EMPTY(1)
+
+NNAAMMEE
+ SSqq--eemmppttyy - empty implicit enclosure macros
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty `' and a full `user@host' quotation. And another `full' one.
+
+OpenBSD October 21, 2010 OpenBSD
diff --git a/regress/mdoc/St/Makefile b/regress/mdoc/St/Makefile
new file mode 100644
index 00000000..a1bde7e1
--- /dev/null
+++ b/regress/mdoc/St/Makefile
@@ -0,0 +1,12 @@
+# $OpenBSD: Makefile,v 1.4 2015/02/10 17:47:19 schwarze Exp $
+
+REGRESS_TARGETS = badargs call
+LINT_TARGETS = badargs call
+
+# groff-1.22.3 defect:
+# - If the first argument of .St is the name of another macro,
+# internal groff_mdoc(7) state gets corrupted.
+
+SKIP_GROFF = call
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/St/badargs.in b/regress/mdoc/St/badargs.in
new file mode 100644
index 00000000..e1e35e0a
--- /dev/null
+++ b/regress/mdoc/St/badargs.in
@@ -0,0 +1,20 @@
+.Dd June 30, 2010
+.Dt ST-INVALID 1
+.Os OpenBSD
+.Sh NAME
+.Nm St-invalid
+.Nd handling of invalid standard argument
+.Sh STANDARDS
+valid argument:
+.St -p1003.1-2004
+.Pp
+invalid argument:
+.St -murks
+.Pp
+no arguments:
+.St
+.Pp
+two arguments:
+.St -p1003.1-2004 murks
+.Pp
+end of file
diff --git a/regress/mdoc/St/badargs.out_ascii b/regress/mdoc/St/badargs.out_ascii
new file mode 100644
index 00000000..a32ff83b
--- /dev/null
+++ b/regress/mdoc/St/badargs.out_ascii
@@ -0,0 +1,17 @@
+ST-INVALID(1) General Commands Manual ST-INVALID(1)
+
+NNAAMMEE
+ SStt--iinnvvaalliidd - handling of invalid standard argument
+
+SSTTAANNDDAARRDDSS
+ valid argument: IEEE Std 1003.1-2004 (``POSIX.1'')
+
+ invalid argument:
+
+ no arguments:
+
+ two arguments: IEEE Std 1003.1-2004 (``POSIX.1'') murks
+
+ end of file
+
+OpenBSD June 30, 2010 OpenBSD
diff --git a/regress/mdoc/St/badargs.out_lint b/regress/mdoc/St/badargs.out_lint
new file mode 100644
index 00000000..ae74aa1a
--- /dev/null
+++ b/regress/mdoc/St/badargs.out_lint
@@ -0,0 +1,2 @@
+mandoc: badargs.in:15:2: WARNING: skipping empty macro: St
+mandoc: badargs.in:12:5: ERROR: unknown standard specifier: St -murks
diff --git a/regress/mdoc/St/call.in b/regress/mdoc/St/call.in
new file mode 100644
index 00000000..10a45d3a
--- /dev/null
+++ b/regress/mdoc/St/call.in
@@ -0,0 +1,14 @@
+.Dd February 10, 2015
+.Dt ST-CALL 1
+.Os OpenBSD
+.Sh NAME
+.Nm St-call
+.Nd the standard macro calling other macros
+.Sh STANDARDS
+calling another macro:
+.St Fl called
+.Pp
+valid argument:
+.St -p1003.1-2004
+.Pp
+end of file
diff --git a/regress/mdoc/St/call.out_ascii b/regress/mdoc/St/call.out_ascii
new file mode 100644
index 00000000..17f04404
--- /dev/null
+++ b/regress/mdoc/St/call.out_ascii
@@ -0,0 +1,13 @@
+ST-CALL(1) General Commands Manual ST-CALL(1)
+
+NNAAMMEE
+ SStt--ccaallll - the standard macro calling other macros
+
+SSTTAANNDDAARRDDSS
+ calling another macro: --ccaalllleedd
+
+ valid argument: IEEE Std 1003.1-2004 (``POSIX.1'')
+
+ end of file
+
+OpenBSD February 10, 2015 OpenBSD
diff --git a/regress/mdoc/St/call.out_lint b/regress/mdoc/St/call.out_lint
new file mode 100644
index 00000000..6bf60a71
--- /dev/null
+++ b/regress/mdoc/St/call.out_lint
@@ -0,0 +1 @@
+mandoc: call.in:9:2: WARNING: skipping empty macro: St
diff --git a/regress/mdoc/Sx/Makefile b/regress/mdoc/Sx/Makefile
new file mode 100644
index 00000000..1be2a84a
--- /dev/null
+++ b/regress/mdoc/Sx/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = noarg font
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sx/font.in b/regress/mdoc/Sx/font.in
new file mode 100644
index 00000000..92d95014
--- /dev/null
+++ b/regress/mdoc/Sx/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt SX-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sx-font
+.Nd changing fonts inside the cross reference macro
+.Sh DESCRIPTION
+normal text
+.Sx emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Sx/font.out_ascii b/regress/mdoc/Sx/font.out_ascii
new file mode 100644
index 00000000..a3906c38
--- /dev/null
+++ b/regress/mdoc/Sx/font.out_ascii
@@ -0,0 +1,9 @@
+SX-FONT(1) General Commands Manual SX-FONT(1)
+
+NNAAMMEE
+ SSxx--ffoonntt - changing fonts inside the cross reference macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Sx/noarg.in b/regress/mdoc/Sx/noarg.in
new file mode 100644
index 00000000..35c4a64e
--- /dev/null
+++ b/regress/mdoc/Sx/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt SX-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sx-noarg
+.Nd internal cross reference without a target
+.Sh DESCRIPTION
+with target:
+.Sx DESCRIPTION
+no target:
+.Sx
+end of test document
diff --git a/regress/mdoc/Sx/noarg.out_ascii b/regress/mdoc/Sx/noarg.out_ascii
new file mode 100644
index 00000000..343ab007
--- /dev/null
+++ b/regress/mdoc/Sx/noarg.out_ascii
@@ -0,0 +1,9 @@
+SX-NOARG(1) General Commands Manual SX-NOARG(1)
+
+NNAAMMEE
+ SSxx--nnooaarrgg - internal cross reference without a target
+
+DDEESSCCRRIIPPTTIIOONN
+ with target: _D_E_S_C_R_I_P_T_I_O_N no target: end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Sx/noarg.out_lint b/regress/mdoc/Sx/noarg.out_lint
new file mode 100644
index 00000000..3bdfa389
--- /dev/null
+++ b/regress/mdoc/Sx/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Sx
diff --git a/regress/mdoc/Sy/Makefile b/regress/mdoc/Sy/Makefile
new file mode 100644
index 00000000..36c1859b
--- /dev/null
+++ b/regress/mdoc/Sy/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.5 2014/11/17 06:44:35 schwarze Exp $
+
+REGRESS_TARGETS = noarg font punct
+LINT_TARGETS = noarg punct
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sy/font.in b/regress/mdoc/Sy/font.in
new file mode 100644
index 00000000..3a7bbb06
--- /dev/null
+++ b/regress/mdoc/Sy/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt SY-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sy-font
+.Nd changing fonts inside the symbolic font macro
+.Sh DESCRIPTION
+normal text
+.Sy bold\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Sy/font.out_ascii b/regress/mdoc/Sy/font.out_ascii
new file mode 100644
index 00000000..b512ef42
--- /dev/null
+++ b/regress/mdoc/Sy/font.out_ascii
@@ -0,0 +1,9 @@
+SY-FONT(1) General Commands Manual SY-FONT(1)
+
+NNAAMMEE
+ SSyy--ffoonntt - changing fonts inside the symbolic font macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Sy/noarg.in b/regress/mdoc/Sy/noarg.in
new file mode 100644
index 00000000..03b36675
--- /dev/null
+++ b/regress/mdoc/Sy/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt SY-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sy-noarg
+.Nd symbolic macro without arguments
+.Sh DESCRIPTION
+with argument
+.Sy arg
+no argument
+.Sy
+end of test document
diff --git a/regress/mdoc/Sy/noarg.out_ascii b/regress/mdoc/Sy/noarg.out_ascii
new file mode 100644
index 00000000..53a9f275
--- /dev/null
+++ b/regress/mdoc/Sy/noarg.out_ascii
@@ -0,0 +1,9 @@
+SY-NOARG(1) General Commands Manual SY-NOARG(1)
+
+NNAAMMEE
+ SSyy--nnooaarrgg - symbolic macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ with argument aarrgg no argument end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Sy/noarg.out_lint b/regress/mdoc/Sy/noarg.out_lint
new file mode 100644
index 00000000..de7bf597
--- /dev/null
+++ b/regress/mdoc/Sy/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Sy
diff --git a/regress/mdoc/Sy/punct.in b/regress/mdoc/Sy/punct.in
new file mode 100644
index 00000000..4f51886b
--- /dev/null
+++ b/regress/mdoc/Sy/punct.in
@@ -0,0 +1,82 @@
+.Dd November 17, 2014
+.Dt SY-PUNCT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Sy-punct
+.Nd punctuation following a symbolic macro
+.Sh DESCRIPTION
+Leading punctuation:
+.Sy ( b
+.Sy [ b
+.Sy | b
+.Sy . b
+.Sy , b
+.Sy ; b
+.Sy : b
+.Sy ? b
+.Sy ! b
+.Sy ) b
+.Sy ] b
+.Pp
+Trailing punctuation:
+.Sy a (
+.Sy a [
+.Sy a |
+.Sy a .
+.Sy a ,
+.Sy a ;
+.Sy a :
+.Sy a ?
+.Sy a !
+.Sy a )
+.Sy a ]
+.Pp
+Middle punctuation:
+.Sy a ( b
+.Sy a [ b
+.Sy a | b
+.Sy a . b
+.Sy a , b
+.Sy a ; b
+.Sy a : b
+.Sy a ? b
+.Sy a ! b
+.Sy a ) b
+.Sy a ] b
+.Pp
+Isolated punctuation:
+.Sy a Sy ( Sy b
+.Sy a Sy [ Sy b
+.Sy a Sy | Sy b
+.Sy a Sy . Sy b
+.Sy a Sy , Sy b
+.Sy a Sy ; Sy b
+.Sy a Sy : Sy b
+.Sy a Sy ? Sy b
+.Sy a Sy ! Sy b
+.Sy a Sy ) Sy b
+.Sy a Sy ] Sy b
+.Pp
+Isolated trailing punctuation:
+.Sy a Sy (
+.Sy a Sy [
+.Sy a Sy |
+.Sy a Sy .
+.Sy a Sy ,
+.Sy a Sy ;
+.Sy a Sy :
+.Sy a Sy ?
+.Sy a Sy !
+.Sy a Sy )
+.Sy a Sy ]
+.Pp
+Multiple isolated punctuation:
+.Sy a Sy ( [ Sy b
+.Sy a Sy ) ] Sy b
+.Pp
+Multiple punctuation:
+.Sy [ ( arg ) ] .
+.Pp
+Quoted:
+.Sy "a . b Nm"
+.Sy ". b Nm"
diff --git a/regress/mdoc/Sy/punct.out_ascii b/regress/mdoc/Sy/punct.out_ascii
new file mode 100644
index 00000000..39bed0ba
--- /dev/null
+++ b/regress/mdoc/Sy/punct.out_ascii
@@ -0,0 +1,26 @@
+SY-PUNCT(1) General Commands Manual SY-PUNCT(1)
+
+NNAAMMEE
+ SSyy--ppuunncctt - punctuation following a symbolic macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Leading punctuation: (bb [bb | bb . bb , bb ; bb : bb ? bb ! bb ) bb ] bb
+
+ Trailing punctuation: aa ( aa [ aa | aa. aa, aa; aa: aa? aa! aa) aa]
+
+ Middle punctuation: aa (bb aa [bb aa | bb aa. bb aa, bb aa; bb aa: bb aa? bb aa! bb aa) bb aa]
+ bb
+
+ Isolated punctuation: aa (bb aa [bb aa | bb aa . bb aa , bb aa ; bb aa : bb aa ? bb aa ! bb
+ aa ) bb aa ] bb
+
+ Isolated trailing punctuation: aa ( aa [ aa | aa . aa , aa ; aa : aa ? aa ! aa )
+ aa ]
+
+ Multiple isolated punctuation: aa ([bb aa )] bb
+
+ Multiple punctuation: [(aarrgg)].
+
+ Quoted: aa .. bb NNmm .. bb NNmm
+
+OpenBSD November 17, 2014 OpenBSD
diff --git a/regress/mdoc/Sy/punct.out_lint b/regress/mdoc/Sy/punct.out_lint
new file mode 100644
index 00000000..0073a308
--- /dev/null
+++ b/regress/mdoc/Sy/punct.out_lint
@@ -0,0 +1,24 @@
+mandoc: punct.in:48:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:49:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:50:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:51:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:52:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:53:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:54:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:55:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:56:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:57:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:58:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:61:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:62:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:63:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:64:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:65:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:66:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:67:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:68:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:69:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:70:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:71:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:74:7: WARNING: skipping empty macro: Sy
+mandoc: punct.in:75:7: WARNING: skipping empty macro: Sy
diff --git a/regress/mdoc/Tn/Makefile b/regress/mdoc/Tn/Makefile
new file mode 100644
index 00000000..1be2a84a
--- /dev/null
+++ b/regress/mdoc/Tn/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = noarg font
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Tn/font.in b/regress/mdoc/Tn/font.in
new file mode 100644
index 00000000..c854c6de
--- /dev/null
+++ b/regress/mdoc/Tn/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt TN-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Tn-font
+.Nd changing fonts inside the trade name macro
+.Sh DESCRIPTION
+normal text
+.Tn literal\\fIemphasis\\fPback
+trailing text
diff --git a/regress/mdoc/Tn/font.out_ascii b/regress/mdoc/Tn/font.out_ascii
new file mode 100644
index 00000000..60a99b3e
--- /dev/null
+++ b/regress/mdoc/Tn/font.out_ascii
@@ -0,0 +1,9 @@
+TN-FONT(1) General Commands Manual TN-FONT(1)
+
+NNAAMMEE
+ TTnn--ffoonntt - changing fonts inside the trade name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text literal_e_m_p_h_a_s_i_sback trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Tn/noarg.in b/regress/mdoc/Tn/noarg.in
new file mode 100644
index 00000000..1d18a95b
--- /dev/null
+++ b/regress/mdoc/Tn/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 19, 2011
+.Dt TN-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Tn-noarg
+.Nd trade name macro without argument
+.Sh DESCRIPTION
+with argument
+.Tn IBM
+no argument
+.Tn
+end of test document
diff --git a/regress/mdoc/Tn/noarg.out_ascii b/regress/mdoc/Tn/noarg.out_ascii
new file mode 100644
index 00000000..1333a900
--- /dev/null
+++ b/regress/mdoc/Tn/noarg.out_ascii
@@ -0,0 +1,9 @@
+TN-NOARG(1) General Commands Manual TN-NOARG(1)
+
+NNAAMMEE
+ TTnn--nnooaarrgg - trade name macro without argument
+
+DDEESSCCRRIIPPTTIIOONN
+ with argument IBM no argument end of test document
+
+OpenBSD January 19, 2011 OpenBSD
diff --git a/regress/mdoc/Tn/noarg.out_lint b/regress/mdoc/Tn/noarg.out_lint
new file mode 100644
index 00000000..74e0b6fc
--- /dev/null
+++ b/regress/mdoc/Tn/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Tn
diff --git a/regress/mdoc/Ud/Makefile b/regress/mdoc/Ud/Makefile
new file mode 100644
index 00000000..9bc871ee
--- /dev/null
+++ b/regress/mdoc/Ud/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2017/01/11 17:39:45 schwarze Exp $
+
+REGRESS_TARGETS = arg
+LINT_TARGETS = arg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ud/arg.in b/regress/mdoc/Ud/arg.in
new file mode 100644
index 00000000..b5245a77
--- /dev/null
+++ b/regress/mdoc/Ud/arg.in
@@ -0,0 +1,19 @@
+.Dd January 11, 2017
+.Dt UD-ARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ud-arg
+.Nd obsolete text production macros
+.Sh DESCRIPTION
+The newest branch is
+.Ud
+The stable branch
+.Bt
+It will be released shortly.
+.Pp
+With arg:
+.Ud bar
+.Bt foo
+.Ud one two
+.Bt one two
+end
diff --git a/regress/mdoc/Ud/arg.out_ascii b/regress/mdoc/Ud/arg.out_ascii
new file mode 100644
index 00000000..ec9f73c7
--- /dev/null
+++ b/regress/mdoc/Ud/arg.out_ascii
@@ -0,0 +1,13 @@
+UD-ARG(1) General Commands Manual UD-ARG(1)
+
+NNAAMMEE
+ UUdd--aarrgg - obsolete text production macros
+
+DDEESSCCRRIIPPTTIIOONN
+ The newest branch is currently under development. The stable branch is
+ currently in beta test. It will be released shortly.
+
+ With arg: currently under development. is currently in beta test.
+ currently under development. is currently in beta test. end
+
+OpenBSD January 11, 2017 OpenBSD
diff --git a/regress/mdoc/Ud/arg.out_lint b/regress/mdoc/Ud/arg.out_lint
new file mode 100644
index 00000000..854845cd
--- /dev/null
+++ b/regress/mdoc/Ud/arg.out_lint
@@ -0,0 +1,4 @@
+mandoc: arg.in:15:2: ERROR: skipping all arguments: Ud bar
+mandoc: arg.in:16:2: ERROR: skipping all arguments: Bt foo
+mandoc: arg.in:17:2: ERROR: skipping all arguments: Ud one
+mandoc: arg.in:18:2: ERROR: skipping all arguments: Bt one
diff --git a/regress/mdoc/Ux/Makefile b/regress/mdoc/Ux/Makefile
new file mode 100644
index 00000000..c945b5e6
--- /dev/null
+++ b/regress/mdoc/Ux/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2013/12/22 14:06:29 schwarze Exp $
+
+REGRESS_TARGETS = spacing eos
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ux/eos.in b/regress/mdoc/Ux/eos.in
new file mode 100644
index 00000000..b0713481
--- /dev/null
+++ b/regress/mdoc/Ux/eos.in
@@ -0,0 +1,22 @@
+.Dd December 22, 2013
+.Dt UX-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ux-eos
+.Nd end of sentence spacing after Unix macros
+.Sh DESCRIPTION
+In the beginning Ken and Dennis wrote
+.Ux .
+The CSRG rewrote it to become
+.Bx .
+When it dissolved, people started
+.Bsx .
+And
+.Nx .
+And
+.Fx .
+And
+.Ox .
+And
+.Dx .
+By now, it's free for everyone.
diff --git a/regress/mdoc/Ux/eos.out_ascii b/regress/mdoc/Ux/eos.out_ascii
new file mode 100644
index 00000000..16e05df9
--- /dev/null
+++ b/regress/mdoc/Ux/eos.out_ascii
@@ -0,0 +1,11 @@
+UX-EOS(1) General Commands Manual UX-EOS(1)
+
+NNAAMMEE
+ UUxx--eeooss - end of sentence spacing after Unix macros
+
+DDEESSCCRRIIPPTTIIOONN
+ In the beginning Ken and Dennis wrote UNIX. The CSRG rewrote it to
+ become BSD. When it dissolved, people started BSD/OS. And NetBSD. And
+ FreeBSD. And OpenBSD. And DragonFly. By now, it's free for everyone.
+
+OpenBSD December 22, 2013 OpenBSD
diff --git a/regress/mdoc/Ux/spacing.in b/regress/mdoc/Ux/spacing.in
new file mode 100644
index 00000000..e78ada3c
--- /dev/null
+++ b/regress/mdoc/Ux/spacing.in
@@ -0,0 +1,20 @@
+.Dd October 20, 2011
+.Dt UX-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ux-spacing
+.Nd spacing around the Unix macro
+.Sh DESCRIPTION
+The
+.Ux
+family of operating systems, including
+.Nx ,
+.Ox ,
+.Fx ,
+.Dx
+and
+.Bsx .
+The system is
+.Ud
+The system
+.Bt
diff --git a/regress/mdoc/Ux/spacing.out_ascii b/regress/mdoc/Ux/spacing.out_ascii
new file mode 100644
index 00000000..be5050c3
--- /dev/null
+++ b/regress/mdoc/Ux/spacing.out_ascii
@@ -0,0 +1,11 @@
+UX-SPACING(1) General Commands Manual UX-SPACING(1)
+
+NNAAMMEE
+ UUxx--ssppaacciinngg - spacing around the Unix macro
+
+DDEESSCCRRIIPPTTIIOONN
+ The UNIX family of operating systems, including NetBSD, OpenBSD, FreeBSD,
+ DragonFly and BSD/OS. The system is currently under development. The
+ system is currently in beta test.
+
+OpenBSD October 20, 2011 OpenBSD
diff --git a/regress/mdoc/Va/Makefile b/regress/mdoc/Va/Makefile
new file mode 100644
index 00000000..3d426934
--- /dev/null
+++ b/regress/mdoc/Va/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2014/07/02 20:18:42 schwarze Exp $
+
+REGRESS_TARGETS = basic font noarg
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Va/basic.in b/regress/mdoc/Va/basic.in
new file mode 100644
index 00000000..5ce4718a
--- /dev/null
+++ b/regress/mdoc/Va/basic.in
@@ -0,0 +1,14 @@
+.Dd July 8, 2012
+.Dt VA-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm Va-basic
+.Nd basic usage of the variable name macro
+.Sh DESCRIPTION
+Both
+.Vt char *
+.Va malloc_options
+and
+.Vt int
+.Va errno
+are typical examples of global variables.
diff --git a/regress/mdoc/Va/basic.out_ascii b/regress/mdoc/Va/basic.out_ascii
new file mode 100644
index 00000000..a599804a
--- /dev/null
+++ b/regress/mdoc/Va/basic.out_ascii
@@ -0,0 +1,10 @@
+VA-BASIC(1) General Commands Manual VA-BASIC(1)
+
+NNAAMMEE
+ VVaa--bbaassiicc - basic usage of the variable name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Both _c_h_a_r _* _m_a_l_l_o_c___o_p_t_i_o_n_s and _i_n_t _e_r_r_n_o are typical examples of global
+ variables.
+
+OpenBSD July 8, 2012 OpenBSD
diff --git a/regress/mdoc/Va/font.in b/regress/mdoc/Va/font.in
new file mode 100644
index 00000000..654ee281
--- /dev/null
+++ b/regress/mdoc/Va/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt VA-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Va-font
+.Nd changing fonts inside the variable name macro
+.Sh DESCRIPTION
+normal text
+.Va emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Va/font.out_ascii b/regress/mdoc/Va/font.out_ascii
new file mode 100644
index 00000000..d7e5af1d
--- /dev/null
+++ b/regress/mdoc/Va/font.out_ascii
@@ -0,0 +1,9 @@
+VA-FONT(1) General Commands Manual VA-FONT(1)
+
+NNAAMMEE
+ VVaa--ffoonntt - changing fonts inside the variable name macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Va/noarg.in b/regress/mdoc/Va/noarg.in
new file mode 100644
index 00000000..f5fadad6
--- /dev/null
+++ b/regress/mdoc/Va/noarg.in
@@ -0,0 +1,13 @@
+.Dd January 20, 2011
+.Dt VA-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Va-noarg
+.Nd variable name macro without arguments
+.Sh DESCRIPTION
+with arguments
+.Vt int
+.Va errno
+no arguments
+.Va
+end of test document
diff --git a/regress/mdoc/Va/noarg.out_ascii b/regress/mdoc/Va/noarg.out_ascii
new file mode 100644
index 00000000..e7bec8c2
--- /dev/null
+++ b/regress/mdoc/Va/noarg.out_ascii
@@ -0,0 +1,9 @@
+VA-NOARG(1) General Commands Manual VA-NOARG(1)
+
+NNAAMMEE
+ VVaa--nnooaarrgg - variable name macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ with arguments _i_n_t _e_r_r_n_o no arguments end of test document
+
+OpenBSD January 20, 2011 OpenBSD
diff --git a/regress/mdoc/Va/noarg.out_lint b/regress/mdoc/Va/noarg.out_lint
new file mode 100644
index 00000000..7d24e446
--- /dev/null
+++ b/regress/mdoc/Va/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:12:2: WARNING: skipping empty macro: Va
diff --git a/regress/mdoc/Vt/Makefile b/regress/mdoc/Vt/Makefile
new file mode 100644
index 00000000..d1f0a9bd
--- /dev/null
+++ b/regress/mdoc/Vt/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.7 2015/09/14 15:35:47 schwarze Exp $
+
+REGRESS_TARGETS = noarg spacing font child
+LINT_TARGETS = noarg
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Vt/child.in b/regress/mdoc/Vt/child.in
new file mode 100644
index 00000000..a35aa674
--- /dev/null
+++ b/regress/mdoc/Vt/child.in
@@ -0,0 +1,15 @@
+.Dd July 2, 2014
+.Dt VT-CHILD 1
+.Os OpenBSD
+.Sh NAME
+.Nm Vt-child
+.Nd the variable type macro does not want children
+.Sh SYNOPSIS
+.Vt extern Sy int Li errno
+.Sh DESCRIPTION
+various types, for example
+.Vt unsigned Sy int ,
+.Vt long Li int
+and
+.Vt float ,
+.Vt double
diff --git a/regress/mdoc/Vt/child.out_ascii b/regress/mdoc/Vt/child.out_ascii
new file mode 100644
index 00000000..500c0e80
--- /dev/null
+++ b/regress/mdoc/Vt/child.out_ascii
@@ -0,0 +1,12 @@
+VT-CHILD(1) General Commands Manual VT-CHILD(1)
+
+NNAAMMEE
+ VVtt--cchhiilldd - the variable type macro does not want children
+
+SSYYNNOOPPSSIISS
+ _e_x_t_e_r_n iinntt errno
+
+DDEESSCCRRIIPPTTIIOONN
+ various types, for example _u_n_s_i_g_n_e_d iinntt, _l_o_n_g int and _f_l_o_a_t, _d_o_u_b_l_e
+
+OpenBSD July 2, 2014 OpenBSD
diff --git a/regress/mdoc/Vt/font.in b/regress/mdoc/Vt/font.in
new file mode 100644
index 00000000..c90692ef
--- /dev/null
+++ b/regress/mdoc/Vt/font.in
@@ -0,0 +1,10 @@
+.Dd July 9, 2012
+.Dt VT-FONT 1
+.Os OpenBSD
+.Sh NAME
+.Nm Vt-font
+.Nd changing fonts inside the variable type macro
+.Sh DESCRIPTION
+normal text
+.Vt emphasis\\fBbold\\fPback
+trailing text
diff --git a/regress/mdoc/Vt/font.out_ascii b/regress/mdoc/Vt/font.out_ascii
new file mode 100644
index 00000000..bbc703a0
--- /dev/null
+++ b/regress/mdoc/Vt/font.out_ascii
@@ -0,0 +1,9 @@
+VT-FONT(1) General Commands Manual VT-FONT(1)
+
+NNAAMMEE
+ VVtt--ffoonntt - changing fonts inside the variable type macro
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k trailing text
+
+OpenBSD July 9, 2012 OpenBSD
diff --git a/regress/mdoc/Vt/noarg.in b/regress/mdoc/Vt/noarg.in
new file mode 100644
index 00000000..929dc05c
--- /dev/null
+++ b/regress/mdoc/Vt/noarg.in
@@ -0,0 +1,12 @@
+.Dd January 20, 2011
+.Dt VT-NOARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm Vt-noarg
+.Nd variable type macro without arguments
+.Sh DESCRIPTION
+with arguments
+.Vt signed int
+no arguments
+.Vt
+end of test document
diff --git a/regress/mdoc/Vt/noarg.out_ascii b/regress/mdoc/Vt/noarg.out_ascii
new file mode 100644
index 00000000..04ca18dd
--- /dev/null
+++ b/regress/mdoc/Vt/noarg.out_ascii
@@ -0,0 +1,9 @@
+VT-NOARG(1) General Commands Manual VT-NOARG(1)
+
+NNAAMMEE
+ VVtt--nnooaarrgg - variable type macro without arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ with arguments _s_i_g_n_e_d _i_n_t no arguments end of test document
+
+OpenBSD January 20, 2011 OpenBSD
diff --git a/regress/mdoc/Vt/noarg.out_lint b/regress/mdoc/Vt/noarg.out_lint
new file mode 100644
index 00000000..4834a82a
--- /dev/null
+++ b/regress/mdoc/Vt/noarg.out_lint
@@ -0,0 +1 @@
+mandoc: noarg.in:11:2: WARNING: skipping empty macro: Vt
diff --git a/regress/mdoc/Vt/spacing.in b/regress/mdoc/Vt/spacing.in
new file mode 100644
index 00000000..afb4c70e
--- /dev/null
+++ b/regress/mdoc/Vt/spacing.in
@@ -0,0 +1,16 @@
+.Dd July 8, 2012
+.Dt VT-SPACING 1
+.Os OpenBSD
+.Sh NAME
+.Nm Vt-spacing
+.Nd spacing around the variable type macro
+.Sh SYNOPSIS
+.Vt extern char **environ
+.Vt extern int errno
+.Sh DESCRIPTION
+various types, for example
+.Vt unsigned int ,
+.Vt long int
+and
+.Vt float ,
+.Vt double
diff --git a/regress/mdoc/Vt/spacing.out_ascii b/regress/mdoc/Vt/spacing.out_ascii
new file mode 100644
index 00000000..bb5e8441
--- /dev/null
+++ b/regress/mdoc/Vt/spacing.out_ascii
@@ -0,0 +1,13 @@
+VT-SPACING(1) General Commands Manual VT-SPACING(1)
+
+NNAAMMEE
+ VVtt--ssppaacciinngg - spacing around the variable type macro
+
+SSYYNNOOPPSSIISS
+ _e_x_t_e_r_n _c_h_a_r _*_*_e_n_v_i_r_o_n
+ _e_x_t_e_r_n _i_n_t _e_r_r_n_o
+
+DDEESSCCRRIIPPTTIIOONN
+ various types, for example _u_n_s_i_g_n_e_d _i_n_t, _l_o_n_g _i_n_t and _f_l_o_a_t, _d_o_u_b_l_e
+
+OpenBSD July 8, 2012 OpenBSD
diff --git a/regress/mdoc/Xr/Makefile b/regress/mdoc/Xr/Makefile
new file mode 100644
index 00000000..98887f84
--- /dev/null
+++ b/regress/mdoc/Xr/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.4 2015/02/06 01:07:07 schwarze Exp $
+
+REGRESS_TARGETS = args
+LINT_TARGETS = args
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Xr/args.in b/regress/mdoc/Xr/args.in
new file mode 100644
index 00000000..97e68202
--- /dev/null
+++ b/regress/mdoc/Xr/args.in
@@ -0,0 +1,27 @@
+.Dd December 3, 2011
+.Dt XR-ARGS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Xr-args
+.Nd additional arguments to cross references
+.Sh DESCRIPTION
+One single
+.Xr echo 1
+is fine, and so is an
+.Xr echo 1 followed by something else.
+.Pp
+But listen for multiple
+.Xr echo 1 Ns s .
+.Pp
+A call, an
+.Xr echo 1 , and
+another
+.Xr echo 1 .
+.Pp
+Finally, half an
+.Xr echo ,
+no echo
+.Xr ,
+and no
+.Xr
+echo at all.
diff --git a/regress/mdoc/Xr/args.out_ascii b/regress/mdoc/Xr/args.out_ascii
new file mode 100644
index 00000000..81fe8784
--- /dev/null
+++ b/regress/mdoc/Xr/args.out_ascii
@@ -0,0 +1,16 @@
+XR-ARGS(1) General Commands Manual XR-ARGS(1)
+
+NNAAMMEE
+ XXrr--aarrggss - additional arguments to cross references
+
+DDEESSCCRRIIPPTTIIOONN
+ One single echo(1) is fine, and so is an echo(1) followed by something
+ else.
+
+ But listen for multiple echo(1)s.
+
+ A call, an echo(1), and another echo(1).
+
+ Finally, half an echo, no echo and no echo at all.
+
+OpenBSD December 3, 2011 OpenBSD
diff --git a/regress/mdoc/Xr/args.out_lint b/regress/mdoc/Xr/args.out_lint
new file mode 100644
index 00000000..8ade7488
--- /dev/null
+++ b/regress/mdoc/Xr/args.out_lint
@@ -0,0 +1,3 @@
+mandoc: args.in:24:2: WARNING: skipping empty macro: Xr
+mandoc: args.in:26:2: WARNING: skipping empty macro: Xr
+mandoc: args.in:22:2: WARNING: missing section argument: Xr echo
diff --git a/regress/mdoc/blank/Makefile b/regress/mdoc/blank/Makefile
new file mode 100644
index 00000000..e51424c9
--- /dev/null
+++ b/regress/mdoc/blank/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.5 2014/07/06 19:08:57 schwarze Exp $
+
+REGRESS_TARGETS = line comment list
+LINT_TARGETS = line comment list
+
+SKIP_TMAN = list
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/blank/comment.in b/regress/mdoc/blank/comment.in
new file mode 100644
index 00000000..8b7b811f
--- /dev/null
+++ b/regress/mdoc/blank/comment.in
@@ -0,0 +1,15 @@
+.Dd February 17, 2010
+.Dt BLANK-COMMENT 1
+.Os OpenBSD
+.Sh NAME
+.Nm blank-comment
+.Nd normal and bogus comments
+.Sh DESCRIPTION
+normal comment
+.\" normal
+bogus comment
+\."
+end of text
+.Pp
+text \" comment
+text
diff --git a/regress/mdoc/blank/comment.out_ascii b/regress/mdoc/blank/comment.out_ascii
new file mode 100644
index 00000000..26fde80d
--- /dev/null
+++ b/regress/mdoc/blank/comment.out_ascii
@@ -0,0 +1,11 @@
+BLANK-COMMENT(1) General Commands Manual BLANK-COMMENT(1)
+
+NNAAMMEE
+ bbllaannkk--ccoommmmeenntt - normal and bogus comments
+
+DDEESSCCRRIIPPTTIIOONN
+ normal comment bogus comment end of text
+
+ text text
+
+OpenBSD February 17, 2010 OpenBSD
diff --git a/regress/mdoc/blank/comment.out_lint b/regress/mdoc/blank/comment.out_lint
new file mode 100644
index 00000000..f5599f67
--- /dev/null
+++ b/regress/mdoc/blank/comment.out_lint
@@ -0,0 +1 @@
+mandoc: comment.in:11:3: WARNING: bad comment style
diff --git a/regress/mdoc/blank/line.in b/regress/mdoc/blank/line.in
new file mode 100644
index 00000000..f1946c13
--- /dev/null
+++ b/regress/mdoc/blank/line.in
@@ -0,0 +1,90 @@
+.Dd February 17, 2010
+.Dt BLANK-LINE 1
+.Os OpenBSD
+.Sh NAME
+.Nm blank-line
+.Nd handling of blank line
+.Sh DESCRIPTION
+Single br:
+.br
+Single Pp:
+.Pp
+Single sp:
+.sp
+Single blank:
+
+Double br:
+.br
+.br
+br Pp:
+.br
+.Pp
+Pp br:
+.Pp
+.br
+Double Pp:
+.Pp
+.Pp
+br sp:
+.br
+.sp
+sp br:
+.sp
+.br
+Pp sp:
+.Pp
+.sp
+Pp sp 2v:
+.Pp
+.sp 2v
+sp Pp:
+.sp
+.Pp
+Double sp:
+.sp
+.sp
+br blank:
+.br
+
+blank br:
+
+.br
+Pp blank:
+.Pp
+
+blank Pp:
+
+.Pp
+sp blank:
+.sp
+
+blank sp:
+
+.sp
+Double blank:
+
+
+Bd ragged sp 2v:
+.Bd -ragged -offset 6n
+.sp 2v
+Ed sp 2v:
+.Ed
+.sp 2v
+Bl tag sp 2v:
+.Bl -tag -width 6n
+.It tag
+.sp 2v
+El sp 2v
+.El
+Sh sp 2v:
+.Sh CUSTOM
+.sp 2v
+Pp Sh Pp:
+.Pp
+.Sh CUSTOM TWO
+.Pp
+Ss Pp:
+.Ss Subsection
+.Pp
+End.
+.Pp
diff --git a/regress/mdoc/blank/line.out_ascii b/regress/mdoc/blank/line.out_ascii
new file mode 100644
index 00000000..7fde5795
--- /dev/null
+++ b/regress/mdoc/blank/line.out_ascii
@@ -0,0 +1,77 @@
+BLANK-LINE(1) General Commands Manual BLANK-LINE(1)
+
+NNAAMMEE
+ bbllaannkk--lliinnee - handling of blank line
+
+DDEESSCCRRIIPPTTIIOONN
+ Single br:
+ Single Pp:
+
+ Single sp:
+
+ Single blank:
+
+ Double br:
+ br Pp:
+
+ Pp br:
+
+ Double Pp:
+
+ br sp:
+
+ sp br:
+
+ Pp sp:
+
+ Pp sp 2v:
+
+ sp Pp:
+
+
+ Double sp:
+
+
+ br blank:
+
+ blank br:
+
+ Pp blank:
+
+ blank Pp:
+
+
+ sp blank:
+
+
+ blank sp:
+
+
+ Double blank:
+
+
+ Bd ragged sp 2v:
+
+
+
+ Ed sp 2v:
+
+
+ Bl tag sp 2v:
+
+ tag
+
+
+ El sp 2v
+ Sh sp 2v:
+
+CCUUSSTTOOMM
+ Pp Sh Pp:
+
+CCUUSSTTOOMM TTWWOO
+ Ss Pp:
+
+ SSuubbsseeccttiioonn
+ End.
+
+OpenBSD February 17, 2010 OpenBSD
diff --git a/regress/mdoc/blank/line.out_lint b/regress/mdoc/blank/line.out_lint
new file mode 100644
index 00000000..6e439442
--- /dev/null
+++ b/regress/mdoc/blank/line.out_lint
@@ -0,0 +1,23 @@
+mandoc: line.in:15:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:48:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:50:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:54:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:56:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:60:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:62:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:65:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:66:1: WARNING: blank line in fill mode, using .sp
+mandoc: line.in:18:2: WARNING: skipping paragraph macro: br after br
+mandoc: line.in:20:2: WARNING: skipping paragraph macro: br before Pp
+mandoc: line.in:24:2: WARNING: skipping paragraph macro: br after Pp
+mandoc: line.in:26:2: WARNING: skipping paragraph macro: Pp before Pp
+mandoc: line.in:33:2: WARNING: skipping paragraph macro: br after sp
+mandoc: line.in:36:2: WARNING: skipping paragraph macro: sp after Pp
+mandoc: line.in:39:2: WARNING: skipping paragraph macro: sp after Pp
+mandoc: line.in:51:2: WARNING: skipping paragraph macro: br after sp
+mandoc: line.in:54:1: WARNING: skipping paragraph macro: sp after Pp
+mandoc: line.in:81:2: WARNING: skipping paragraph macro: sp after Sh
+mandoc: line.in:83:2: WARNING: skipping paragraph macro: Pp at the end of Sh
+mandoc: line.in:85:2: WARNING: skipping paragraph macro: Pp after Sh
+mandoc: line.in:88:2: WARNING: skipping paragraph macro: Pp after Ss
+mandoc: line.in:90:2: WARNING: skipping paragraph macro: Pp at the end of Ss
diff --git a/regress/mdoc/blank/list.in b/regress/mdoc/blank/list.in
new file mode 100644
index 00000000..067e3dcf
--- /dev/null
+++ b/regress/mdoc/blank/list.in
@@ -0,0 +1,66 @@
+.Dd July 17, 2012
+.Dt BLANK-LIST 1
+.Os OpenBSD
+.Sh NAME
+.Nm blank-list
+.Nd handling of blank lines in lists
+.Sh DESCRIPTION
+normal list:
+.Bl -item -offset indent
+.It
+first item
+.It
+second item
+.El
+list with paragraphs:
+.Bl -item -offset indent
+.It
+first item
+.Pp
+.It
+second item
+.Pp
+.El
+list with final paragraph:
+.Bl -item -offset indent
+.It
+item
+.El
+.Pp
+list with double paragraph:
+.Bl -item -offset indent
+.It
+item
+.Pp
+.El
+.Pp
+normal compact list:
+.Bl -item -compact -offset indent
+.It
+first item
+.It
+second item
+.El
+compact list with paragraphs:
+.Bl -item -compact -offset indent
+.It
+first item
+.Pp
+.It
+second item
+.Pp
+.El
+compact list with final paragraph:
+.Bl -item -compact -offset indent
+.It
+item
+.El
+.Pp
+compact list with double paragraph:
+.Bl -item -compact -offset indent
+.It
+item
+.Pp
+.El
+.Pp
+End.
diff --git a/regress/mdoc/blank/list.out_ascii b/regress/mdoc/blank/list.out_ascii
new file mode 100644
index 00000000..5f0eaa98
--- /dev/null
+++ b/regress/mdoc/blank/list.out_ascii
@@ -0,0 +1,42 @@
+BLANK-LIST(1) General Commands Manual BLANK-LIST(1)
+
+NNAAMMEE
+ bbllaannkk--lliisstt - handling of blank lines in lists
+
+DDEESSCCRRIIPPTTIIOONN
+ normal list:
+
+ first item
+
+ second item
+ list with paragraphs:
+
+ first item
+
+ second item
+
+ list with final paragraph:
+
+ item
+
+ list with double paragraph:
+
+ item
+
+ normal compact list:
+ first item
+ second item
+ compact list with paragraphs:
+ first item
+
+ second item
+
+ compact list with final paragraph:
+ item
+
+ compact list with double paragraph:
+ item
+
+ End.
+
+OpenBSD July 17, 2012 OpenBSD
diff --git a/regress/mdoc/blank/list.out_lint b/regress/mdoc/blank/list.out_lint
new file mode 100644
index 00000000..a90d91a4
--- /dev/null
+++ b/regress/mdoc/blank/list.out_lint
@@ -0,0 +1,7 @@
+mandoc: list.in:19:2: WARNING: skipping paragraph macro: Pp before It
+mandoc: list.in:22:2: WARNING: moving paragraph macro out of list: Pp
+mandoc: list.in:34:2: WARNING: moving paragraph macro out of list: Pp
+mandoc: list.in:34:2: WARNING: skipping paragraph macro: Pp before Pp
+mandoc: list.in:51:2: WARNING: moving paragraph macro out of list: Pp
+mandoc: list.in:63:2: WARNING: moving paragraph macro out of list: Pp
+mandoc: list.in:63:2: WARNING: skipping paragraph macro: Pp before Pp
diff --git a/regress/mdoc/break/Makefile b/regress/mdoc/break/Makefile
new file mode 100644
index 00000000..b4c3b219
--- /dev/null
+++ b/regress/mdoc/break/Makefile
@@ -0,0 +1,15 @@
+# $OpenBSD: Makefile,v 1.4 2016/08/20 17:58:09 schwarze Exp $
+
+REGRESS_TARGETS = brokenbreaker twice tail two notopen
+LINT_TARGETS = brokenbreaker twice tail two notopen
+
+# It's hard to keep stuff together in next-line scope.
+
+SKIP_TMAN = tail
+
+# groff-1.22.3 defect:
+# - non-matching enclosure end macro prints a closing delimiter
+
+SKIP_GROFF = brokenbreaker notopen
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/break/brokenbreaker.in b/regress/mdoc/break/brokenbreaker.in
new file mode 100644
index 00000000..b5a23f40
--- /dev/null
+++ b/regress/mdoc/break/brokenbreaker.in
@@ -0,0 +1,14 @@
+.Dd December 23, 2014
+.Dt BREAK-BROKENBREAKER 1
+.Os OpenBSD
+.Sh NAME
+.Nm break-brokenbreaker
+.Nd a broken block breaking another block
+.Sh DESCRIPTION
+.Po po
+.Ao ao pc
+.Pc
+.Bo bo pc
+.Pc ac
+.Ac bc
+.Bc
diff --git a/regress/mdoc/break/brokenbreaker.out_ascii b/regress/mdoc/break/brokenbreaker.out_ascii
new file mode 100644
index 00000000..1a8cd75a
--- /dev/null
+++ b/regress/mdoc/break/brokenbreaker.out_ascii
@@ -0,0 +1,9 @@
+BREAK-BROKENBREAKER(1) General Commands Manual BREAK-BROKENBREAKER(1)
+
+NNAAMMEE
+ bbrreeaakk--bbrrookkeennbbrreeaakkeerr - a broken block breaking another block
+
+DDEESSCCRRIIPPTTIIOONN
+ (po <ao pc) [bo pc ac> bc]
+
+OpenBSD December 23, 2014 OpenBSD
diff --git a/regress/mdoc/break/brokenbreaker.out_lint b/regress/mdoc/break/brokenbreaker.out_lint
new file mode 100644
index 00000000..16e7a2ba
--- /dev/null
+++ b/regress/mdoc/break/brokenbreaker.out_lint
@@ -0,0 +1,3 @@
+mandoc: brokenbreaker.in:10:2: WARNING: blocks badly nested: Po breaks Ao
+mandoc: brokenbreaker.in:12:2: ERROR: skipping end of block that is not open: Pc
+mandoc: brokenbreaker.in:13:2: WARNING: blocks badly nested: Ao breaks Bo
diff --git a/regress/mdoc/break/notopen.in b/regress/mdoc/break/notopen.in
new file mode 100644
index 00000000..20a9bf12
--- /dev/null
+++ b/regress/mdoc/break/notopen.in
@@ -0,0 +1,12 @@
+.Dd August 20, 2016
+.Dt BREAK-NOTOPEN 1
+.Os OpenBSD
+.Sh NAME
+.Nm break-notopen
+.Nd mismatching end macro inside two open blocks
+.Sh DESCRIPTION
+.Ao ao
+.Bo bo pc
+.Pc bc
+.Bc ac
+.Ac tail
diff --git a/regress/mdoc/break/notopen.out_ascii b/regress/mdoc/break/notopen.out_ascii
new file mode 100644
index 00000000..db71cc41
--- /dev/null
+++ b/regress/mdoc/break/notopen.out_ascii
@@ -0,0 +1,9 @@
+BREAK-NOTOPEN(1) General Commands Manual BREAK-NOTOPEN(1)
+
+NNAAMMEE
+ bbrreeaakk--nnoottooppeenn - mismatching end macro inside two open blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ <ao [bo pc bc] ac> tail
+
+OpenBSD August 20, 2016 OpenBSD
diff --git a/regress/mdoc/break/notopen.out_lint b/regress/mdoc/break/notopen.out_lint
new file mode 100644
index 00000000..e70b2f6f
--- /dev/null
+++ b/regress/mdoc/break/notopen.out_lint
@@ -0,0 +1 @@
+mandoc: notopen.in:10:2: ERROR: skipping end of block that is not open: Pc
diff --git a/regress/mdoc/break/tail.in b/regress/mdoc/break/tail.in
new file mode 100644
index 00000000..ff250591
--- /dev/null
+++ b/regress/mdoc/break/tail.in
@@ -0,0 +1,37 @@
+.Dd April 5, 2015
+.Dt BREAK-TAIL 1
+.Os OpenBSD
+.Sh NAME
+.Nm break-tail
+.Nd tail arguments on broken blocks
+.Sh DESCRIPTION
+Broken by a partial explicit block:
+.Ao ao
+.Bo bo ac
+.Ac bc
+.Bc tail
+.Ao ao
+.Bo bo ac
+.Ac bc
+.Bc Po po pc
+.Pc tail
+.Pp
+Broken by a partial implicit block:
+.Aq aq Bo bo eol
+.Bc tail
+.Aq aq Bo bo eol
+.Bc Po po pc
+.Pc tail
+.Pp
+Broken by a full implicit block:
+.Bl -tag -width Ds -offset indent
+.It it Ao ao ac
+.Ac tail
+list body
+.El
+.Bl -tag -width Ds -offset indent
+.It it Ao ao ac
+.Ac Po po pc
+.Pc tail
+list body
+.El
diff --git a/regress/mdoc/break/tail.out_ascii b/regress/mdoc/break/tail.out_ascii
new file mode 100644
index 00000000..62675d29
--- /dev/null
+++ b/regress/mdoc/break/tail.out_ascii
@@ -0,0 +1,21 @@
+BREAK-TAIL(1) General Commands Manual BREAK-TAIL(1)
+
+NNAAMMEE
+ bbrreeaakk--ttaaiill - tail arguments on broken blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ Broken by a partial explicit block: <ao [bo ac> bc] tail <ao [bo ac> bc]
+ (po pc) tail
+
+ Broken by a partial implicit block: <aq [bo eol>] tail <aq [bo eol>] (po
+ pc) tail
+
+ Broken by a full implicit block:
+
+ it <ao ac> tail
+ list body
+
+ it <ao ac> (po pc) tail
+ list body
+
+OpenBSD April 5, 2015 OpenBSD
diff --git a/regress/mdoc/break/tail.out_lint b/regress/mdoc/break/tail.out_lint
new file mode 100644
index 00000000..d6f1b900
--- /dev/null
+++ b/regress/mdoc/break/tail.out_lint
@@ -0,0 +1,4 @@
+mandoc: tail.in:11:2: WARNING: blocks badly nested: Ao breaks Bo
+mandoc: tail.in:15:2: WARNING: blocks badly nested: Ao breaks Bo
+mandoc: tail.in:20:2: WARNING: blocks badly nested: Aq breaks Bo
+mandoc: tail.in:22:2: WARNING: blocks badly nested: Aq breaks Bo
diff --git a/regress/mdoc/break/twice.in b/regress/mdoc/break/twice.in
new file mode 100644
index 00000000..8853aec1
--- /dev/null
+++ b/regress/mdoc/break/twice.in
@@ -0,0 +1,32 @@
+.Dd February 12, 2015
+.Dt BREAK-TWICE 1
+.Os OpenBSD
+.Sh NAME
+.Nm break-twice
+.Nd breaking the same block twice
+.Sh DESCRIPTION
+Standard case, explicit:
+.Bo bo
+.Bro bro
+.Ao ao brc
+.Brc bc
+.Bc ac
+.Ac
+.Pp
+Standard case, implicit:
+.Bo bo
+.Bro bro
+.Aq aq brc Brc bc Bc eol
+.Pp
+Two of the same kind, explicit:
+.Bo bo
+.Bo bo
+.Ao ao bc
+.Bc bc
+.Bc ac
+.Ac
+.Pp
+Two of the same kind, implicit:
+.Bo bo
+.Bo bo
+.Aq aq bc Bc bc Bc eol
diff --git a/regress/mdoc/break/twice.out_ascii b/regress/mdoc/break/twice.out_ascii
new file mode 100644
index 00000000..c6d0149d
--- /dev/null
+++ b/regress/mdoc/break/twice.out_ascii
@@ -0,0 +1,15 @@
+BREAK-TWICE(1) General Commands Manual BREAK-TWICE(1)
+
+NNAAMMEE
+ bbrreeaakk--ttwwiiccee - breaking the same block twice
+
+DDEESSCCRRIIPPTTIIOONN
+ Standard case, explicit: [bo {bro <ao brc} bc] ac>
+
+ Standard case, implicit: [bo {bro <aq brc} bc] eol>
+
+ Two of the same kind, explicit: [bo [bo <ao bc] bc] ac>
+
+ Two of the same kind, implicit: [bo [bo <aq bc] bc] eol>
+
+OpenBSD February 12, 2015 OpenBSD
diff --git a/regress/mdoc/break/twice.out_lint b/regress/mdoc/break/twice.out_lint
new file mode 100644
index 00000000..6ac976c0
--- /dev/null
+++ b/regress/mdoc/break/twice.out_lint
@@ -0,0 +1,8 @@
+mandoc: twice.in:12:2: WARNING: blocks badly nested: Bro breaks Ao
+mandoc: twice.in:13:2: WARNING: blocks badly nested: Bo breaks Ao
+mandoc: twice.in:19:12: WARNING: blocks badly nested: Bro breaks Aq
+mandoc: twice.in:19:19: WARNING: blocks badly nested: Bo breaks Aq
+mandoc: twice.in:25:2: WARNING: blocks badly nested: Bo breaks Ao
+mandoc: twice.in:26:2: WARNING: blocks badly nested: Bo breaks Ao
+mandoc: twice.in:32:11: WARNING: blocks badly nested: Bo breaks Aq
+mandoc: twice.in:32:17: WARNING: blocks badly nested: Bo breaks Aq
diff --git a/regress/mdoc/break/two.in b/regress/mdoc/break/two.in
new file mode 100644
index 00000000..d3071699
--- /dev/null
+++ b/regress/mdoc/break/two.in
@@ -0,0 +1,42 @@
+.Dd February 12, 2015
+.Dt BREAK-TWO 1
+.Os OpenBSD
+.Sh NAME
+.Nm break-two
+.Nd the same block breaking two other blocks
+.Sh DESCRIPTION
+Standard case, explicit:
+.Ao ao
+.Bo bo
+.Bro bro ac
+.Ac brc
+.Brc bc
+.Bc
+.Pp
+Standard case, implicit:
+.Aq aq Bo bo Bro bro eol
+.Brc bc Bc
+.Pp
+Reverse closing, explicit:
+.Ao ao
+.Bo bo
+.Bro bro ac
+.Ac bc
+.Bc brc
+.Brc
+.Pp
+Reverse closing, implicit:
+.Aq aq Bo bo Bro bro eol
+.Bc brc Brc
+.Pp
+Two of the same kind, explicit:
+.Ao ao
+.Bo bo
+.Bo bo ac
+.Ac bc
+.Bc bc
+.Bc
+.Pp
+Two of the same kind, implicit:
+.Aq aq Bo bo Bo bo eol
+.Bc bc Bc
diff --git a/regress/mdoc/break/two.out_ascii b/regress/mdoc/break/two.out_ascii
new file mode 100644
index 00000000..e4db38c4
--- /dev/null
+++ b/regress/mdoc/break/two.out_ascii
@@ -0,0 +1,19 @@
+BREAK-TWO(1) General Commands Manual BREAK-TWO(1)
+
+NNAAMMEE
+ bbrreeaakk--ttwwoo - the same block breaking two other blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ Standard case, explicit: <ao [bo {bro ac> brc} bc]
+
+ Standard case, implicit: <aq [bo {bro eol>} bc]
+
+ Reverse closing, explicit: <ao [bo {bro ac> bc] brc}
+
+ Reverse closing, implicit: <aq [bo {bro eol>] brc}
+
+ Two of the same kind, explicit: <ao [bo [bo ac> bc] bc]
+
+ Two of the same kind, implicit: <aq [bo [bo eol>] bc]
+
+OpenBSD February 12, 2015 OpenBSD
diff --git a/regress/mdoc/break/two.out_lint b/regress/mdoc/break/two.out_lint
new file mode 100644
index 00000000..79346fe3
--- /dev/null
+++ b/regress/mdoc/break/two.out_lint
@@ -0,0 +1,8 @@
+mandoc: two.in:12:2: WARNING: blocks badly nested: Ao breaks Bro
+mandoc: two.in:17:2: WARNING: blocks badly nested: Aq breaks Bro
+mandoc: two.in:24:2: WARNING: blocks badly nested: Ao breaks Bro
+mandoc: two.in:25:2: WARNING: blocks badly nested: Bo breaks Bro
+mandoc: two.in:29:2: WARNING: blocks badly nested: Aq breaks Bro
+mandoc: two.in:30:2: WARNING: blocks badly nested: Bo breaks Bro
+mandoc: two.in:36:2: WARNING: blocks badly nested: Ao breaks Bo
+mandoc: two.in:41:2: WARNING: blocks badly nested: Aq breaks Bo
diff --git a/regress/regress.pl b/regress/regress.pl
new file mode 100755
index 00000000..65a3ecc5
--- /dev/null
+++ b/regress/regress.pl
@@ -0,0 +1,347 @@
+#!/usr/bin/env perl
+#
+# $Id: regress.pl,v 1.1 2017/02/08 03:02:13 schwarze Exp $
+#
+# Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+use warnings;
+use strict;
+
+# Used because open(3p) and open2(3p) provide no way for handling
+# STDERR of the child process, neither for appending it to STDOUT,
+# nor for piping it into the Perl program.
+use IPC::Open3 qw(open3);
+
+# --- utility functions ------------------------------------------------
+
+sub usage ($) {
+ warn shift;
+ print STDERR "usage: $0 [directory[:test] [modifier ...]]\n";
+ exit 1;
+}
+
+# Run a command and send STDOUT and STDERR to a file.
+# 1st argument: path to the output file
+# 2nd argument: command name
+# The remaining arguments are passed to the command.
+sub sysout ($@) {
+ my $outfile = shift;
+ local *OUT_FH;
+ open OUT_FH, '>', $outfile or die "$outfile: $!";
+ my $pid = open3 undef, ">&OUT_FH", undef, @_;
+ close OUT_FH;
+ waitpid $pid, 0;
+ return $? >> 8;
+}
+
+# Simlar, but filter the output as needed for the lint test.
+sub syslint ($@) {
+ my $outfile = shift;
+ open my $outfd, '>', $outfile or die "$outfile: $!";
+ my $infd;
+ my $pid = open3 undef, $infd, undef, @_;
+ while (<$infd>) {
+ s/^mandoc: [^:]+\//mandoc: /;
+ print $outfd $_;
+ }
+ close $outfd;
+ close $infd;
+ waitpid $pid, 0;
+ return 0;
+}
+
+# Simlar, but filter the output as needed for the html test.
+sub syshtml ($@) {
+ my $outfile = shift;
+ open my $outfd, '>', $outfile or die "$outfile: $!";
+ my $infd;
+ my $pid = open3 undef, $infd, undef, @_;
+ my $state;
+ while (<$infd>) {
+ chomp;
+ if (!$state && s/.*<math class="eqn">//) {
+ $state = 1;
+ next unless length;
+ }
+ $state = 1 if /^BEGINTEST/;
+ if ($state && s/<\/math>.*//) {
+ s/^ *//;
+ print $outfd "$_\n" if length;
+ undef $state;
+ next;
+ }
+ s/^ *//;
+ print $outfd "$_\n" if $state;
+ undef $state if /^ENDTEST/;
+ }
+ close $outfd;
+ close $infd;
+ waitpid $pid, 0;
+ return 0;
+}
+
+my @failures;
+sub fail ($$$) {
+ warn "FAILED: @_\n";
+ push @failures, [@_];
+}
+
+
+# --- process command line arguments -----------------------------------
+
+my ($subdir, $onlytest) = split ':', (shift // '.');
+my $displaylevel = 2;
+my %targets;
+for (@ARGV) {
+ if (/^[0123]$/) {
+ $displaylevel = int;
+ next;
+ }
+ /^(all|ascii|utf8|man|html|lint|clean|verbose)$/
+ or usage "$_: invalid modifier";
+ $targets{$_} = 1;
+}
+$targets{all} = 1
+ unless $targets{ascii} || $targets{utf8} || $targets{man} ||
+ $targets{html} || $targets{lint} || $targets{clean};
+$targets{ascii} = $targets{utf8} = $targets{man} = $targets{html} =
+ $targets{lint} = 1 if $targets{all};
+$displaylevel = 3 if $targets{verbose};
+
+
+# --- parse Makefiles --------------------------------------------------
+
+my %vars = (MOPTS => '');
+sub parse_makefile ($) {
+ my $filename = shift;
+ open my $fh, '<', $filename or die "$filename: $!";
+ while (<$fh>) {
+ chomp;
+ next unless /\S/;
+ last if /^# OpenBSD only/;
+ next if /^#/;
+ next if /^\.include/;
+ /^(\w+)\s*([?+]?)=\s*(.*)/
+ or die "$filename: parse error: $_";
+ my $var = $1;
+ my $opt = $2;
+ my $val = $3;
+ $val =~ s/\${(\w+)}/$vars{$1}/;
+ $val = "$vars{$var} $val" if $opt eq '+';
+ $vars{$var} = $val
+ unless $opt eq '?' && defined $vars{$var};
+ }
+ close $fh;
+}
+
+if ($subdir eq '.') {
+ $vars{SUBDIR} = 'roff char mdoc man tbl eqn';
+} else {
+ parse_makefile "$subdir/Makefile";
+ parse_makefile "$subdir/../Makefile.inc"
+ if -e "$subdir/../Makefile.inc";
+}
+
+my @mandoc = '../mandoc';
+my @subdir_names;
+my (@regress_testnames, @utf8_testnames, @html_testnames, @lint_testnames);
+my (%skip_ascii, %skip_man);
+
+push @mandoc, split ' ', $vars{MOPTS} if $vars{MOPTS};
+delete $vars{MOPTS};
+delete $vars{SKIP_GROFF};
+delete $vars{SKIP_GROFF_ASCII};
+delete $vars{TBL};
+delete $vars{EQN};
+if (defined $vars{SUBDIR}) {
+ @subdir_names = split ' ', $vars{SUBDIR};
+ delete $vars{SUBDIR};
+}
+if (defined $vars{REGRESS_TARGETS}) {
+ @regress_testnames = split ' ', $vars{REGRESS_TARGETS};
+ delete $vars{REGRESS_TARGETS};
+}
+if (defined $vars{UTF8_TARGETS}) {
+ @utf8_testnames = split ' ', $vars{UTF8_TARGETS};
+ delete $vars{UTF8_TARGETS};
+}
+if (defined $vars{HTML_TARGETS}) {
+ @html_testnames = split ' ', $vars{HTML_TARGETS};
+ delete $vars{HTML_TARGETS};
+}
+if (defined $vars{LINT_TARGETS}) {
+ @lint_testnames = split ' ', $vars{LINT_TARGETS};
+ delete $vars{LINT_TARGETS};
+}
+if (defined $vars{SKIP_ASCII}) {
+ for (split ' ', $vars{SKIP_ASCII}) {
+ $skip_ascii{$_} = 1;
+ $skip_man{$_} = 1;
+ }
+ delete $vars{SKIP_ASCII};
+}
+if (defined $vars{SKIP_TMAN}) {
+ $skip_man{$_} = 1 for split ' ', $vars{SKIP_TMAN};
+ delete $vars{SKIP_TMAN};
+}
+if (keys %vars) {
+ my @vars = keys %vars;
+ die "unknown var(s) @vars";
+}
+map { $skip_ascii{$_} = 1; } @regress_testnames if $skip_ascii{ALL};
+map { $skip_man{$_} = 1; } @regress_testnames if $skip_man{ALL};
+
+# --- run targets ------------------------------------------------------
+
+my $count_total = 0;
+for my $dirname (@subdir_names) {
+ $count_total++;
+ print "\n" if $targets{verbose};
+ system './regress.pl', "$subdir/$dirname", keys %targets,
+ ($displaylevel ? $displaylevel - 1 : 0),
+ and fail $subdir, $dirname, 'subdir';
+}
+
+my $count_ascii = 0;
+my $count_man = 0;
+for my $testname (@regress_testnames) {
+ next if $onlytest && $testname ne $onlytest;
+ my $i = "$subdir/$testname.in";
+ my $o = "$subdir/$testname.mandoc_ascii";
+ my $w = "$subdir/$testname.out_ascii";
+ if ($targets{ascii} && !$skip_ascii{$testname}) {
+ $count_ascii++;
+ $count_total++;
+ print "@mandoc -T ascii $i\n" if $targets{verbose};
+ sysout $o, @mandoc, qw(-T ascii), $i
+ and fail $subdir, $testname, 'ascii:mandoc';
+ system qw(diff -au), $w, $o
+ and fail $subdir, $testname, 'ascii:diff';
+ }
+ my $m = "$subdir/$testname.in_man";
+ my $mo = "$subdir/$testname.mandoc_man";
+ if ($targets{man} && !$skip_man{$testname}) {
+ $count_man++;
+ $count_total++;
+ print "@mandoc -T man $i\n" if $targets{verbose};
+ sysout $m, @mandoc, qw(-T man), $i
+ and fail $subdir, $testname, 'man:man';
+ print "@mandoc -man -T ascii $m\n" if $targets{verbose};
+ sysout $mo, @mandoc, qw(-man -T ascii -O mdoc), $m
+ and fail $subdir, $testname, 'man:mandoc';
+ system qw(diff -au), $w, $mo
+ and fail $subdir, $testname, 'man:diff';
+ }
+ if ($targets{clean}) {
+ print "rm $o\n"
+ if $targets{verbose} && !$skip_ascii{$testname};
+ unlink $o;
+ print "rm $m $mo\n"
+ if $targets{verbose} && !$skip_man{$testname};
+ unlink $m, $mo;
+ }
+}
+
+my $count_utf8 = 0;
+for my $testname (@utf8_testnames) {
+ next if $onlytest && $testname ne $onlytest;
+ my $i = "$subdir/$testname.in";
+ my $o = "$subdir/$testname.mandoc_utf8";
+ my $w = "$subdir/$testname.out_utf8";
+ if ($targets{utf8}) {
+ $count_utf8++;
+ $count_total++;
+ print "@mandoc -T utf8 $i\n" if $targets{verbose};
+ sysout $o, @mandoc, qw(-T utf8), $i
+ and fail $subdir, $testname, 'utf8:mandoc';
+ system qw(diff -au), $w, $o
+ and fail $subdir, $testname, 'utf8:diff';
+ }
+ if ($targets{clean}) {
+ print "rm $o\n" if $targets{verbose};
+ unlink $o;
+ }
+}
+
+my $count_html = 0;
+for my $testname (@html_testnames) {
+ next if $onlytest && $testname ne $onlytest;
+ my $i = "$subdir/$testname.in";
+ my $o = "$subdir/$testname.mandoc_html";
+ my $w = "$subdir/$testname.out_html";
+ if ($targets{html}) {
+ $count_html++;
+ $count_total++;
+ print "@mandoc -T html $i\n" if $targets{verbose};
+ syshtml $o, @mandoc, qw(-T html), $i
+ and fail $subdir, $testname, 'html:mandoc';
+ system qw(diff -au), $w, $o
+ and fail $subdir, $testname, 'html:diff';
+ }
+ if ($targets{clean}) {
+ print "rm $o\n" if $targets{verbose};
+ unlink $o;
+ }
+}
+
+my $count_lint = 0;
+for my $testname (@lint_testnames) {
+ next if $onlytest && $testname ne $onlytest;
+ my $i = "$subdir/$testname.in";
+ my $o = "$subdir/$testname.mandoc_lint";
+ my $w = "$subdir/$testname.out_lint";
+ if ($targets{lint}) {
+ $count_lint++;
+ $count_total++;
+ print "@mandoc -T lint $i\n" if $targets{verbose};
+ syslint $o, @mandoc, qw(-T lint), $i
+ and fail $subdir, $testname, 'lint:mandoc';
+ system qw(diff -au), $w, $o
+ and fail $subdir, $testname, 'lint:diff';
+ }
+ if ($targets{clean}) {
+ print "rm $o\n" if $targets{verbose};
+ unlink $o;
+ }
+}
+
+exit 0 unless $displaylevel or @failures;
+
+print "\n" if $targets{verbose};
+if ($onlytest) {
+ print "test $subdir:$onlytest finished";
+} else {
+ print "testsuite $subdir finished";
+}
+print ' ', (scalar @subdir_names), ' subdirectories' if @subdir_names;
+print " $count_ascii ascii" if $count_ascii;
+print " $count_man man" if $count_man;
+print " $count_utf8 utf8" if $count_utf8;
+print " $count_html html" if $count_html;
+print " $count_lint lint" if $count_lint;
+
+if (@failures) {
+ print " (FAIL)\n\nSOME TESTS FAILED:\n\n";
+ print "@$_\n" for @failures;
+ print "\n";
+ exit 1;
+} elsif ($count_total == 1) {
+ print " (OK)\n";
+} elsif ($count_total) {
+ print " (all $count_total tests OK)\n";
+} else {
+ print " (no tests run)\n";
+}
+exit 0;
diff --git a/regress/regress.pl.1 b/regress/regress.pl.1
new file mode 100644
index 00000000..6feebd16
--- /dev/null
+++ b/regress/regress.pl.1
@@ -0,0 +1,189 @@
+.\" $Id: regress.pl.1,v 1.1 2017/02/08 03:02:13 schwarze Exp $
+.\"
+.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: February 8 2017 $
+.Dt REGRESS.PL 1
+.Os
+.Sh NAME
+.Nm regress.pl
+.Nd portable steering script for mandoc regression tests
+.Sh SYNOPSIS
+.Nm ./regress.pl
+.Oo
+.Ar directory Ns Op Pf : Ar test
+.Op Ar modifier ...
+.Oc
+.Sh DESCRIPTION
+The
+.Nm
+steering script allows running the
+.Xr mandoc 1
+regression suite on arbitrary operating systems,
+even though the suite was designed for OpenBSD only.
+.Pp
+When run without an argument,
+.Nm
+runs the complete regression suite.
+.Pp
+When run with one argument, that argument can be:
+.Bl -enum
+.It
+A single dot to run the complete suite.
+.It
+One of the top level directories, for example
+.Pa mdoc ,
+to run the test suite for a complete language or feature group.
+.It
+A subdirectory, for example
+.Pa man/IP ,
+to run the tests for a specific macro or an individual feature.
+.It
+A subdirectory with a test name appended with a colon, for example
+.Pa char/unicode : Ns Pa named ,
+to run the tests for one particular input file.
+.El
+.Pp
+Any additional arguments modify the way the tests are run.
+The default is
+.Cm all .
+The following modifiers are available:
+.Bl -tag -width verbose
+.It Cm all
+Run all kinds of subtests.
+This implies all other modifiers except
+.Cm verbose
+and
+.Cm clean .
+.It Cm ascii
+Run subtests for
+.Fl T Cm ascii
+output mode.
+.It Cm clean
+Remove all output files created by running the tests.
+.It Cm html
+Run subtests for
+.Fl T Cm html
+output mode.
+.It Cm lint
+Run subtests for
+.Fl T Cm lint
+warning and error output.
+.It Cm man
+Run subtests for
+.Fl T Cm man
+output mode.
+.It Cm utf8
+Run subtests for
+.Fl T Cm utf8
+output mode.
+.It Cm verbose
+Display approximate indications of what is being done.
+.El
+.Pp
+The amount of summary lines shown can be modified by giving an
+argument consisting of a single digit:
+.Bl -tag -width verbose
+.It Cm 3
+Show all summary lines for all directories entered.
+Even without
+.Cm verbose ,
+this generates more than hundred lines of output when running the
+complete regression suite.
+.It Cm 2
+This is the default.
+It shows the summary lines for the
+.Ar directory
+given on the command line and its immediate children.
+Except for
+.Pa mdoc ,
+the output usually fits on one screen.
+.It Cm 1
+Only show a single summary line for the whole run.
+.It Cm 0
+Do not show any summary lines.
+No output means success.
+Success or failure can also be seen from the exit status.
+.El
+.Pp
+All failed tests are always reported, even when the
+.Cm 0
+modifier is given.
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+The recommended invocation for casual users:
+.Pp
+.Dl ./regress.pl
+.Pp
+Maximum output:
+.Pp
+.Dl ./regress.pl \&. verbose
+.Pp
+Complete check, but keep the tree clean:
+.Pp
+.Dl ./regress.pl \&. all clean
+.Pp
+Test all of
+.Pa mdoc ,
+but don't print the usual 65 lines of output:
+.Pp
+.Dl ./regress.pl mdoc 1
+.Pp
+Investigate a specific failure:
+.Pp
+.Dl ./regress.pl mdoc/Bd:broken man verbose
+.Sh HISTORY
+The
+.Nm
+script appeared in release 1.14.1 of the portable
+.Sy mandoc
+distribution.
+.Sh AUTHORS
+.An Ingo Schwarze Aq Mt schwarze@openbsd.org
+.Sh CAVEATS
+This script is not optimized for elegance.
+Regression suites for other software should not copy the design.
+.Pp
+The problem it solves is that the
+.Sy mandoc
+regression suite is tightly integrated into the regression
+testing system of the OpenBSD base system, which requires
+both OpenBSD
+.Xr make 1 ,
+working neither with POSIX make nor with GNU make, and which
+also requires the OpenBSD-specific Makefile fragments in
+.Pa /usr/share/mk .
+The workaround of parsing the Makefiles by hand and constructing
+the required command lines by hand is unavoidably messy; it's
+the classic no-no of parsing a language with an ad-hoc incomplete
+parser.
+But the problem of providing this regression suite for other
+operating systems stood unsolved for many years, and no cleaner
+solution was found that could be implemented with reasonable effort.
+So maybe this is better than nothing.
+.Pp
+The top-level Makefiles for running this regression suite on
+OpenBSD are not included in the portable distribution.
+They are too OpenBSD-specific to be useful elsewhere,
+and on OpenBSD itself, the suite ought be run natively from
+.Pa /usr/src/regress/usr.bin/mandoc
+and not from the portable distribution.
+.Pp
+The
+.Pa db
+subdirectory of the regression suite is not included.
+It uses a Makefile structure that differs vastly from the
+rest of the suite.
diff --git a/regress/roff/Makefile b/regress/roff/Makefile
new file mode 100644
index 00000000..96474204
--- /dev/null
+++ b/regress/roff/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.20 2015/02/06 16:05:51 schwarze Exp $
+
+SUBDIR = args cond esc scale string
+SUBDIR += br cc de ds ft ig it ll na nr ps rm sp tr
+
+.include "../Makefile.sub"
+.include <bsd.subdir.mk>
diff --git a/regress/roff/Makefile.inc b/regress/roff/Makefile.inc
new file mode 100644
index 00000000..6b294ca9
--- /dev/null
+++ b/regress/roff/Makefile.inc
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile.inc,v 1.3 2015/02/03 19:37:25 schwarze Exp $
+
+SKIP_TMAN ?= ALL
+
+.include "../Makefile.inc"
diff --git a/regress/roff/args/Makefile b/regress/roff/args/Makefile
new file mode 100644
index 00000000..3d756c97
--- /dev/null
+++ b/regress/roff/args/Makefile
@@ -0,0 +1,6 @@
+# $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/roff/args/man.in b/regress/roff/args/man.in
new file mode 100644
index 00000000..36ce992f
--- /dev/null
+++ b/regress/roff/args/man.in
@@ -0,0 +1,134 @@
+.TH ARGS-MAN 1 "November 19, 2014"
+.SH NAME
+args-man - arguments to man macros
+.SH DESCRIPTION
+standard unquoted:
+.IB one two
+text
+.br
+escaped blanks:
+.IB one\ one two\ two
+text
+.br
+escaped 'e' character:
+.IB one\eone two
+text
+.br
+.\"escaped backslash before blank:
+.\"IB one\\ two
+.\"text
+.\"br
+escaped backslash before 'e' character:
+.IB one\\e two
+text
+.br
+double inter-argument space:
+.IB one two
+text
+.br
+triple inter-argument space:
+.IB one two
+text
+.br
+single eol blank:
+.IB one two
+text
+.br
+double eol blank:
+.IB one two
+text
+.br
+triple eol blank:
+.IB one two
+text
+.br
+standard quoted:
+.IB "one" "two"
+text
+.br
+quoted quotes:
+.IB "one""one" """two"""
+text
+.br
+quoted whitespace:
+.IB "one one" "two two"
+text
+.br
+escaped 'e' characters:
+.IB "one \e one" "\e"
+text
+.br
+escaped backslash before blank:
+.IB "one\\ one" "\\ "
+text
+.br
+escaped backslash before 'e' character:
+.IB "one\\eone" "\\e"
+text
+.br
+double inter-argument space:
+.IB "one one" "two two"
+text
+.br
+triple inter-argument space:
+.IB "one one" "two two"
+text
+.br
+missing inter-argument space:
+.IB "one one"two\ two
+text
+.br
+single eol blank:
+.IB "one one" "two two"
+text
+.br
+double eol blank:
+.IB "one one" "two two"
+text
+.br
+triple eol blank:
+.IB "one one" "two two"
+text
+.br
+.\" Disabled for now because mandoc man(7) seems to
+.\" mishandle trailing blanks in arguments,
+.\" but that really isn't urgent to fix.
+.ig
+trailing blanks in arguments:
+.IB "one " "two "
+text
+.br
+..
+unterminated quotes:
+.IB "one
+text
+.br
+.IB one "two
+text
+.br
+.ig
+single trailing blank in unterminated quotes:
+.IB "one
+text
+.br
+.IB one "two
+text
+.br
+double trailing blank in unterminated quotes:
+.IB "one
+text
+.br
+.IB one "two
+text
+.br
+..
+tab after macro:
+.IB one two
+text
+.br
+escape sequence after macro:
+.IB\(lqone two
+text
+.br
+backslash at eol:
+.IB one two\
diff --git a/regress/roff/args/man.out_ascii b/regress/roff/args/man.out_ascii
new file mode 100644
index 00000000..b936b45f
--- /dev/null
+++ b/regress/roff/args/man.out_ascii
@@ -0,0 +1,38 @@
+ARGS-MAN(1) General Commands Manual ARGS-MAN(1)
+
+
+
+NNAAMMEE
+ args-man - arguments to man macros
+
+DDEESSCCRRIIPPTTIIOONN
+ standard unquoted: _o_n_ettwwoo text
+ escaped blanks: _o_n_e _o_n_ettwwoo ttwwoo text
+ escaped 'e' character: _o_n_e_\_o_n_ettwwoo text
+ escaped backslash before 'e' character: _o_n_e_\ttwwoo text
+ double inter-argument space: _o_n_ettwwoo text
+ triple inter-argument space: _o_n_ettwwoo text
+ single eol blank: _o_n_ettwwoo text
+ double eol blank: _o_n_ettwwoo text
+ triple eol blank: _o_n_ettwwoo text
+ standard quoted: _o_n_ettwwoo text
+ quoted quotes: _o_n_e_"_o_n_e""ttwwoo"" text
+ quoted whitespace: _o_n_e _o_n_ettwwoo ttwwoo text
+ escaped 'e' characters: _o_n_e _\ _o_n_e\\ text
+ escaped backslash before blank: _o_n_e _o_n_e text
+ escaped backslash before 'e' character: _o_n_e_\_o_n_e\\ text
+ double inter-argument space: _o_n_e _o_n_ettwwoo ttwwoo text
+ triple inter-argument space: _o_n_e _o_n_ettwwoo ttwwoo text
+ missing inter-argument space: _o_n_e _o_n_ettwwoo ttwwoo text
+ single eol blank: _o_n_e _o_n_ettwwoo ttwwoo text
+ double eol blank: _o_n_e _o_n_ettwwoo ttwwoo text
+ triple eol blank: _o_n_e _o_n_ettwwoo ttwwoo text
+ unterminated quotes: _o_n_e text
+ _o_n_ettwwoo text
+ tab after macro: _o_n_ettwwoo text
+ escape sequence after macro: _o_n_ettwwoo text
+ backslash at eol: _o_n_ettwwoo
+
+
+
+ November 19, 2014 ARGS-MAN(1)
diff --git a/regress/roff/args/man.out_lint b/regress/roff/args/man.out_lint
new file mode 100644
index 00000000..68b4ec9f
--- /dev/null
+++ b/regress/roff/args/man.out_lint
@@ -0,0 +1,9 @@
+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:103:5: WARNING: unterminated quoted argument
+mandoc: man.in:106:9: WARNING: unterminated quoted argument
+mandoc: man.in:130:1: ERROR: escaped character not allowed in a name: IB\(
diff --git a/regress/roff/args/mdoc.in b/regress/roff/args/mdoc.in
new file mode 100644
index 00000000..0a134816
--- /dev/null
+++ b/regress/roff/args/mdoc.in
@@ -0,0 +1,124 @@
+.Dd November 19, 2014
+.Dt ARGS-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm args-mdoc
+.Nd arguments to mdoc macros
+.Sh DESCRIPTION
+standard unquoted:
+.Fl one two
+text
+.br
+escaped blanks:
+.Fl one\ one two\ two
+text
+.br
+escaped 'e' character:
+.Fl one\eone two
+text
+.br
+.\"escaped backslash before blank:
+.\"Fl one\\ two
+.\"text
+.\"br
+escaped backslash before 'e' character:
+.Fl one\\e two
+text
+.br
+double inter-argument space:
+.Fl one two
+text
+.br
+triple inter-argument space:
+.Fl one two
+text
+.br
+single eol blank:
+.Fl one two
+text
+.br
+double eol blank:
+.Fl one two
+text
+.br
+triple eol blank:
+.Fl one two
+text
+.br
+standard quoted:
+.Fl "one" "two"
+text
+.br
+quoted quotes:
+.Fl "one""one" """two"""
+text
+.br
+quoted whitespace:
+.Fl "one one" "two two"
+text
+.br
+escaped 'e' characters:
+.Fl "one \e one" "\e"
+text
+.br
+.\"escaped backslash before blank:
+.\"Fl "one\\ one" "\\ "
+.\"text
+.\"br
+.\"escaped backslash before 'e' character:
+.\"Fl "one\\eone" "\\e"
+.\"text
+.\"br
+double inter-argument space:
+.Fl "one one" "two two"
+text
+.br
+triple inter-argument space:
+.Fl "one one" "two two"
+text
+.br
+missing inter-argument space:
+.Fl "one one"two\ two
+text
+.br
+single eol blank:
+.Fl "one one" "two two"
+text
+.br
+double eol blank:
+.Fl "one one" "two two"
+text
+.br
+triple eol blank:
+.Fl "one one" "two two"
+text
+.br
+trailing blanks in arguments:
+.Fl "one " "two "
+text
+.br
+unterminated quotes:
+.Fl "one
+.Fl one "two
+text
+.br
+single trailing blank in unterminated quotes:
+.Fl "one
+.Fl one "two
+text
+.br
+double trailing blank in unterminated quotes:
+.Fl "one
+.Fl one "two
+text
+.br
+tab after macro:
+.Fl one two
+text
+.br
+escape sequence after macro:
+.Fl\(lqone two
+text
+.br
+backslash at eol:
+.Fl one two\
diff --git a/regress/roff/args/mdoc.out_ascii b/regress/roff/args/mdoc.out_ascii
new file mode 100644
index 00000000..94a12518
--- /dev/null
+++ b/regress/roff/args/mdoc.out_ascii
@@ -0,0 +1,34 @@
+ARGS-MDOC(1) General Commands Manual ARGS-MDOC(1)
+
+NNAAMMEE
+ aarrggss--mmddoocc - arguments to mdoc macros
+
+DDEESSCCRRIIPPTTIIOONN
+ standard unquoted: --oonnee --ttwwoo text
+ escaped blanks: --oonnee oonnee --ttwwoo ttwwoo text
+ escaped 'e' character: --oonnee\\oonnee --ttwwoo text
+ escaped backslash before 'e' character: --oonnee\\ --ttwwoo text
+ double inter-argument space: --oonnee --ttwwoo text
+ triple inter-argument space: --oonnee --ttwwoo text
+ single eol blank: --oonnee --ttwwoo text
+ double eol blank: --oonnee --ttwwoo text
+ triple eol blank: --oonnee --ttwwoo text
+ standard quoted: --oonnee --ttwwoo text
+ quoted quotes: --oonnee""oonnee --""ttwwoo"" text
+ quoted whitespace: --oonnee oonnee --ttwwoo ttwwoo text
+ escaped 'e' characters: --oonnee \\ oonnee --\\ text
+ double inter-argument space: --oonnee oonnee --ttwwoo ttwwoo text
+ triple inter-argument space: --oonnee oonnee --ttwwoo ttwwoo text
+ missing inter-argument space: --oonnee oonnee --ttwwoo ttwwoo text
+ single eol blank: --oonnee oonnee --ttwwoo ttwwoo text
+ double eol blank: --oonnee oonnee --ttwwoo ttwwoo text
+ triple eol blank: --oonnee oonnee --ttwwoo ttwwoo text
+ trailing blanks in arguments: --oonnee --ttwwoo text
+ unterminated quotes: --oonnee --oonnee --ttwwoo text
+ single trailing blank in unterminated quotes: --oonnee --oonnee --ttwwoo text
+ double trailing blank in unterminated quotes: --oonnee --oonnee --ttwwoo text
+ tab after macro: --oonnee --ttwwoo text
+ escape sequence after macro: --oonnee --ttwwoo text
+ backslash at eol: --oonnee --ttwwoo
+
+OpenBSD November 19, 2014 OpenBSD
diff --git a/regress/roff/args/mdoc.out_lint b/regress/roff/args/mdoc.out_lint
new file mode 100644
index 00000000..a622c6c7
--- /dev/null
+++ b/regress/roff/args/mdoc.out_lint
@@ -0,0 +1,13 @@
+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
+mandoc: mdoc.in:120:1: ERROR: escaped character not allowed in a name: Fl\(
diff --git a/regress/roff/args/roff.in b/regress/roff/args/roff.in
new file mode 100644
index 00000000..0f4039dc
--- /dev/null
+++ b/regress/roff/args/roff.in
@@ -0,0 +1,71 @@
+.TH ARGS-ROFF 1 "February 21, 2015"
+.SH NAME
+args-roff - arguments to roff macros
+.SH DESCRIPTION
+.de test
+.BI (\\$1) "(\\$2)"
+.br
+..
+arguments containing quotes:
+.test a"b a"b
+.de test
+(\\$1) (\\$2)
+.br
+..
+standard unquoted:
+.test one two
+escaped blanks:
+.test one\ one two\ two
+escaped 'e' character:
+.test one\eone two
+escaped backslash before blank:
+.test one\\ two
+escaped backslash before 'e' character:
+.test one\\e two
+double inter-argument space:
+.test one two
+triple inter-argument space:
+.test one two
+single eol blank:
+.test one two
+double eol blank:
+.test one two
+triple eol blank:
+.test one two
+standard quoted:
+.test "one" "two"
+quoted quotes:
+.test "one""one" """two"""
+quoted whitespace:
+.test "one one" "two two"
+escaped 'e' characters:
+.test "one \e one" "\e"
+escaped backslash before blank:
+.test "one\\ one" "\\ "
+escaped backslash before 'e' character:
+.test "one\\eone" "\\e"
+double inter-argument space:
+.test "one one" "two two"
+triple inter-argument space:
+.test "one one" "two two"
+missing inter-argument space:
+.test "one one"two\ two
+single eol blank:
+.test "one one" "two two"
+double eol blank:
+.test "one one" "two two"
+triple eol blank:
+.test "one one" "two two"
+trailing blanks in arguments:
+.test "one " "two "
+unterminated quotes:
+.test "one
+.test one "two
+single trailing blank in unterminated quotes:
+.test "one
+.test one "two
+double trailing blank in unterminated quotes:
+.test "one
+.test one "two
+backslash at eol:
+.test one two\
diff --git a/regress/roff/args/roff.out_ascii b/regress/roff/args/roff.out_ascii
new file mode 100644
index 00000000..eb0b5323
--- /dev/null
+++ b/regress/roff/args/roff.out_ascii
@@ -0,0 +1,43 @@
+ARGS-ROFF(1) General Commands Manual ARGS-ROFF(1)
+
+
+
+NNAAMMEE
+ args-roff - arguments to roff macros
+
+DDEESSCCRRIIPPTTIIOONN
+ arguments containing quotes: ((aa""bb))_(_a_"_b_)
+ standard unquoted: (one) (two)
+ escaped blanks: (one one) (two two)
+ escaped 'e' character: (one\one) (two)
+ escaped backslash before blank: (one) (two)
+ escaped backslash before 'e' character: (one\) (two)
+ double inter-argument space: (one) (two)
+ triple inter-argument space: (one) (two)
+ single eol blank: (one) (two)
+ double eol blank: (one) (two)
+ triple eol blank: (one) (two)
+ standard quoted: (one) (two)
+ quoted quotes: (one"one) ("two")
+ quoted whitespace: (one one) (two two)
+ escaped 'e' characters: (one \ one) (\)
+ escaped backslash before blank: (one one) ( )
+ escaped backslash before 'e' character: (one\one) (\)
+ double inter-argument space: (one one) (two two)
+ triple inter-argument space: (one one) (two two)
+ missing inter-argument space: (one one) (two two)
+ single eol blank: (one one) (two two)
+ double eol blank: (one one) (two two)
+ triple eol blank: (one one) (two two)
+ trailing blanks in arguments: (one ) (two )
+ unterminated quotes: (one) ()
+ (one) (two)
+ single trailing blank in unterminated quotes: (one ) ()
+ (one) (two )
+ double trailing blank in unterminated quotes: (one ) ()
+ (one) (two )
+ backslash at eol: (one) (two)
+
+
+
+ February 21, 2015 ARGS-ROFF(1)
diff --git a/regress/roff/args/roff.out_lint b/regress/roff/args/roff.out_lint
new file mode 100644
index 00000000..df08f6f6
--- /dev/null
+++ b/regress/roff/args/roff.out_lint
@@ -0,0 +1,16 @@
+mandoc: roff.in:30:15: WARNING: whitespace at end of input line
+mandoc: roff.in:32:16: WARNING: whitespace at end of input line
+mandoc: roff.in:34:17: WARNING: whitespace at end of input line
+mandoc: roff.in:54:27: WARNING: whitespace at end of input line
+mandoc: roff.in:56:28: WARNING: whitespace at end of input line
+mandoc: roff.in:58:29: WARNING: whitespace at end of input line
+mandoc: roff.in:62:7: WARNING: unterminated quoted argument
+mandoc: roff.in:63:11: WARNING: unterminated quoted argument
+mandoc: roff.in:65:7: WARNING: unterminated quoted argument
+mandoc: roff.in:65:12: WARNING: whitespace at end of input line
+mandoc: roff.in:66:11: WARNING: unterminated quoted argument
+mandoc: roff.in:66:16: WARNING: whitespace at end of input line
+mandoc: roff.in:68:7: WARNING: unterminated quoted argument
+mandoc: roff.in:68:13: WARNING: whitespace at end of input line
+mandoc: roff.in:69:11: WARNING: unterminated quoted argument
+mandoc: roff.in:69:17: WARNING: whitespace at end of input line
diff --git a/regress/roff/br/Makefile b/regress/roff/br/Makefile
new file mode 100644
index 00000000..4d383bee
--- /dev/null
+++ b/regress/roff/br/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.3 2015/02/06 08:28:04 schwarze Exp $
+
+REGRESS_TARGETS = args
+LINT_TARGETS = args
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/br/args.in b/regress/roff/br/args.in
new file mode 100644
index 00000000..c2837971
--- /dev/null
+++ b/regress/roff/br/args.in
@@ -0,0 +1,9 @@
+.TH BR-ARGS 1 "January 17, 2011" OpenBSD
+.SH NAME
+br-args \- arguments to .br macros
+.SH DESCRIPTION
+some
+text
+.br arg1 arg2 arg3
+more
+text
diff --git a/regress/roff/br/args.out_ascii b/regress/roff/br/args.out_ascii
new file mode 100644
index 00000000..b4d7c40b
--- /dev/null
+++ b/regress/roff/br/args.out_ascii
@@ -0,0 +1,14 @@
+BR-ARGS(1) General Commands Manual BR-ARGS(1)
+
+
+
+NNAAMMEE
+ br-args - arguments to .br macros
+
+DDEESSCCRRIIPPTTIIOONN
+ some text
+ more text
+
+
+
+OpenBSD January 17, 2011 BR-ARGS(1)
diff --git a/regress/roff/br/args.out_lint b/regress/roff/br/args.out_lint
new file mode 100644
index 00000000..e9a03ad5
--- /dev/null
+++ b/regress/roff/br/args.out_lint
@@ -0,0 +1 @@
+mandoc: args.in:7:5: ERROR: skipping all arguments: br arg1 arg2 arg3
diff --git a/regress/roff/cc/Makefile b/regress/roff/cc/Makefile
new file mode 100644
index 00000000..33951ead
--- /dev/null
+++ b/regress/roff/cc/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2015/02/06 16:05:51 schwarze Exp $
+
+REGRESS_TARGETS = basic
+LINT_TARGETS = basic
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/cc/basic.in b/regress/roff/cc/basic.in
new file mode 100644
index 00000000..ffd1c211
--- /dev/null
+++ b/regress/roff/cc/basic.in
@@ -0,0 +1,19 @@
+.TH CC-BASIC 1 "July 7, 2012" OpenBSD
+.SH NAME
+cc-basic \- basic usage of the cc request
+.SH DESCRIPTION
+first line
+.br
+second
+.cc :
+line
+:br
+third
+:cc ;bogus
+line
+;br
+fourth
+;cc
+line
+.br
+last line
diff --git a/regress/roff/cc/basic.out_ascii b/regress/roff/cc/basic.out_ascii
new file mode 100644
index 00000000..530f1ff2
--- /dev/null
+++ b/regress/roff/cc/basic.out_ascii
@@ -0,0 +1,17 @@
+CC-BASIC(1) General Commands Manual CC-BASIC(1)
+
+
+
+NNAAMMEE
+ cc-basic - basic usage of the cc request
+
+DDEESSCCRRIIPPTTIIOONN
+ first line
+ second line
+ third line
+ fourth line
+ last line
+
+
+
+OpenBSD July 7, 2012 CC-BASIC(1)
diff --git a/regress/roff/cc/basic.out_lint b/regress/roff/cc/basic.out_lint
new file mode 100644
index 00000000..f091c585
--- /dev/null
+++ b/regress/roff/cc/basic.out_lint
@@ -0,0 +1 @@
+mandoc: basic.in:12:6: ERROR: skipping excess arguments: cc ... bogus
diff --git a/regress/roff/cond/Makefile b/regress/roff/cond/Makefile
new file mode 100644
index 00000000..68a88694
--- /dev/null
+++ b/regress/roff/cond/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.8 2015/05/31 23:12:17 schwarze Exp $
+
+REGRESS_TARGETS = if ie close numeric register strcmp before-Dd
+LINT_TARGETS = if close
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/cond/before-Dd.in b/regress/roff/cond/before-Dd.in
new file mode 100644
index 00000000..6701403b
--- /dev/null
+++ b/regress/roff/cond/before-Dd.in
@@ -0,0 +1,30 @@
+.if n \{.ds mystring mytext
+.\}
+.Dd May 27, 2012
+.Dt IF-BEFORE-DD 1
+.Os OpenBSD
+.Sh NAME
+.Nm if-before-Dd
+.Nd end of if block on its own line before Dd
+.Sh DESCRIPTION
+In an old version of
+.Xr mandoc 1 ,
+.Xr mdoc 7
+file format autodetection failed when the end of an
+.Ic if
+block stood on its own line before the initial
+.Xr mdoc 7
+.Ic Dd
+macro.
+The file was mishandled as
+.Xr man 7
+and parsing failed with unknown macro errors.
+.Pp
+If the present document looks like a proper
+.Xr mdoc 7
+document and the following display reads
+.Dq mytext ,
+then the problem did not come back:
+.Bd -ragged -offset indent
+\*[mystring]
+.Ed
diff --git a/regress/roff/cond/before-Dd.out_ascii b/regress/roff/cond/before-Dd.out_ascii
new file mode 100644
index 00000000..f14a44fe
--- /dev/null
+++ b/regress/roff/cond/before-Dd.out_ascii
@@ -0,0 +1,17 @@
+IF-BEFORE-DD(1) General Commands Manual IF-BEFORE-DD(1)
+
+NNAAMMEE
+ iiff--bbeeffoorree--DDdd - end of if block on its own line before Dd
+
+DDEESSCCRRIIPPTTIIOONN
+ In an old version of mandoc(1), mdoc(7) file format autodetection failed
+ when the end of an iiff block stood on its own line before the initial
+ mdoc(7) DDdd macro. The file was mishandled as man(7) and parsing failed
+ with unknown macro errors.
+
+ If the present document looks like a proper mdoc(7) document and the
+ following display reads ``mytext'', then the problem did not come back:
+
+ mytext
+
+OpenBSD May 27, 2012 OpenBSD
diff --git a/regress/roff/cond/close.in b/regress/roff/cond/close.in
new file mode 100644
index 00000000..7fa91423
--- /dev/null
+++ b/regress/roff/cond/close.in
@@ -0,0 +1,15 @@
+.TH COND-CLOSE 1 2013-06-27 OpenBSD
+.SH NAME
+cond-close \- closing conditional macros
+.SH DESCRIPTION
+.if t \{.unknown \}
+closing after an unknown macro
+.PP
+.if t \{.ig \}
+closing after an ignored macro
+.PP
+.if t \{text \}
+closing after plain text
+.PP
+.if n \{
+still open at the end of the file
diff --git a/regress/roff/cond/close.out_ascii b/regress/roff/cond/close.out_ascii
new file mode 100644
index 00000000..244d4154
--- /dev/null
+++ b/regress/roff/cond/close.out_ascii
@@ -0,0 +1,19 @@
+COND-CLOSE(1) General Commands Manual COND-CLOSE(1)
+
+
+
+NNAAMMEE
+ cond-close - closing conditional macros
+
+DDEESSCCRRIIPPTTIIOONN
+ closing after an unknown macro
+
+ closing after an ignored macro
+
+ closing after plain text
+
+ still open at the end of the file
+
+
+
+OpenBSD 2013-06-27 COND-CLOSE(1)
diff --git a/regress/roff/cond/close.out_lint b/regress/roff/cond/close.out_lint
new file mode 100644
index 00000000..e3419dba
--- /dev/null
+++ b/regress/roff/cond/close.out_lint
@@ -0,0 +1 @@
+mandoc: close.in:14:1: ERROR: appending missing end of block: if
diff --git a/regress/roff/cond/ie.in b/regress/roff/cond/ie.in
new file mode 100644
index 00000000..f9ab8bc0
--- /dev/null
+++ b/regress/roff/cond/ie.in
@@ -0,0 +1,30 @@
+.TH IE 1 "December 16, 2014" OpenBSD
+.SH NAME
+if \- the roff conditional instruction with else-clause
+.SH DESCRIPTION
+.el Initially, else is ignored.
+.ie n One-line true condition.
+.br
+Text following the true condition.
+.el One-line else after true.
+.el Another else after true.
+.br
+.ie t One-line false condition.
+Text following the false condition.
+.br
+.el \{Two-line else
+after false.\}
+.br
+.el Another else after false.
+.br
+.ie
+Text following an empty condition.
+.el Else after empty condition.
+.br
+.ie !
+Text following negated empty condition.
+.el Else after negated empty condition.
+.br
+.ie n If \&.el\e{ works, nothing follows here:
+.el\{dummy
+BOOHOO\}
diff --git a/regress/roff/cond/ie.out_ascii b/regress/roff/cond/ie.out_ascii
new file mode 100644
index 00000000..73d3d97c
--- /dev/null
+++ b/regress/roff/cond/ie.out_ascii
@@ -0,0 +1,19 @@
+IE(1) General Commands Manual IE(1)
+
+
+
+NNAAMMEE
+ if - the roff conditional instruction with else-clause
+
+DDEESSCCRRIIPPTTIIOONN
+ One-line true condition.
+ Text following the true condition.
+ Text following the false condition.
+ Two-line else after false.
+ Else after empty condition.
+ Else after negated empty condition.
+ If .el\{ works, nothing follows here:
+
+
+
+OpenBSD December 16, 2014 IE(1)
diff --git a/regress/roff/cond/if.in b/regress/roff/cond/if.in
new file mode 100644
index 00000000..f243fbdf
--- /dev/null
+++ b/regress/roff/cond/if.in
@@ -0,0 +1,97 @@
+.TH IF 1 "June 27, 2015" OpenBSD
+.SH NAME
+if \- the roff conditional instruction
+.SH DESCRIPTION
+.if n One-line true condition.
+.if t One-line false condition.
+.if n
+Next-line empty true condition.
+.if t
+Next-line empty false condition.
+.br
+False condition with whitespace:
+.br
+.if t
+True condition with whitespace:
+.if n
+.if n \{One-line true cond\}ition with block.
+.if t \{One-line false cond\}ition with block.
+.br
+.if n \{ One-line true cond\}ition with block with leading blanks.
+.if t \{ One-line false cond\}ition with block with leading blanks.
+.br
+.if n \{Two-line true condition
+without cont\}inuation and macros.
+.if t \{Two-line false condition
+without cont\}inuation and macros.
+.br
+.if n \{Two-line true condition
+.B without cont\}inuation but with macros.
+.if t \{Two-line false condition
+.B without cont\}inuation but with macros.
+.br
+.if n \{\
+Two-line true condition
+with continuation and macros.
+.\}This will not be printed.
+.if t \{\
+Two-line false condition
+with continuation and macros.
+.\}This will not be printed.
+.br
+.if n \{
+Two-line true condition with blank line.\}
+.if t \{
+Two-line false condition with blank line.\}
+.br
+.if n \{Outer true condition.
+.br
+.if n Inner one-line true condition.
+.if t Inner one-line false condition.
+.br
+.if n \{Inner two-line true condition
+without continuation and macros.\}
+.if t \{Inner two-line false condition
+without continuation and macros.\}
+.br
+Back to the outer true condition.\}
+.br
+.if t \{Outer false condition.
+.br
+.if n Inner one-line true condition.
+.if t Inner one-line false condition.
+.br
+.if n \{Inner two-line true condition
+without continuation and macros.\}
+.if t \{Inner two-line false condition
+without continuation and macros.\}
+.br
+Back to the outer false condition.\}
+.br
+.if n \{Outer true condition.
+.if t \{Inner false condition.
+inner\}middle\}end
+After conditional.
+.br
+.if n \{Outer true condition.
+.if t \{Inner false condition.
+.\}middle\}end
+After conditional.
+.br
+.if n \{Outer true condition.
+.if n \{Inner true condition.
+.\}middle\}end
+After conditional.
+.br
+.if n \{Outer true condition.
+.if t \{Inner false condition.
+.B\}middle\}end
+After conditional.
+.br
+Backslash-backslash-brace in text:
+.if t \{This text is not printed.\\}
+This neither.\}
+On a macro line:
+.if t \{.B This text\\} is not printed.
+.B This\} neither.
+End.
diff --git a/regress/roff/cond/if.out_ascii b/regress/roff/cond/if.out_ascii
new file mode 100644
index 00000000..7fb9eecc
--- /dev/null
+++ b/regress/roff/cond/if.out_ascii
@@ -0,0 +1,34 @@
+IF(1) General Commands Manual IF(1)
+
+
+
+NNAAMMEE
+ if - the roff conditional instruction
+
+DDEESSCCRRIIPPTTIIOONN
+ One-line true condition.
+
+ Next-line empty true condition.
+ False condition with whitespace:
+ True condition with whitespace:
+
+ One-line true condition with block.
+ One-line true condition with block with leading blanks.
+ Two-line true condition without continuation and macros.
+ Two-line true condition wwiitthhoouutt ccoonnttiinnuuaattiioonn bbuutt wwiitthh mmaaccrrooss..
+ Two-line true condition with continuation and macros.
+
+ Two-line true condition with blank line.
+ Outer true condition.
+ Inner one-line true condition.
+ Inner two-line true condition without continuation and macros.
+ Back to the outer true condition.
+ Outer true condition. After conditional.
+ Outer true condition. After conditional.
+ Outer true condition. Inner true condition. After conditional.
+ Outer true condition. After conditional.
+ Backslash-backslash-brace in text: On a macro line: End.
+
+
+
+OpenBSD June 27, 2015 IF(1)
diff --git a/regress/roff/cond/if.out_lint b/regress/roff/cond/if.out_lint
new file mode 100644
index 00000000..bb8e2d3a
--- /dev/null
+++ b/regress/roff/cond/if.out_lint
@@ -0,0 +1,2 @@
+mandoc: if.in:14:1: WARNING: conditional request controls empty scope: if
+mandoc: if.in:16:1: WARNING: conditional request controls empty scope: if
diff --git a/regress/roff/cond/numeric.in b/regress/roff/cond/numeric.in
new file mode 100644
index 00000000..e96f3087
--- /dev/null
+++ b/regress/roff/cond/numeric.in
@@ -0,0 +1,152 @@
+.TH COND-NUMERIC 1 "December 16, 2014" OpenBSD
+.SH NAME
+cond-numeric \- roff conditions involving numbers
+.SH DESCRIPTION
+positive number:
+plain
+.ie 42 (t)
+.el (f)
+negated
+.ie !42 (t)
+.el (f)
+.PP
+negative number:
+plain
+.ie -42 (t)
+.el (f)
+negated
+.ie !-42 (t)
+.el (f)
+.PP
+second number missing:
+.ie 42=bad worse
+.el ok
+.PP
+operator "<":
+smaller
+.ie 1<2 (t)
+.el (f)
+equal
+.ie 1<1 (t)
+.el (f)
+greater
+.ie 2<1 (t)
+.el (f)
+.PP
+operator "<=":
+smaller
+.ie 1<=2 (t)
+.el (f)
+equal
+.ie 1<=1 (t)
+.el (f)
+greater
+.ie 2<=1 (t)
+.el (f)
+.PP
+operator "=":
+smaller
+.ie 1=2 (t)
+.el (f)
+equal
+.ie 1=1 (t)
+.el (f)
+greater
+.ie 2=1 (t)
+.el (f)
+.PP
+operator "==":
+smaller
+.ie 1==2 (t)
+.el (f)
+equal
+.ie 1==1 (t)
+.el (f)
+greater
+.ie 2==1 (t)
+.el (f)
+.PP
+operator ">=":
+smaller
+.ie 1>=2 (t)
+.el (f)
+equal
+.ie 1>=1 (t)
+.el (f)
+greater
+.ie 2>=1 (t)
+.el (f)
+.PP
+operator ">":
+smaller
+.ie 1>2 (t)
+.el (f)
+equal
+.ie 1>1 (t)
+.el (f)
+greater
+.ie 2>1 (t)
+.el (f)
+.PP
+with negative numbers:
+mm
+.ie -2<-1 (t)
+.el (f)
+mp
+.ie -2<1 (t)
+.el (f)
+pm
+.ie 1>-2 (t)
+.el (f)
+.PP
+operator "&":
+00
+.ie 0&0 (t)
+.el (f)
+01
+.ie 0&1 (t)
+.el (f)
+10
+.ie 1&0 (t)
+.el (f)
+11
+.ie 1&1 (t)
+.el (f)
+.PP
+operator ":":
+00
+.ie 0:0 (t)
+.el (f)
+01
+.ie 0:1 (t)
+.el (f)
+10
+.ie 1:0 (t)
+.el (f)
+11
+.ie 1:1 (t)
+.el (f)
+.PP
+with scaling units:
+1i>2c
+.ie 1i>2c (t)
+.el (f)
+1i-6P
+.ie 1i-6P (t)
+.el (f)
+.PP
+unmatched parenthesis:
+.ie (
+(t)
+.el (f)
+one
+.ie (1 (t)
+.el (f)
+.PP
+negated unmatched parenthesis:
+.ie !(
+(t)
+.el (f)
+zero
+.ie !(0 (t)
+.el (f)
diff --git a/regress/roff/cond/numeric.out_ascii b/regress/roff/cond/numeric.out_ascii
new file mode 100644
index 00000000..35973672
--- /dev/null
+++ b/regress/roff/cond/numeric.out_ascii
@@ -0,0 +1,41 @@
+COND-NUMERIC(1) General Commands Manual COND-NUMERIC(1)
+
+
+
+NNAAMMEE
+ cond-numeric - roff conditions involving numbers
+
+DDEESSCCRRIIPPTTIIOONN
+ positive number: plain (t) negated (f)
+
+ negative number: plain (f) negated (t)
+
+ second number missing: ok
+
+ operator "<": smaller (t) equal (f) greater (f)
+
+ operator "<=": smaller (t) equal (t) greater (f)
+
+ operator "=": smaller (f) equal (t) greater (f)
+
+ operator "==": smaller (f) equal (t) greater (f)
+
+ operator ">=": smaller (f) equal (t) greater (t)
+
+ operator ">": smaller (f) equal (f) greater (t)
+
+ with negative numbers: mm (t) mp (t) pm (t)
+
+ operator "&": 00 (f) 01 (f) 10 (f) 11 (t)
+
+ operator ":": 00 (f) 01 (t) 10 (t) 11 (t)
+
+ with scaling units: 1i>2c (t) 1i-6P (f)
+
+ unmatched parenthesis: (f) one (t)
+
+ negated unmatched parenthesis: (f) zero (t)
+
+
+
+OpenBSD December 16, 2014 COND-NUMERIC(1)
diff --git a/regress/roff/cond/register.in b/regress/roff/cond/register.in
new file mode 100644
index 00000000..d8c9629b
--- /dev/null
+++ b/regress/roff/cond/register.in
@@ -0,0 +1,11 @@
+.TH REGISTER 1 "May 31, 2015" OpenBSD
+.SH NAME
+register \- conditional testing whether a register is defined
+.SH DESCRIPTION
+.ie rmyreg OOPS
+.el not yet defined
+.br
+.nr myreg 0
+.ie rmyreg now defined
+.el OOPS
+.if !rmyreg OOPS
diff --git a/regress/roff/cond/register.out_ascii b/regress/roff/cond/register.out_ascii
new file mode 100644
index 00000000..acd0f724
--- /dev/null
+++ b/regress/roff/cond/register.out_ascii
@@ -0,0 +1,14 @@
+REGISTER(1) General Commands Manual REGISTER(1)
+
+
+
+NNAAMMEE
+ register - conditional testing whether a register is defined
+
+DDEESSCCRRIIPPTTIIOONN
+ not yet defined
+ now defined
+
+
+
+OpenBSD May 31, 2015 REGISTER(1)
diff --git a/regress/roff/cond/strcmp.in b/regress/roff/cond/strcmp.in
new file mode 100644
index 00000000..eabe80ff
--- /dev/null
+++ b/regress/roff/cond/strcmp.in
@@ -0,0 +1,37 @@
+.TH COND-STRCMP 1 "March 8, 2014" OpenBSD
+.SH NAME
+cond-strcmp \- roff conditions involving string comparison
+.SH DESCRIPTION
+empty:
+.ie """ (t)
+.el (f)
+one char:
+.ie xaxax (t)
+.el (f)
+three chars:
+.ie xabcxabcx (t)
+.el (f)
+.br
+mismatch:
+.ie xabcxabdx (t)
+.el (f)
+longer:
+.ie xabcxabcdx (t)
+.el (f)
+shorter:
+.ie xabcdxabcx (t)
+.el (f)
+.br
+no middle:
+.ie xabc (t)
+.el (f)
+no end:
+.ie xabcxabc
+.el (f)
+.SS Negation
+match:
+.ie !xabcxabcx (t)
+.el (f)
+mismatch:
+.ie !xaxbx (t)
+.el (f)
diff --git a/regress/roff/cond/strcmp.out_ascii b/regress/roff/cond/strcmp.out_ascii
new file mode 100644
index 00000000..9268dec8
--- /dev/null
+++ b/regress/roff/cond/strcmp.out_ascii
@@ -0,0 +1,18 @@
+COND-STRCMP(1) General Commands Manual COND-STRCMP(1)
+
+
+
+NNAAMMEE
+ cond-strcmp - roff conditions involving string comparison
+
+DDEESSCCRRIIPPTTIIOONN
+ empty: (t) one char: (t) three chars: (t)
+ mismatch: (f) longer: (f) shorter: (f)
+ no middle: (f) no end: (f)
+
+ NNeeggaattiioonn
+ match: (f) mismatch: (t)
+
+
+
+OpenBSD March 8, 2014 COND-STRCMP(1)
diff --git a/regress/roff/de/Dd.in b/regress/roff/de/Dd.in
new file mode 100644
index 00000000..4dcbdd2b
--- /dev/null
+++ b/regress/roff/de/Dd.in
@@ -0,0 +1,11 @@
+.de At
+BSD
+..
+.Dd June 3, 2012
+.Dt DE-DD 1
+.Os OpenBSD
+.Sh NAME
+.Nm de-Dd
+.Nd interaction of the Dd macro with de requests
+.Sh DESCRIPTION
+.At
diff --git a/regress/roff/de/Dd.out_ascii b/regress/roff/de/Dd.out_ascii
new file mode 100644
index 00000000..1b04eea9
--- /dev/null
+++ b/regress/roff/de/Dd.out_ascii
@@ -0,0 +1,9 @@
+DE-DD(1) General Commands Manual DE-DD(1)
+
+NNAAMMEE
+ ddee--DDdd - interaction of the Dd macro with de requests
+
+DDEESSCCRRIIPPTTIIOONN
+ AT&T UNIX
+
+OpenBSD June 3, 2012 OpenBSD
diff --git a/regress/roff/de/Makefile b/regress/roff/de/Makefile
new file mode 100644
index 00000000..9488ce05
--- /dev/null
+++ b/regress/roff/de/Makefile
@@ -0,0 +1,44 @@
+# $OpenBSD: Makefile,v 1.9 2015/02/03 19:37:25 schwarze Exp $
+
+REGRESS_TARGETS = append cond escname factorial indir startde TH Dd
+LINT_TARGETS = escname indir
+
+.include <bsd.regress.mk>
+
+
+# OpenBSD only: non-standard targets
+
+# --- additions to public targets ---
+
+all ascii: ascii-diff-opt
+
+ascii-clean: ascii-clean-opt
+
+groff: TH.out_ascii_opt Dd.out_ascii_opt
+
+groff-clean: groff-clean-opt
+
+
+# --- local rules ---
+
+ascii-diff-opt: TH.mandoc_ascii_opt Dd.mandoc_ascii_opt
+ @${DIFF} ${.CURDIR}/TH.out_ascii_opt TH.mandoc_ascii_opt
+ @${DIFF} ${.CURDIR}/Dd.out_ascii_opt Dd.mandoc_ascii_opt
+
+TH.mandoc_ascii_opt: TH.in
+ @${MANDOC} -Tascii -man ${.ALLSRC} > ${.TARGET}
+
+Dd.mandoc_ascii_opt: Dd.in
+ @${MANDOC} -Tascii -mdoc ${.ALLSRC} > ${.TARGET}
+
+ascii-clean-opt:
+ @rm -f TH.mandoc_ascii_opt Dd.mandoc_ascii_opt
+
+TH.out_ascii_opt: TH.in
+ /usr/local/bin/nroff -c -man -Tascii ${.ALLSRC} > ${.TARGET}
+
+Dd.out_ascii_opt: Dd.in
+ /usr/local/bin/nroff -c -mdoc -Tascii ${.ALLSRC} > ${.TARGET}
+
+groff-clean-opt:
+ rm -f TH.out_ascii_opt Dd.out_ascii_opt
diff --git a/regress/roff/de/TH.in b/regress/roff/de/TH.in
new file mode 100644
index 00000000..50b6401f
--- /dev/null
+++ b/regress/roff/de/TH.in
@@ -0,0 +1,8 @@
+.de BI
+.IB \\$1 \\$2 \\$3
+..
+.TH DE-TH 1 "June 3, 2012" OpenBSD
+.SH NAME
+de-TH - interaction of the TH macro with de requests
+.SH DESCRIPTION
+.BI bold italic bold
diff --git a/regress/roff/de/TH.out_ascii b/regress/roff/de/TH.out_ascii
new file mode 100644
index 00000000..35e1886a
--- /dev/null
+++ b/regress/roff/de/TH.out_ascii
@@ -0,0 +1,13 @@
+DE-TH(1) General Commands Manual DE-TH(1)
+
+
+
+NNAAMMEE
+ de-TH - interaction of the TH macro with de requests
+
+DDEESSCCRRIIPPTTIIOONN
+ bboolldd_i_t_a_l_i_cbboolldd
+
+
+
+OpenBSD June 3, 2012 DE-TH(1)
diff --git a/regress/roff/de/append.in b/regress/roff/de/append.in
new file mode 100644
index 00000000..cdc01bdd
--- /dev/null
+++ b/regress/roff/de/append.in
@@ -0,0 +1,25 @@
+.Dd July 7, 2014
+.Dt DE-APPEND 1
+.Os OpenBSD
+.Sh NAME
+.Nm de-append
+.Nd append to macro definitions
+.Sh DESCRIPTION
+de:
+.de mym
+.Ox
+..
+.mym
+am:
+.am mym
+.Nx
+..
+.mym
+ami:
+.ds myim mym
+.ds myie mye
+.ami myim myie
+.Fx
+.mye
+.mym
+end
diff --git a/regress/roff/de/append.out_ascii b/regress/roff/de/append.out_ascii
new file mode 100644
index 00000000..c5f4363c
--- /dev/null
+++ b/regress/roff/de/append.out_ascii
@@ -0,0 +1,9 @@
+DE-APPEND(1) General Commands Manual DE-APPEND(1)
+
+NNAAMMEE
+ ddee--aappppeenndd - append to macro definitions
+
+DDEESSCCRRIIPPTTIIOONN
+ de: OpenBSD am: OpenBSD NetBSD ami: OpenBSD NetBSD FreeBSD end
+
+OpenBSD July 7, 2014 OpenBSD
diff --git a/regress/roff/de/cond.in b/regress/roff/de/cond.in
new file mode 100644
index 00000000..057ad3a0
--- /dev/null
+++ b/regress/roff/de/cond.in
@@ -0,0 +1,13 @@
+.Dd January 7, 2015
+.Dt DE-COND 1
+.Os OpenBSD
+.Sh NAME
+.Nm de-cond
+.Nd conditional execution of a user-defined macro
+.Sh DESCRIPTION
+.de mym
+This is the text printed by the macro.
+..
+preceding text
+.if n .mym
+following text
diff --git a/regress/roff/de/cond.out_ascii b/regress/roff/de/cond.out_ascii
new file mode 100644
index 00000000..2f946407
--- /dev/null
+++ b/regress/roff/de/cond.out_ascii
@@ -0,0 +1,9 @@
+DE-COND(1) General Commands Manual DE-COND(1)
+
+NNAAMMEE
+ ddee--ccoonndd - conditional execution of a user-defined macro
+
+DDEESSCCRRIIPPTTIIOONN
+ preceding text This is the text printed by the macro. following text
+
+OpenBSD January 7, 2015 OpenBSD
diff --git a/regress/roff/de/escname.in b/regress/roff/de/escname.in
new file mode 100644
index 00000000..da6d885f
--- /dev/null
+++ b/regress/roff/de/escname.in
@@ -0,0 +1,43 @@
+.Dd June 29, 2014
+.Dt DE-ESCNAME 1
+.Os OpenBSD
+.Sh NAME
+.Nm de-escname
+.Nd escape sequences in macro names
+.Sh DESCRIPTION
+initial text
+.Pp
+define second = val2
+.de second
+val2
+..
+.Pp
+define first\esecond = val3
+.de first\\second end3
+val3
+.end3
+.Pp
+define first = val1
+.de first\esecond
+val1
+..
+.Pp
+Values (first, second, first\esecond):
+.first
+.second
+.first\\second
+.Pp
+Remove all but second:
+.rm first\\second first\esecond second
+.first
+.second
+.first\\second
+.Pp
+macro seperated from argument by an escape sequence:
+.de witharg end4 excess arguments
+.Dq \\$1
+.end4 tail argument
+.witharg\(enargument
+.Pp
+.de\e
+final text
diff --git a/regress/roff/de/escname.out_ascii b/regress/roff/de/escname.out_ascii
new file mode 100644
index 00000000..9a2d825a
--- /dev/null
+++ b/regress/roff/de/escname.out_ascii
@@ -0,0 +1,23 @@
+DE-ESCNAME(1) General Commands Manual DE-ESCNAME(1)
+
+NNAAMMEE
+ ddee--eessccnnaammee - escape sequences in macro names
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+
+ define second = val2
+
+ define first\second = val3
+
+ define first = val1
+
+ Values (first, second, first\second): val1 val2 val3
+
+ Remove all but second: val2
+
+ macro seperated from argument by an escape sequence: ``argument''
+
+ final text
+
+OpenBSD June 29, 2014 OpenBSD
diff --git a/regress/roff/de/escname.out_lint b/regress/roff/de/escname.out_lint
new file mode 100644
index 00000000..b4dd49a0
--- /dev/null
+++ b/regress/roff/de/escname.out_lint
@@ -0,0 +1,8 @@
+mandoc: escname.in:21:1: ERROR: escaped character not allowed in a name: first\e
+mandoc: escname.in:31:19: ERROR: escaped character not allowed in a name: first\e
+mandoc: escname.in:32:2: ERROR: skipping unknown macro: .first
+mandoc: escname.in:34:2: ERROR: skipping unknown macro: .first\\second
+mandoc: escname.in:37:5: ERROR: skipping excess arguments: .de ... excess arguments
+mandoc: escname.in:40:1: ERROR: escaped character not allowed in a name: witharg\(
+mandoc: escname.in:42:1: ERROR: escaped character not allowed in a name: de\e
+mandoc: escname.in:42:1: WARNING: skipping empty request: de
diff --git a/regress/roff/de/factorial.in b/regress/roff/de/factorial.in
new file mode 100644
index 00000000..8d83714b
--- /dev/null
+++ b/regress/roff/de/factorial.in
@@ -0,0 +1,31 @@
+.Dd December 30, 2014
+.Dt FACTORIAL 1
+.Os OpenBSD
+.Sh NAME
+.Nm factorial
+.Nd factorial sequence
+.Sh DESCRIPTION
+.\" recursively calculate a single factorial
+.de rfac
+. ie \\$1>1 \{\
+. No \\$1 *
+. nr i \\$1-1
+. rfac \\ni
+. nr acc \\n[acc]*\\$1
+. \}
+. el .nr acc 1
+..
+.\" recursively print a sequence of factorials
+.de fac
+. No \\$1! =
+. rfac \\$1
+. if \\$1>1 1 =
+. No \\n[acc]
+. if \\$1 \{\
+. br
+. nr i \\$1-1
+. fac \\ni
+. \}
+..
+.\" main program
+.fac 9
diff --git a/regress/roff/de/factorial.out_ascii b/regress/roff/de/factorial.out_ascii
new file mode 100644
index 00000000..cdc019ed
--- /dev/null
+++ b/regress/roff/de/factorial.out_ascii
@@ -0,0 +1,18 @@
+FACTORIAL(1) General Commands Manual FACTORIAL(1)
+
+NNAAMMEE
+ ffaaccttoorriiaall - factorial sequence
+
+DDEESSCCRRIIPPTTIIOONN
+ 9! = 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 362880
+ 8! = 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 40320
+ 7! = 7 * 6 * 5 * 4 * 3 * 2 * 1 = 5040
+ 6! = 6 * 5 * 4 * 3 * 2 * 1 = 720
+ 5! = 5 * 4 * 3 * 2 * 1 = 120
+ 4! = 4 * 3 * 2 * 1 = 24
+ 3! = 3 * 2 * 1 = 6
+ 2! = 2 * 1 = 2
+ 1! = 1
+ 0! = 1
+
+OpenBSD December 30, 2014 OpenBSD
diff --git a/regress/roff/de/indir.in b/regress/roff/de/indir.in
new file mode 100644
index 00000000..13d10071
--- /dev/null
+++ b/regress/roff/de/indir.in
@@ -0,0 +1,30 @@
+.Dd July 7, 2014
+.Dt DE-INDIR 1
+.Os OpenBSD
+.Sh NAME
+.Nm de-indir
+.Nd indirect macro definitions
+.Sh DESCRIPTION
+full dei:
+.ds myim mym
+.ds myie mye
+.dei myim myie
+text1
+.mye
+.mym
+.br
+dei with undefined second argument:
+.rm myie mym
+.dei myim myie
+text2
+..
+.mym
+.br
+dei with undefined first argument:
+.rm myim mym
+.dei myim
+text3
+.br
+dei without arguments:
+.dei
+text4
diff --git a/regress/roff/de/indir.out_ascii b/regress/roff/de/indir.out_ascii
new file mode 100644
index 00000000..4cb592b1
--- /dev/null
+++ b/regress/roff/de/indir.out_ascii
@@ -0,0 +1,12 @@
+DE-INDIR(1) General Commands Manual DE-INDIR(1)
+
+NNAAMMEE
+ ddee--iinnddiirr - indirect macro definitions
+
+DDEESSCCRRIIPPTTIIOONN
+ full dei: text1
+ dei with undefined second argument: text2
+ dei with undefined first argument: text3
+ dei without arguments: text4
+
+OpenBSD July 7, 2014 OpenBSD
diff --git a/regress/roff/de/indir.out_lint b/regress/roff/de/indir.out_lint
new file mode 100644
index 00000000..43194fea
--- /dev/null
+++ b/regress/roff/de/indir.out_lint
@@ -0,0 +1,4 @@
+mandoc: indir.in:18:11: WARNING: undefined string, using "": myie
+mandoc: indir.in:25:6: WARNING: undefined string, using "": myim
+mandoc: indir.in:25:1: WARNING: skipping empty request: dei
+mandoc: indir.in:29:1: WARNING: skipping empty request: dei
diff --git a/regress/roff/de/startde.in b/regress/roff/de/startde.in
new file mode 100644
index 00000000..ca9cfac1
--- /dev/null
+++ b/regress/roff/de/startde.in
@@ -0,0 +1,24 @@
+.Dd December 30, 2014
+.Dt DE-STARTDE 1
+.Os OpenBSD
+.Sh NAME
+.Nm de-startde
+.Nd macro starting a macro definition, but not ending it
+.Sh DESCRIPTION
+define outer macro:
+.de outer
+outer macro called; define inner macro:
+.de inner
+inner macro called; end outer scope.
+..
+outer scope ended; outer macro now defined.
+.Pp
+call outer macro:
+.outer
+returned from call of outer macro; end inner scope.
+..
+inner scope ended; inner macro now defined.
+.Pp
+call inner macro:
+.inner
+returned from call of inner macro.
diff --git a/regress/roff/de/startde.out_ascii b/regress/roff/de/startde.out_ascii
new file mode 100644
index 00000000..05b58e8c
--- /dev/null
+++ b/regress/roff/de/startde.out_ascii
@@ -0,0 +1,15 @@
+DE-STARTDE(1) General Commands Manual DE-STARTDE(1)
+
+NNAAMMEE
+ ddee--ssttaarrttddee - macro starting a macro definition, but not ending it
+
+DDEESSCCRRIIPPTTIIOONN
+ define outer macro: outer scope ended; outer macro now defined.
+
+ call outer macro: outer macro called; define inner macro: inner scope
+ ended; inner macro now defined.
+
+ call inner macro: inner macro called; end outer scope. returned from
+ call of outer macro; end inner scope. returned from call of inner macro.
+
+OpenBSD December 30, 2014 OpenBSD
diff --git a/regress/roff/ds/Makefile b/regress/roff/ds/Makefile
new file mode 100644
index 00000000..98a93d75
--- /dev/null
+++ b/regress/roff/ds/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.5 2014/06/29 22:12:54 schwarze Exp $
+
+REGRESS_TARGETS = append escname nested quoting
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/ds/append.in b/regress/roff/ds/append.in
new file mode 100644
index 00000000..6efa46ba
--- /dev/null
+++ b/regress/roff/ds/append.in
@@ -0,0 +1,17 @@
+.Dd February 4, 2014
+.Dt DS-APPEND 1
+.Os OpenBSD
+.Sh NAME
+.Nm ds-append
+.Nd appending to user-defined strings
+.Sh DESCRIPTION
+.ds foo first part
+first part: \*[foo]
+.br
+.as foo " second part
+with second part: \*[foo]
+.br
+.as foo " third part
+with third part: \*[foo]
+.br
+end of test document
diff --git a/regress/roff/ds/append.out_ascii b/regress/roff/ds/append.out_ascii
new file mode 100644
index 00000000..47c68aa3
--- /dev/null
+++ b/regress/roff/ds/append.out_ascii
@@ -0,0 +1,12 @@
+DS-APPEND(1) General Commands Manual DS-APPEND(1)
+
+NNAAMMEE
+ ddss--aappppeenndd - appending to user-defined strings
+
+DDEESSCCRRIIPPTTIIOONN
+ first part: first part
+ with second part: first part second part
+ with third part: first part second part third part
+ end of test document
+
+OpenBSD February 4, 2014 OpenBSD
diff --git a/regress/roff/ds/escname.in b/regress/roff/ds/escname.in
new file mode 100644
index 00000000..6394144b
--- /dev/null
+++ b/regress/roff/ds/escname.in
@@ -0,0 +1,14 @@
+.Dd June 29, 2014
+.Dt DS-ESCNAME 1
+.Os OpenBSD
+.Sh NAME
+.Nm ds-escname
+.Nd escape sequences in string names
+.Sh DESCRIPTION
+.ds std\\esc stdval
+Now \e*[std\\esc] is
+.Sq \*[std\\esc] .
+.Pp
+.ds esc\eesc escval
+Now \e*[esc] is
+.Sq \*[esc] .
diff --git a/regress/roff/ds/escname.out_ascii b/regress/roff/ds/escname.out_ascii
new file mode 100644
index 00000000..3648b19b
--- /dev/null
+++ b/regress/roff/ds/escname.out_ascii
@@ -0,0 +1,11 @@
+DS-ESCNAME(1) General Commands Manual DS-ESCNAME(1)
+
+NNAAMMEE
+ ddss--eessccnnaammee - escape sequences in string names
+
+DDEESSCCRRIIPPTTIIOONN
+ Now \*[std\esc] is `stdval'.
+
+ Now \*[esc] is `'.
+
+OpenBSD June 29, 2014 OpenBSD
diff --git a/regress/roff/ds/nested.in b/regress/roff/ds/nested.in
new file mode 100644
index 00000000..a213b157
--- /dev/null
+++ b/regress/roff/ds/nested.in
@@ -0,0 +1,14 @@
+.Dd April 7, 2010
+.Dt DS-NESTED 1
+.Os OpenBSD
+.Sh NAME
+.Nm ds-nested
+.Nd nested string expansion
+.Sh DESCRIPTION
+.ds foo bar
+.ds bar output
+This is the \*[\*[foo]].
+.Pp
+.ds pi surprising
+This is \*[\*[Pi]].
+This is \*(\*(Pi.
diff --git a/regress/roff/ds/nested.out_ascii b/regress/roff/ds/nested.out_ascii
new file mode 100644
index 00000000..50d51619
--- /dev/null
+++ b/regress/roff/ds/nested.out_ascii
@@ -0,0 +1,11 @@
+DS-NESTED(1) General Commands Manual DS-NESTED(1)
+
+NNAAMMEE
+ ddss--nneesstteedd - nested string expansion
+
+DDEESSCCRRIIPPTTIIOONN
+ This is the output.
+
+ This is surprising. This is surprising.
+
+OpenBSD April 7, 2010 OpenBSD
diff --git a/regress/roff/ds/quoting.in b/regress/roff/ds/quoting.in
new file mode 100644
index 00000000..3e794d09
--- /dev/null
+++ b/regress/roff/ds/quoting.in
@@ -0,0 +1,32 @@
+.Dd August 3, 2010
+.Dt DS-QUOTING 1
+.Os OpenBSD
+.Sh NAME
+.Nm ds-quoting
+.Nd quote handling by the define string request
+.Sh DESCRIPTION
+.ds foo initial definition
+no quoting: \*[foo]
+.br
+.ds foo redefinition
+still no quoting: \*[foo]
+.br
+.ds foo "string value
+leading quotes: \*[foo]
+.br
+.ds foo "string value"
+leading and trailing quotes: \*[foo]
+.br
+.ds foo "string" value
+leading and middle quotes: \*[foo]
+.br
+.ds foo 'string value"
+leading apostrophe, trailing quotes: \*[foo]
+.br
+.ds foo string value"
+leading blank, trailing quotes: \*[foo]
+.br
+.ds foo
+empty string: x\*[foo]x
+.br
+end of test document
diff --git a/regress/roff/ds/quoting.out_ascii b/regress/roff/ds/quoting.out_ascii
new file mode 100644
index 00000000..636743db
--- /dev/null
+++ b/regress/roff/ds/quoting.out_ascii
@@ -0,0 +1,17 @@
+DS-QUOTING(1) General Commands Manual DS-QUOTING(1)
+
+NNAAMMEE
+ ddss--qquuoottiinngg - quote handling by the define string request
+
+DDEESSCCRRIIPPTTIIOONN
+ no quoting: initial definition
+ still no quoting: redefinition
+ leading quotes: string value
+ leading and trailing quotes: string value"
+ leading and middle quotes: string" value
+ leading apostrophe, trailing quotes: 'string value"
+ leading blank, trailing quotes: string value"
+ empty string: xx
+ end of test document
+
+OpenBSD August 3, 2010 OpenBSD
diff --git a/regress/roff/esc/B.in b/regress/roff/esc/B.in
new file mode 100644
index 00000000..97ac39c5
--- /dev/null
+++ b/regress/roff/esc/B.in
@@ -0,0 +1,36 @@
+.Dd July 6, 2014
+.Dt ESC-B 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-B
+.Nd the roff escape B sequence: validate numerical expression
+.Sh DESCRIPTION
+empty: \B''
+.br
+digit: \B'0'
+.br
+no number: \B'no number'
+.br
+trailing garbage: \B'1X'
+.br
+trailing operator: \B'1+'
+.br
+infix operator: \B'1+1'
+.br
+infix and trailing operator: \B'1+1+'
+.br
+chain of operations: \B'1+2+3+4'
+.br
+trailing para: \B'1+('
+.br
+unclosed para: \B'(1'
+.br
+empty pair of parentheses: \B'()'
+.br
+parentheses containing number: \B'(42)'
+.br
+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/roff/esc/B.out_ascii b/regress/roff/esc/B.out_ascii
new file mode 100644
index 00000000..c84490a2
--- /dev/null
+++ b/regress/roff/esc/B.out_ascii
@@ -0,0 +1,23 @@
+ESC-B(1) General Commands Manual ESC-B(1)
+
+NNAAMMEE
+ eesscc--BB - the roff escape B sequence: validate numerical expression
+
+DDEESSCCRRIIPPTTIIOONN
+ empty: 0
+ digit: 1
+ no number: 0
+ trailing garbage: 0
+ trailing operator: 0
+ infix operator: 1
+ infix and trailing operator: 0
+ chain of operations: 1
+ trailing para: 0
+ unclosed para: 0
+ empty pair of parentheses: 0
+ parentheses containing number: 1
+ complex expression: 1
+ other delimiter: 1
+ no closing delimiter: 0
+
+OpenBSD July 6, 2014 OpenBSD
diff --git a/regress/roff/esc/B.out_lint b/regress/roff/esc/B.out_lint
new file mode 100644
index 00000000..6159b1c5
--- /dev/null
+++ b/regress/roff/esc/B.out_lint
@@ -0,0 +1 @@
+mandoc: B.in:36:23: WARNING: invalid escape sequence: \B'1+1
diff --git a/regress/roff/esc/Makefile b/regress/roff/esc/Makefile
new file mode 100644
index 00000000..f0860368
--- /dev/null
+++ b/regress/roff/esc/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.11 2015/04/29 18:32:57 schwarze Exp $
+
+REGRESS_TARGETS = one two multi B c c_man e f h o w z ignore
+LINT_TARGETS = B h w ignore
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/esc/c.in b/regress/roff/esc/c.in
new file mode 100644
index 00000000..c3b7a912
--- /dev/null
+++ b/regress/roff/esc/c.in
@@ -0,0 +1,17 @@
+.Dd December 2, 2014
+.Dt ESC-C 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-c
+.Nd the roff escape c sequence: remove trailing space
+.Sh DESCRIPTION
+No space between
+.Dq one
+and
+.Dq word :
+one\c
+word
+.Bd -literal
+one\c
+word
+.Ed
diff --git a/regress/roff/esc/c.out_ascii b/regress/roff/esc/c.out_ascii
new file mode 100644
index 00000000..5ddc8443
--- /dev/null
+++ b/regress/roff/esc/c.out_ascii
@@ -0,0 +1,11 @@
+ESC-C(1) General Commands Manual ESC-C(1)
+
+NNAAMMEE
+ eesscc--cc - the roff escape c sequence: remove trailing space
+
+DDEESSCCRRIIPPTTIIOONN
+ No space between ``one'' and ``word'': oneword
+
+ oneword
+
+OpenBSD December 2, 2014 OpenBSD
diff --git a/regress/roff/esc/c_man.in b/regress/roff/esc/c_man.in
new file mode 100644
index 00000000..c18fad10
--- /dev/null
+++ b/regress/roff/esc/c_man.in
@@ -0,0 +1,12 @@
+.TH ESC-C_MAN 1 "December 2, 2014" OpenBSD
+.SH NAME
+esc-c_man \- the roff escape c sequence: remove trailing space
+.SH DESCRIPTION
+No space between "one" and "word":
+one\c
+word
+.nf
+one\c
+word
+.fi
+final text
diff --git a/regress/roff/esc/c_man.out_ascii b/regress/roff/esc/c_man.out_ascii
new file mode 100644
index 00000000..d00b1b48
--- /dev/null
+++ b/regress/roff/esc/c_man.out_ascii
@@ -0,0 +1,15 @@
+ESC-C_MAN(1) General Commands Manual ESC-C_MAN(1)
+
+
+
+NNAAMMEE
+ esc-c_man - the roff escape c sequence: remove trailing space
+
+DDEESSCCRRIIPPTTIIOONN
+ No space between "one" and "word": oneword
+ oneword
+ final text
+
+
+
+OpenBSD December 2, 2014 ESC-C_MAN(1)
diff --git a/regress/roff/esc/e.in b/regress/roff/esc/e.in
new file mode 100644
index 00000000..c0f87692
--- /dev/null
+++ b/regress/roff/esc/e.in
@@ -0,0 +1,19 @@
+.Dd December 3, 2014
+.Dt ESC-E 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-e
+.Nd escaping backslashes
+.Sh DESCRIPTION
+In plain text: "\e" and "\\"
+.Pp
+On macro lines:
+.Qq \e(at
+and
+.Qq \\(at
+.Pp
+In a macro definition:
+.de mytest
+"\e$1" and "\\$2"
+..
+.mytest one two
diff --git a/regress/roff/esc/e.out_ascii b/regress/roff/esc/e.out_ascii
new file mode 100644
index 00000000..75665168
--- /dev/null
+++ b/regress/roff/esc/e.out_ascii
@@ -0,0 +1,13 @@
+ESC-E(1) General Commands Manual ESC-E(1)
+
+NNAAMMEE
+ eesscc--ee - escaping backslashes
+
+DDEESSCCRRIIPPTTIIOONN
+ In plain text: "\" and "\"
+
+ On macro lines: "\(at" and "@"
+
+ In a macro definition: "\$1" and "two"
+
+OpenBSD December 3, 2014 OpenBSD
diff --git a/regress/roff/esc/f.in b/regress/roff/esc/f.in
new file mode 100644
index 00000000..a909ac8a
--- /dev/null
+++ b/regress/roff/esc/f.in
@@ -0,0 +1,12 @@
+.Dd August 7, 2013
+.Dt ESC-F 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-f
+.Nd the roff escape f sequence: font changes
+.Sh DESCRIPTION
+numbers: \f3bold\f2italic\f1roman
+.br
+letters: \fBbold\fIitalic\fPback\f(BIbolditalic\fRroman
+.br
+multiletter: \f[B]bold\f[I]italic\f[P]back\f[BI]bolditalic\f[R]roman
diff --git a/regress/roff/esc/f.out_ascii b/regress/roff/esc/f.out_ascii
new file mode 100644
index 00000000..5ecd6993
--- /dev/null
+++ b/regress/roff/esc/f.out_ascii
@@ -0,0 +1,11 @@
+ESC-F(1) General Commands Manual ESC-F(1)
+
+NNAAMMEE
+ eesscc--ff - the roff escape f sequence: font changes
+
+DDEESSCCRRIIPPTTIIOONN
+ numbers: bboolldd_i_t_a_l_i_croman
+ letters: bboolldd_i_t_a_l_i_cbbaacckk_bb_oo_ll_dd_ii_tt_aa_ll_ii_ccroman
+ multiletter: bboolldd_i_t_a_l_i_cbbaacckk_bb_oo_ll_dd_ii_tt_aa_ll_ii_ccroman
+
+OpenBSD August 7, 2013 OpenBSD
diff --git a/regress/roff/esc/h.in b/regress/roff/esc/h.in
new file mode 100644
index 00000000..31fbb4e2
--- /dev/null
+++ b/regress/roff/esc/h.in
@@ -0,0 +1,18 @@
+.Dd May 28, 2012
+.Dt ESC-H 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-h
+.Nd the roff escape h sequence: horizontal movement
+.Sh DESCRIPTION
+simple: >\h'0'<
+.br
+escape only: >\h'\w'\&''<
+.br
+escape at the end: >\h'0+\w'\&''<
+.br
+escape at the beginning: >\h'\w'\&'+0'<
+.br
+escape in the middle: >\h'0+\w'\&'+0'<
+.br
+invalid delimiter: >\h-<
diff --git a/regress/roff/esc/h.out_ascii b/regress/roff/esc/h.out_ascii
new file mode 100644
index 00000000..858dcf32
--- /dev/null
+++ b/regress/roff/esc/h.out_ascii
@@ -0,0 +1,14 @@
+ESC-H(1) General Commands Manual ESC-H(1)
+
+NNAAMMEE
+ eesscc--hh - the roff escape h sequence: horizontal movement
+
+DDEESSCCRRIIPPTTIIOONN
+ simple: ><
+ escape only: ><
+ escape at the end: ><
+ escape at the beginning: ><
+ escape in the middle: ><
+ invalid delimiter: ><
+
+OpenBSD May 28, 2012 OpenBSD
diff --git a/regress/roff/esc/h.out_lint b/regress/roff/esc/h.out_lint
new file mode 100644
index 00000000..6d591e38
--- /dev/null
+++ b/regress/roff/esc/h.out_lint
@@ -0,0 +1 @@
+mandoc: h.in:18:21: WARNING: invalid escape sequence: \h-
diff --git a/regress/roff/esc/ignore.in b/regress/roff/esc/ignore.in
new file mode 100644
index 00000000..4be7fb6c
--- /dev/null
+++ b/regress/roff/esc/ignore.in
@@ -0,0 +1,14 @@
+.Dd January 1, 2015
+.Dt ESC-IGNORE 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-ignore
+.Nd ignored roff escape sequences
+.Sh DESCRIPTION
+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/roff/esc/ignore.out_ascii b/regress/roff/esc/ignore.out_ascii
new file mode 100644
index 00000000..5e41d49a
--- /dev/null
+++ b/regress/roff/esc/ignore.out_ascii
@@ -0,0 +1,12 @@
+ESC-IGNORE(1) General Commands Manual ESC-IGNORE(1)
+
+NNAAMMEE
+ eesscc--iiggnnoorree - ignored roff escape sequences
+
+DDEESSCCRRIIPPTTIIOONN
+ multiform: abcd
+ quoted: abc
+ sizes: abcdef
+ signed sizes: abcdef
+
+OpenBSD January 1, 2015 OpenBSD
diff --git a/regress/roff/esc/ignore.out_lint b/regress/roff/esc/ignore.out_lint
new file mode 100644
index 00000000..c163d60d
--- /dev/null
+++ b/regress/roff/esc/ignore.out_lint
@@ -0,0 +1 @@
+mandoc: ignore.in:14:60: WARNING: invalid escape sequence: \s-
diff --git a/regress/roff/esc/multi.in b/regress/roff/esc/multi.in
new file mode 100644
index 00000000..a2a76db1
--- /dev/null
+++ b/regress/roff/esc/multi.in
@@ -0,0 +1,10 @@
+.Dd May 28, 2012
+.Dt ESC-MULTI 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-multi
+.Nd roff multi-character escape sequences
+.Sh DESCRIPTION
+\[tno] \[t+-] \[tmu] \[tdi] \[12] \[14] \[34]
+.br
+\C'tno' \C't+-' \C'tmu' \C'tdi' \C'12' \C'14' \C'34'
diff --git a/regress/roff/esc/multi.out_ascii b/regress/roff/esc/multi.out_ascii
new file mode 100644
index 00000000..a7b64602
--- /dev/null
+++ b/regress/roff/esc/multi.out_ascii
@@ -0,0 +1,10 @@
+ESC-MULTI(1) General Commands Manual ESC-MULTI(1)
+
+NNAAMMEE
+ eesscc--mmuullttii - roff multi-character escape sequences
+
+DDEESSCCRRIIPPTTIIOONN
+ ~ +- x -:- 1/2 1/4 3/4
+ ~ +- x -:- 1/2 1/4 3/4
+
+OpenBSD May 28, 2012 OpenBSD
diff --git a/regress/roff/esc/o.in b/regress/roff/esc/o.in
new file mode 100644
index 00000000..2976a9d8
--- /dev/null
+++ b/regress/roff/esc/o.in
@@ -0,0 +1,18 @@
+.Dd January 21, 2015
+.Dt ESC-O 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-o
+.Nd the roff escape o sequence: overstrike
+.Sh DESCRIPTION
+empty: x\o''x
+.br
+one character: x\o'|'x
+.br
+wide/narrow: x\o'O|'x
+.br
+narrow/wide: x\o'|O'x
+.br
+wide/narrow/narrow: x\o'O-|'x
+.br
+narrow/narrow/wide: x\o'|-O'x
diff --git a/regress/roff/esc/o.out_ascii b/regress/roff/esc/o.out_ascii
new file mode 100644
index 00000000..39dc1b1c
--- /dev/null
+++ b/regress/roff/esc/o.out_ascii
@@ -0,0 +1,14 @@
+ESC-O(1) General Commands Manual ESC-O(1)
+
+NNAAMMEE
+ eesscc--oo - the roff escape o sequence: overstrike
+
+DDEESSCCRRIIPPTTIIOONN
+ empty: xx
+ one character: x|x
+ wide/narrow: xO|x
+ narrow/wide: x|Ox
+ wide/narrow/narrow: xO-|x
+ narrow/narrow/wide: x|-Ox
+
+OpenBSD January 21, 2015 OpenBSD
diff --git a/regress/roff/esc/one.in b/regress/roff/esc/one.in
new file mode 100644
index 00000000..4d416d2a
--- /dev/null
+++ b/regress/roff/esc/one.in
@@ -0,0 +1,16 @@
+.Dd October 27, 2014
+.Dt ESC-ONE 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-one
+.Nd roff one-character escape sequences
+.Sh DESCRIPTION
+backslash: >\e<
+.br
+minus: >\-<
+.br
+acute: >\'<
+.br
+grave: >\`<
+.br
+normal character: >\q<
diff --git a/regress/roff/esc/one.out_ascii b/regress/roff/esc/one.out_ascii
new file mode 100644
index 00000000..1324e038
--- /dev/null
+++ b/regress/roff/esc/one.out_ascii
@@ -0,0 +1,13 @@
+ESC-ONE(1) General Commands Manual ESC-ONE(1)
+
+NNAAMMEE
+ eesscc--oonnee - roff one-character escape sequences
+
+DDEESSCCRRIIPPTTIIOONN
+ backslash: >\<
+ minus: >-<
+ acute: >'<
+ grave: >`<
+ normal character: >q<
+
+OpenBSD October 27, 2014 OpenBSD
diff --git a/regress/roff/esc/two.in b/regress/roff/esc/two.in
new file mode 100644
index 00000000..c6ac3eee
--- /dev/null
+++ b/regress/roff/esc/two.in
@@ -0,0 +1,75 @@
+.Dd October 28, 2014
+.Dt ESC-TWO 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-two
+.Nd roff two-character escape sequences
+.Sh DESCRIPTION
+lines: \(ba \(br \(ul \(bb \(sl \(rs
+.\" groff doesn't know \(rl
+.br
+markers: \(bu \(lz \(sq \(lh \(rh \(at \(sh \(CR
+.\" the circle \(ci differs
+.\" the daggers \(dd and \(dg use backspace
+.\" \(ps and \(sc intentionally differ
+.\" groff doesn't know \(OK
+.br
+legal: \(co \(rg \(tm
+.br
+punctuation: \(em \(en \(hy
+.\" the inverted punctuation is intentionally different
+.br
+quotes: \(Bq \(bq \(oq \(cq \(aq \(dq \(Fo \(Fc \(fo \(fc
+.\" the double quotes \(lq and \(rq differ
+.br
+brackets: \(lB \(rB \(lC \(rC \(la \(ra \(bv \(lt \(lk \(rt \(rk \(rb
+.\" the left bottom \(lb differs
+.br
+arrows: \(<- \(-> \(lA \(rA \(hA
+.\" the left-right arrow \(<> differs
+.\" groff doesn't know \(va and \(vA
+.\" the vertical arrows \(da, \(ua, \(uA, \(dA use backspace
+.br
+logical: \(AN \(OR \(no \(te \(st \(tf \(3d \(or
+.\" the universal quantifier \(fa uses backspace
+.br
+mathematical: \(pl \(mi \(-+ \(+- \(pc \(mu \(di \(f/ \(**
+\(<= \(>= \(<< \(>> \(eq \(!= \(== \(ne \(=~ \(ap \(~~ \(~= \(pt
+\(es \(mo \(sb \(sp \(ca \(cu
+\(sr \(lc \(rc \(lf \(rf \(if \(Ah \(Im \(Re \(pd
+.\" groff doesn't know \(-~, \(nb, \(nc, \(-h
+.\" these differ: \(nm \(ib \(ip \(/_ \(pp \(gr
+.\" these use backspace: \(c* \(c+ \(is
+.br
+ligatures: \(ff \(fi \(fl \(Fi \(Fl \(AE \(ae \(OE \(oe \(IJ \(ij
+.\" the German eszett \(ss differs
+.br
+accents: \(a" \(a^ \(aa \(ga \(ab \(ac \(ad \(ah \(ao \(a~ \(ho \(ha \(ti
+.\" the macron \(a- differs
+.\" groff doesn't know \(a.
+.br
+accented and special letters:
+\('A \('E \('I \('O \('U \('a \('e \('i \('o \('u
+\(`A \(`E \(`I \(`O \(`U \(`a \(`e \(`i \(`o \(`u
+\(~A \(~N \(~O \(~a \(~n \(~o
+\(:A \(:E \(:I \(:O \(:U \(:a \(:e \(:i \(:o \(:u \(:y
+\(^A \(^E \(^I \(^O \(^U \(^a \(^e \(^i \(^o \(^u
+\(,C \(,c \(/L \(/l \(/O \(/o \(oA \(oa \(-D \(.i
+.\" these intentionally differ: \(Sd \(TP \(Tp
+.\" groff doesn't know \(.j
+.br
+currency: \(Do \(ct \(Eu \(eu \(Ye \(Fo
+.\" uses backspace: \(Cs
+.\" the GB pound \(Po is intentionally different
+.br
+units: \(fm \(mc
+.\" groff doesn't know \(%O
+.\" \(sd differs
+.\" \(de is intentionally different
+.br
+greek letters: \(*A \(*B \*D \(*E \(*Z \(*Y \*H \(*I \(*K \(*L
+\(*M \(*N \*C \(*O \(*P \(*R \(*T \(*U \*F \(*X \(*Q \(*W
+\(*a \(*b \(*g \(*d \(*e \(*z \(*y \(*h \(*i \(*k \(*l
+\(*m \(*n \(*c \(*o \(*p \(*r \(*s \(*t \(*u \(*f \(*x \(*q \(*w
+\(+h \(+f \+p \(+e \(ts
+.\" these differ: \(*G \(*S
diff --git a/regress/roff/esc/two.out_ascii b/regress/roff/esc/two.out_ascii
new file mode 100644
index 00000000..238adffa
--- /dev/null
+++ b/regress/roff/esc/two.out_ascii
@@ -0,0 +1,26 @@
+ESC-TWO(1) General Commands Manual ESC-TWO(1)
+
+NNAAMMEE
+ eesscc--ttwwoo - roff two-character escape sequences
+
+DDEESSCCRRIIPPTTIIOONN
+ lines: | | _ | / \
+ markers: +o <> [] <= => @ # _|
+ legal: (C) (R) tm
+ punctuation: -- - -
+ quotes: ,, , ` ' ' " << >> < >
+ brackets: [ ] { } < > | ,- { -. } -'
+ arrows: <- -> <= => <=>
+ logical: ^ v ~ 3 -) .:. .:. |
+ mathematical: + - -+ +- . x -:- / * <= >= << >> = != == !== =~ ~ ~~ ~= oc
+ {} E (= =) (^) U \/ |~ ~| |_ _| oo N I R a
+ ligatures: ff fi fl ffi ffl AE ae OE oe IJ ij
+ accents: " ^ ' ` '` , " v o ~ , ^ ~
+ accented and special letters: 'A 'E 'I 'O 'U 'a 'e 'i 'o 'u `A `E `I `O `U `a `e `i `o `u ~A ~N
+ ~O ~a ~n ~o "A "E "I "O "U "a "e "i "o "u "y ^A ^E ^I ^O ^U ^a ^e ^i ^o ^u ,C ,c /L /l /O /o oA oa -D i
+ currency: $ /c EUR EUR =Y <<
+ units: ' ,u
+ greek letters: A B E Z H I K /\ M N O TT P T Y X IY _O a B y d e ,C n -0
+ i k >\ ,u v ,E o -n p -o ~t u |o x |u w -0 |o +p e s
+
+OpenBSD October 28, 2014 OpenBSD
diff --git a/regress/roff/esc/w.in b/regress/roff/esc/w.in
new file mode 100644
index 00000000..4a9e79f8
--- /dev/null
+++ b/regress/roff/esc/w.in
@@ -0,0 +1,16 @@
+.Dd April 8, 2014
+.Dt ESC-W 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-w
+.Nd the roff escape w sequence: text width
+.Sh DESCRIPTION
+empty: \w''
+.br
+character: \w'n'
+.br
+blank: \w' '
+.br
+text: \w'text'
+.br
+unterminated: \w'foo
diff --git a/regress/roff/esc/w.out_ascii b/regress/roff/esc/w.out_ascii
new file mode 100644
index 00000000..1d44a2e0
--- /dev/null
+++ b/regress/roff/esc/w.out_ascii
@@ -0,0 +1,13 @@
+ESC-W(1) General Commands Manual ESC-W(1)
+
+NNAAMMEE
+ eesscc--ww - the roff escape w sequence: text width
+
+DDEESSCCRRIIPPTTIIOONN
+ empty: 0
+ character: 24
+ blank: 24
+ text: 96
+ unterminated: 72
+
+OpenBSD April 8, 2014 OpenBSD
diff --git a/regress/roff/esc/w.out_lint b/regress/roff/esc/w.out_lint
new file mode 100644
index 00000000..a1b91722
--- /dev/null
+++ b/regress/roff/esc/w.out_lint
@@ -0,0 +1 @@
+mandoc: w.in:16:15: WARNING: invalid escape sequence: \w'foo
diff --git a/regress/roff/esc/z.in b/regress/roff/esc/z.in
new file mode 100644
index 00000000..9d3ad1d5
--- /dev/null
+++ b/regress/roff/esc/z.in
@@ -0,0 +1,24 @@
+.Dd April 29, 2015
+.Dt ESC-Z 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-z
+.Nd the roff escape z sequence
+.Sh DESCRIPTION
+single z with ASCII char: >\zx<
+.br
+single z with escape char: >\z\(ci<
+.br
+.ds mystr mytext
+single z with defined string (\*[mystr]): >\z\*[mystr]<
+.br
+single z with font escape: >\z\fBxbold\fP<
+.br
+single z with nospace escape: >\z\c
+new line<
+.br
+single z with overstrike: >\z\o'ab'c<
+.br
+single z near the end of the line: >\z<
+.br
+double z: >\z\zx<
diff --git a/regress/roff/esc/z.out_ascii b/regress/roff/esc/z.out_ascii
new file mode 100644
index 00000000..233a4aa5
--- /dev/null
+++ b/regress/roff/esc/z.out_ascii
@@ -0,0 +1,16 @@
+ESC-Z(1) General Commands Manual ESC-Z(1)
+
+NNAAMMEE
+ eesscc--zz - the roff escape z sequence
+
+DDEESSCCRRIIPPTTIIOONN
+ single z with ASCII char: >x<
+ single z with escape char: >O<
+ single z with defined string (mytext): >mytext<
+ single z with font escape: >xxbboolldd<
+ single z with nospace escape: > new line<
+ single z with overstrike: >abc<
+ single z near the end of the line: ><
+ double z: >x<
+
+OpenBSD April 29, 2015 OpenBSD
diff --git a/regress/roff/ft/Makefile b/regress/roff/ft/Makefile
new file mode 100644
index 00000000..f57fe72b
--- /dev/null
+++ b/regress/roff/ft/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2014/07/05 12:33:54 schwarze Exp $
+
+REGRESS_TARGETS = badargs
+LINT_TARGETS = badargs
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/ft/badargs.in b/regress/roff/ft/badargs.in
new file mode 100644
index 00000000..2cb01b20
--- /dev/null
+++ b/regress/roff/ft/badargs.in
@@ -0,0 +1,15 @@
+.TH "FT-BADARGS" 1 "July 5, 2014" OpenBSD
+.SH NAME
+ft-badargs \(en font request with bad arguments
+.SH DESCRIPTION
+default font
+.ft B
+bold
+.ft foo
+still bold
+.ft I bogus
+italic
+.ft P
+back to bold
+.ft
+back to italic
diff --git a/regress/roff/ft/badargs.out_ascii b/regress/roff/ft/badargs.out_ascii
new file mode 100644
index 00000000..30bfed3c
--- /dev/null
+++ b/regress/roff/ft/badargs.out_ascii
@@ -0,0 +1,13 @@
+FT-BADARGS(1) General Commands Manual FT-BADARGS(1)
+
+
+
+NNAAMMEE
+ ft-badargs - font request with bad arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ default font bboolldd ssttiillll bboolldd _i_t_a_l_i_c bbaacckk ttoo bboolldd _b_a_c_k _t_o _i_t_a_l_i_c
+
+
+
+OpenBSD July 5, 2014 FT-BADARGS(1)
diff --git a/regress/roff/ft/badargs.out_lint b/regress/roff/ft/badargs.out_lint
new file mode 100644
index 00000000..f84d7ea9
--- /dev/null
+++ b/regress/roff/ft/badargs.out_lint
@@ -0,0 +1,2 @@
+mandoc: badargs.in:10:7: ERROR: skipping excess arguments: ft ... bogus
+mandoc: badargs.in:8:2: WARNING: unknown font, skipping request: ft foo
diff --git a/regress/roff/ig/Makefile b/regress/roff/ig/Makefile
new file mode 100644
index 00000000..93e5e41e
--- /dev/null
+++ b/regress/roff/ig/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2014/07/07 11:34:41 schwarze Exp $
+
+REGRESS_TARGETS = basic
+LINT_TARGETS = basic
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/ig/basic.in b/regress/roff/ig/basic.in
new file mode 100644
index 00000000..7e898832
--- /dev/null
+++ b/regress/roff/ig/basic.in
@@ -0,0 +1,27 @@
+.Dd July 7, 2014
+.Dt IG-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm ig-basic
+.Nd ignored blocks
+.Sh DESCRIPTION
+no arguments
+.ig
+ignored text
+..
+.br
+with end marker
+.ig end1
+ignored text
+.end1
+.br
+with two arguments
+.ig end2 excess
+ignored text
+.end2
+.br
+Here is a stray .. block ending,
+..
+and then an .ig staying open until the end of the file:
+.ig
+ignored text
diff --git a/regress/roff/ig/basic.out_ascii b/regress/roff/ig/basic.out_ascii
new file mode 100644
index 00000000..d100617a
--- /dev/null
+++ b/regress/roff/ig/basic.out_ascii
@@ -0,0 +1,13 @@
+IG-BASIC(1) General Commands Manual IG-BASIC(1)
+
+NNAAMMEE
+ iigg--bbaassiicc - ignored blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ no arguments
+ with end marker
+ with two arguments
+ Here is a stray .. block ending, and then an .ig staying open until the
+ end of the file:
+
+OpenBSD July 7, 2014 OpenBSD
diff --git a/regress/roff/ig/basic.out_lint b/regress/roff/ig/basic.out_lint
new file mode 100644
index 00000000..2b03b9cf
--- /dev/null
+++ b/regress/roff/ig/basic.out_lint
@@ -0,0 +1,3 @@
+mandoc: basic.in:19:5: ERROR: skipping excess arguments: .ig ... excess
+mandoc: basic.in:24:1: ERROR: skipping end of block that is not open: ..
+mandoc: basic.in:26:1: ERROR: appending missing end of block: ig
diff --git a/regress/roff/it/Makefile b/regress/roff/it/Makefile
new file mode 100644
index 00000000..ec03f94c
--- /dev/null
+++ b/regress/roff/it/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2014/08/14 02:00:53 schwarze Exp $
+
+REGRESS_TARGETS = badarg double text
+LINT_TARGETS = badarg
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/it/badarg.in b/regress/roff/it/badarg.in
new file mode 100644
index 00000000..78c2893c
--- /dev/null
+++ b/regress/roff/it/badarg.in
@@ -0,0 +1,17 @@
+.Dd July 30, 2014
+.Dt IT-BADARG 1
+.Os OpenBSD
+.Sh NAME
+.Nm it-badarg
+.Nd input line traps without numeric arguments
+.Sh DESCRIPTION
+.de mytrap
+traptext
+..
+line 1
+.it mytrap
+line 2
+line 3
+.it
+line 4
+line 5
diff --git a/regress/roff/it/badarg.out_ascii b/regress/roff/it/badarg.out_ascii
new file mode 100644
index 00000000..d4d2bc63
--- /dev/null
+++ b/regress/roff/it/badarg.out_ascii
@@ -0,0 +1,9 @@
+IT-BADARG(1) General Commands Manual IT-BADARG(1)
+
+NNAAMMEE
+ iitt--bbaaddaarrgg - input line traps without numeric arguments
+
+DDEESSCCRRIIPPTTIIOONN
+ line 1 line 2 line 3 line 4 line 5
+
+OpenBSD July 30, 2014 OpenBSD
diff --git a/regress/roff/it/badarg.out_lint b/regress/roff/it/badarg.out_lint
new file mode 100644
index 00000000..d2d4edb3
--- /dev/null
+++ b/regress/roff/it/badarg.out_lint
@@ -0,0 +1,2 @@
+mandoc: badarg.in:12:1: ERROR: skipping request without numeric argument: it mytrap
+mandoc: badarg.in:15:1: ERROR: skipping request without numeric argument: it
diff --git a/regress/roff/it/double.in b/regress/roff/it/double.in
new file mode 100644
index 00000000..d0a93e1e
--- /dev/null
+++ b/regress/roff/it/double.in
@@ -0,0 +1,16 @@
+.TH IT-DOUBLE 1 2013-07-13 OpenBSD
+.SH NAME
+it-double \- double input line trap
+.SH DESCRIPTION
+.de firstmacro
+firstmacro
+..
+.de secondmacro
+secondmacro
+..
+initial text
+.it 1 firstmacro
+.it 2 secondmacro
+first line
+second line
+third line
diff --git a/regress/roff/it/double.out_ascii b/regress/roff/it/double.out_ascii
new file mode 100644
index 00000000..d4704b36
--- /dev/null
+++ b/regress/roff/it/double.out_ascii
@@ -0,0 +1,13 @@
+IT-DOUBLE(1) General Commands Manual IT-DOUBLE(1)
+
+
+
+NNAAMMEE
+ it-double - double input line trap
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text first line second line secondmacro third line
+
+
+
+OpenBSD 2013-07-13 IT-DOUBLE(1)
diff --git a/regress/roff/it/text.in b/regress/roff/it/text.in
new file mode 100644
index 00000000..b3384180
--- /dev/null
+++ b/regress/roff/it/text.in
@@ -0,0 +1,27 @@
+.Dd February 17, 2015
+.Dt IT-TEXT 1
+.Os OpenBSD
+.Sh NAME
+.Nm it-text
+.Nd what an input line trap counts as text
+.Sh DESCRIPTION
+.de trap
+traptext
+..
+initial text
+.it 1trap
+first line after 1trap
+second line after 1trap
+.Pp
+.it 1vtrap
+first line after 1vtrap
+second line after 1vtrap
+.Pp
+.it ( + 1c + 1i)trap
+first line after ( + 1c + 1i)trap
+second line after ( + 1c + 1i)trap
+third line after ( + 1c + 1i)trap
+.it 1 trap
+.Pp
+first line after .Pp
+second line after .Pp
diff --git a/regress/roff/it/text.out_ascii b/regress/roff/it/text.out_ascii
new file mode 100644
index 00000000..bfc89842
--- /dev/null
+++ b/regress/roff/it/text.out_ascii
@@ -0,0 +1,16 @@
+IT-TEXT(1) General Commands Manual IT-TEXT(1)
+
+NNAAMMEE
+ iitt--tteexxtt - what an input line trap counts as text
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text first line after 1trap traptext second line after 1trap
+
+ first line after 1vtrap traptext second line after 1vtrap
+
+ first line after ( + 1c + 1i)trap second line after ( + 1c + 1i)trap
+ traptext third line after ( + 1c + 1i)trap
+
+ first line after .Pp traptext second line after .Pp
+
+OpenBSD February 17, 2015 OpenBSD
diff --git a/regress/roff/ll/Makefile b/regress/roff/ll/Makefile
new file mode 100644
index 00000000..c8c99b9c
--- /dev/null
+++ b/regress/roff/ll/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.1 2014/03/30 19:47:32 schwarze Exp $
+
+REGRESS_TARGETS = basic
+
+SKIP_TMAN =
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/ll/basic.in b/regress/roff/ll/basic.in
new file mode 100644
index 00000000..9f03a517
--- /dev/null
+++ b/regress/roff/ll/basic.in
@@ -0,0 +1,25 @@
+.Dd February 5, 2014
+.Dt LL-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm ll-basic
+.Nd changing the line length
+.Sh DESCRIPTION
+This is a longer text to demonstrate the default line length.
+In ASCII mode, it is expected to break at column 78.
+.Pp
+.ll 38n
+This is another long text to demonstrate shorter lines.
+In ASCII mode, it is expected to break at column 38.
+.Pp
+.ll
+This is a longer text after switching back to the default line length.
+In ASCII mode, it is expected to break at column 78.
+.Pp
+.ll +100n
+This is another long text to demonstrate longer lines.
+In ASCII mode, it is not expected to break at all.
+.Pp
+.ll FOO
+This is a longer text after switching to an invalid line length.
+In ASCII mode, it is expected to break at column 78.
diff --git a/regress/roff/ll/basic.out_ascii b/regress/roff/ll/basic.out_ascii
new file mode 100644
index 00000000..b5448e24
--- /dev/null
+++ b/regress/roff/ll/basic.out_ascii
@@ -0,0 +1,23 @@
+LL-BASIC(1) General Commands Manual LL-BASIC(1)
+
+NNAAMMEE
+ llll--bbaassiicc - changing the line length
+
+DDEESSCCRRIIPPTTIIOONN
+ This is a longer text to demonstrate the default line length. In ASCII
+ mode, it is expected to break at column 78.
+
+ This is another long text to
+ demonstrate shorter lines. In
+ ASCII mode, it is expected to
+ break at column 38.
+
+ This is a longer text after switching back to the default line length.
+ In ASCII mode, it is expected to break at column 78.
+
+ This is another long text to demonstrate longer lines. In ASCII mode, it is not expected to break at all.
+
+ This is a longer text after switching to an invalid line length. In
+ ASCII mode, it is expected to break at column 78.
+
+OpenBSD February 5, 2014 OpenBSD
diff --git a/regress/roff/na/Makefile b/regress/roff/na/Makefile
new file mode 100644
index 00000000..1d2da255
--- /dev/null
+++ b/regress/roff/na/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+
+REGRESS_TARGETS=args
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/na/args.in b/regress/roff/na/args.in
new file mode 100644
index 00000000..850c8dc7
--- /dev/null
+++ b/regress/roff/na/args.in
@@ -0,0 +1,9 @@
+.TH NA-ARGS 1 "January 17, 2011" OpenBSD
+.SH NAME
+na-args \- arguments to .na macros
+.SH DESCRIPTION
+some
+text
+.na arg1 arg2 arg3
+more
+text
diff --git a/regress/roff/na/args.out_ascii b/regress/roff/na/args.out_ascii
new file mode 100644
index 00000000..e10a3ae1
--- /dev/null
+++ b/regress/roff/na/args.out_ascii
@@ -0,0 +1,13 @@
+NA-ARGS(1) General Commands Manual NA-ARGS(1)
+
+
+
+NNAAMMEE
+ na-args - arguments to .na macros
+
+DDEESSCCRRIIPPTTIIOONN
+ some text more text
+
+
+
+OpenBSD January 17, 2011 NA-ARGS(1)
diff --git a/regress/roff/nr/Makefile b/regress/roff/nr/Makefile
new file mode 100644
index 00000000..8da68878
--- /dev/null
+++ b/regress/roff/nr/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.9 2015/01/23 00:38:43 schwarze Exp $
+
+REGRESS_TARGETS = argc divzero eval escname int predef rr scale
+LINT_TARGETS = divzero escname
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/nr/argc.in b/regress/roff/nr/argc.in
new file mode 100644
index 00000000..bf204a70
--- /dev/null
+++ b/regress/roff/nr/argc.in
@@ -0,0 +1,21 @@
+.Dd December 15, 2013
+.Dt NR-ARGC 1
+.Os OpenBSD
+.Sh NAME
+.Nm nr-argc
+.Nd varying number of arguments to the .nr macro
+.Sh DESCRIPTION
+.nr onearg
+one argument: \n[onearg]
+.Pp
+.nr twoargs 2
+two arguments: \n[twoargs]
+.Pp
+.nr withsuffix 2x
+with suffix: \n[withsuffix]
+.Pp
+.nr threeargs 2 3
+three arguments: \n[threeargs]
+.Pp
+.nr fourargs 2 3 4
+four arguments: \n[fourargs]
diff --git a/regress/roff/nr/argc.out_ascii b/regress/roff/nr/argc.out_ascii
new file mode 100644
index 00000000..80d3d0f1
--- /dev/null
+++ b/regress/roff/nr/argc.out_ascii
@@ -0,0 +1,17 @@
+NR-ARGC(1) General Commands Manual NR-ARGC(1)
+
+NNAAMMEE
+ nnrr--aarrggcc - varying number of arguments to the .nr macro
+
+DDEESSCCRRIIPPTTIIOONN
+ one argument: 0
+
+ two arguments: 2
+
+ with suffix: 2
+
+ three arguments: 2
+
+ four arguments: 2
+
+OpenBSD December 15, 2013 OpenBSD
diff --git a/regress/roff/nr/divzero.in b/regress/roff/nr/divzero.in
new file mode 100644
index 00000000..8f776bf3
--- /dev/null
+++ b/regress/roff/nr/divzero.in
@@ -0,0 +1,8 @@
+.TH NR-DIVZERO 1 "December 18, 2014" OpenBSD
+.SH NAME
+nr-divzero \- division by zero in numerical expression
+.SH DESCRIPTION
+initial text
+.nr divresult 1/0
+.nr modresult 1%0
+final \n[divresult] \n[modresult] text
diff --git a/regress/roff/nr/divzero.out_ascii b/regress/roff/nr/divzero.out_ascii
new file mode 100644
index 00000000..26d93c26
--- /dev/null
+++ b/regress/roff/nr/divzero.out_ascii
@@ -0,0 +1,13 @@
+NR-DIVZERO(1) General Commands Manual NR-DIVZERO(1)
+
+
+
+NNAAMMEE
+ nr-divzero - division by zero in numerical expression
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final 0 0 text
+
+
+
+OpenBSD December 18, 2014 NR-DIVZERO(1)
diff --git a/regress/roff/nr/divzero.out_lint b/regress/roff/nr/divzero.out_lint
new file mode 100644
index 00000000..8177c0b8
--- /dev/null
+++ b/regress/roff/nr/divzero.out_lint
@@ -0,0 +1,2 @@
+mandoc: divzero.in:6:4: ERROR: divide by zero: 1/0
+mandoc: divzero.in:7:4: ERROR: divide by zero: 1%0
diff --git a/regress/roff/nr/escname.in b/regress/roff/nr/escname.in
new file mode 100644
index 00000000..20454568
--- /dev/null
+++ b/regress/roff/nr/escname.in
@@ -0,0 +1,17 @@
+.TH NR-ESCNAME 1 "June 29, 2014" OpenBSD
+.SH NAME
+nr-escname \- escape sequences in register names
+.SH DESCRIPTION
+.nr first 1
+.nr second 2
+.nr first\\second 3
+.nr first\esecond 4
+\n[first] \n[second] \n[first\\second]
+.PP
+.rr first\esecond
+\n[first] \n[second] \n[first\\second]
+.PP
+.rr first\\second
+\n[first] \n[second] \n[first\\second]
+.PP
+incomplete: \n[second
diff --git a/regress/roff/nr/escname.out_ascii b/regress/roff/nr/escname.out_ascii
new file mode 100644
index 00000000..fd970a14
--- /dev/null
+++ b/regress/roff/nr/escname.out_ascii
@@ -0,0 +1,19 @@
+NR-ESCNAME(1) General Commands Manual NR-ESCNAME(1)
+
+
+
+NNAAMMEE
+ nr-escname - escape sequences in register names
+
+DDEESSCCRRIIPPTTIIOONN
+ 1 2 3
+
+ 0 2 3
+
+ 0 2 0
+
+ incomplete:
+
+
+
+OpenBSD June 29, 2014 NR-ESCNAME(1)
diff --git a/regress/roff/nr/escname.out_lint b/regress/roff/nr/escname.out_lint
new file mode 100644
index 00000000..66bfad35
--- /dev/null
+++ b/regress/roff/nr/escname.out_lint
@@ -0,0 +1,4 @@
+mandoc: escname.in:8:5: ERROR: escaped character not allowed in a name: first\e
+mandoc: escname.in:11:5: ERROR: escaped character not allowed in a name: first\e
+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/roff/nr/eval.in b/regress/roff/nr/eval.in
new file mode 100644
index 00000000..16bf24e3
--- /dev/null
+++ b/regress/roff/nr/eval.in
@@ -0,0 +1,67 @@
+.TH NR-EVAL 1 "April 7, 2014" OpenBSD
+.SH NAME
+nr-eval \- numeric expressions in assignments to number registers
+.SH DESCRIPTION
+.nr mr 1
+1: \n(mr
+.br
+.nr mr nonumber
+nonumber: \n(mr
+.br
+.nr mr 3X
+3X: \n(mr
+.br
+.nr mr 4+
+4+: \n(mr
+.br
+.nr mr 2+3
+2+3: \n(mr
+.br
+.nr mr 1+1:
+1+1:: \n(mr
+.br
+.nr mr 10-3
+10-3: \n(mr
+.br
+.nr mr 4*2
+4*2: \n(mr
+.br
+.nr mr 27/3
+27/3: \n(mr
+.br
+.nr mr 58%16
+58%16: \n(mr
+.br
+.nr mr 11<?20
+11<?20: \n(mr
+.br
+.nr mr 30<?12
+30<?12: \n(mr
+.br
+.nr mr 7>?13
+7>?13: \n(mr
+.br
+.nr mr 14>?6
+14>?6: \n(mr
+.br
+.nr mr 2+3*3
+2+3*3: \n(mr
+.br
+.nr mr 16+(
+para at eol: \n(mr
+.br
+.nr mr (17
+unclosed para: \n(mr
+.br
+.nr mr (18)
+(18): \n(mr
+.br
+.nr mr ( 25 - 6 )
+( 25 - 6 ): \n(mr
+.br
+.nr mr 11+( 3*3 )
+11+( 3*3 ): \n(mr
+.br
+.nr mr 3+(3*(5==5*2)*4)+(3*5)/2
+3+(3*(5==5*2)*4)+(3*5)/2: \n(mr
+.br
diff --git a/regress/roff/nr/eval.out_ascii b/regress/roff/nr/eval.out_ascii
new file mode 100644
index 00000000..5f4c767a
--- /dev/null
+++ b/regress/roff/nr/eval.out_ascii
@@ -0,0 +1,33 @@
+NR-EVAL(1) General Commands Manual NR-EVAL(1)
+
+
+
+NNAAMMEE
+ nr-eval - numeric expressions in assignments to number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ 1: 1
+ nonumber: 1
+ 3X: 3
+ 4+: 3
+ 2+3: 5
+ 1+1:: 5
+ 10-3: 7
+ 4*2: 8
+ 27/3: 9
+ 58%16: 10
+ 11<?20: 11
+ 30<?12: 12
+ 7>?13: 13
+ 14>?6: 14
+ 2+3*3: 15
+ para at eol: 15
+ unclosed para: 17
+ (18): 18
+ ( 25 - 6 ): 19
+ 11+( 3*3 ): 20
+ 3+(3*(5==5*2)*4)+(3*5)/2: 21
+
+
+
+OpenBSD April 7, 2014 NR-EVAL(1)
diff --git a/regress/roff/nr/int.in b/regress/roff/nr/int.in
new file mode 100644
index 00000000..3f907697
--- /dev/null
+++ b/regress/roff/nr/int.in
@@ -0,0 +1,15 @@
+.TH NR-INT 1 "October 3, 2013" OpenBSD
+.SH NAME
+nr-int \- integer number registers
+.SH DESCRIPTION
+initial contents: \nY \n(YY \n[YYY]
+.br
+.nr Y 42
+.nr YY -1
+.nr YYY 2147483647
+intermediate contents: \nY \n(YY \n[YYY]
+.br
+.nr Y -19
+.nr YY +2
+.nr YYY +1
+final contents: \nY \n(YY \n[YYY]
diff --git a/regress/roff/nr/int.out_ascii b/regress/roff/nr/int.out_ascii
new file mode 100644
index 00000000..8471386f
--- /dev/null
+++ b/regress/roff/nr/int.out_ascii
@@ -0,0 +1,15 @@
+NR-INT(1) General Commands Manual NR-INT(1)
+
+
+
+NNAAMMEE
+ nr-int - integer number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ initial contents: 0 0 0
+ intermediate contents: 42 -1 2147483647
+ final contents: 23 1 -2147483648
+
+
+
+OpenBSD October 3, 2013 NR-INT(1)
diff --git a/regress/roff/nr/predef.in b/regress/roff/nr/predef.in
new file mode 100644
index 00000000..3610340d
--- /dev/null
+++ b/regress/roff/nr/predef.in
@@ -0,0 +1,24 @@
+.TH NR-PREDEF 1 "August 29, 2015" OpenBSD
+.SH NAME
+nr-predef \- pre-defined read-only integer number registers
+.SH DESCRIPTION
+.de mym
+user defined macro with \\n(.$ arguments: \\$*
+..
+.nf
+.nr .A 111
+.nr .g 111
+.nr .H 111
+.nr .j 111
+.nr .T 111
+.nr .V 111
+.nr .$ 111
+ascii mode: \n(.A
+groff mode: \n(.g
+horizontal resolution: \n(.H
+adjustment mode: \n(.j
+output device defined: \n(.T
+vertical resolution: \n(.V
+.mym
+.mym one
+.mym one two
diff --git a/regress/roff/nr/predef.out_ascii b/regress/roff/nr/predef.out_ascii
new file mode 100644
index 00000000..6973d296
--- /dev/null
+++ b/regress/roff/nr/predef.out_ascii
@@ -0,0 +1,21 @@
+NR-PREDEF(1) General Commands Manual NR-PREDEF(1)
+
+
+
+NNAAMMEE
+ nr-predef - pre-defined read-only integer number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ ascii mode: 0
+ groff mode: 1
+ horizontal resolution: 24
+ adjustment mode: 0
+ output device defined: 1
+ vertical resolution: 40
+ user defined macro with 0 arguments:
+ user defined macro with 1 arguments: one
+ user defined macro with 2 arguments: one two
+
+
+
+OpenBSD August 29, 2015 NR-PREDEF(1)
diff --git a/regress/roff/nr/rr.in b/regress/roff/nr/rr.in
new file mode 100644
index 00000000..06ccdf64
--- /dev/null
+++ b/regress/roff/nr/rr.in
@@ -0,0 +1,15 @@
+.TH NR-RR 1 "April 5, 2014" OpenBSD
+.SH NAME
+nr-rr \- defining and undefining number registers
+.SH DESCRIPTION
+.nr key1 1
+.nr key2 2
+.nr key3 3
+.nr key4 4
+.nr key5 5
+.rr key1
+.rr key3
+.rr key5
+non-null values: \n[key2] \n[key4]
+.br
+unset values: \n[key1] \n[key3] \n[key5]
diff --git a/regress/roff/nr/rr.out_ascii b/regress/roff/nr/rr.out_ascii
new file mode 100644
index 00000000..21b50ee2
--- /dev/null
+++ b/regress/roff/nr/rr.out_ascii
@@ -0,0 +1,14 @@
+NR-RR(1) General Commands Manual NR-RR(1)
+
+
+
+NNAAMMEE
+ nr-rr - defining and undefining number registers
+
+DDEESSCCRRIIPPTTIIOONN
+ non-null values: 2 4
+ unset values: 0 0 0
+
+
+
+OpenBSD April 5, 2014 NR-RR(1)
diff --git a/regress/roff/nr/scale.in b/regress/roff/nr/scale.in
new file mode 100644
index 00000000..6f63c589
--- /dev/null
+++ b/regress/roff/nr/scale.in
@@ -0,0 +1,26 @@
+.TH NR-INT 1 "January 23, 2015" OpenBSD
+.SH NAME
+nr-scale \- scaling units in numeric expressions
+.SH DESCRIPTION
+.nr Y 1f+1
+\nY
+.nr Y 1i+1
+\nY
+.nr Y 10c+1
+\nY
+.nr Y 1v+1
+\nY
+.nr Y 1P+1
+\nY
+.nr Y 1m+1
+\nY
+.nr Y 1n+1
+\nY
+.nr Y 10p+1
+\nY
+.nr Y 1u+1
+\nY
+.nr Y 100M+1
+\nY
+.nr Y 1X+2
+\nY
diff --git a/regress/roff/nr/scale.out_ascii b/regress/roff/nr/scale.out_ascii
new file mode 100644
index 00000000..c6f79b2a
--- /dev/null
+++ b/regress/roff/nr/scale.out_ascii
@@ -0,0 +1,13 @@
+NR-INT(1) General Commands Manual NR-INT(1)
+
+
+
+NNAAMMEE
+ nr-scale - scaling units in numeric expressions
+
+DDEESSCCRRIIPPTTIIOONN
+ 65537 241 945 41 41 25 25 34 2 25 1
+
+
+
+OpenBSD January 23, 2015 NR-INT(1)
diff --git a/regress/roff/ps/Makefile b/regress/roff/ps/Makefile
new file mode 100644
index 00000000..24e50bbd
--- /dev/null
+++ b/regress/roff/ps/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+
+REGRESS_TARGETS=ignore
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/ps/ignore.in b/regress/roff/ps/ignore.in
new file mode 100644
index 00000000..439afda5
--- /dev/null
+++ b/regress/roff/ps/ignore.in
@@ -0,0 +1,9 @@
+.TH PS-IGNORE 1 "Febuary 5, 2011" OpenBSD
+.SH NAME
+ps-ignore \- ignoreing point size macros
+.SH DESCRIPTION
+normal text
+.ps -1
+small text
+.ps +1
+big text
diff --git a/regress/roff/ps/ignore.out_ascii b/regress/roff/ps/ignore.out_ascii
new file mode 100644
index 00000000..b1bfacac
--- /dev/null
+++ b/regress/roff/ps/ignore.out_ascii
@@ -0,0 +1,13 @@
+PS-IGNORE(1) General Commands Manual PS-IGNORE(1)
+
+
+
+NNAAMMEE
+ ps-ignore - ignoreing point size macros
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text small text big text
+
+
+
+OpenBSD Febuary 5, 2011 PS-IGNORE(1)
diff --git a/regress/roff/rm/Makefile b/regress/roff/rm/Makefile
new file mode 100644
index 00000000..14c74a60
--- /dev/null
+++ b/regress/roff/rm/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.2 2011/11/17 16:28:46 schwarze Exp $
+
+REGRESS_TARGETS=basic
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/rm/basic.in b/regress/roff/rm/basic.in
new file mode 100644
index 00000000..4e3e2650
--- /dev/null
+++ b/regress/roff/rm/basic.in
@@ -0,0 +1,19 @@
+.Dd January 11, 2011
+.Dt RM-BASIC 1
+.Os OpenBSD
+.Sh NAME
+.Nm rm-basic
+.Nd the remove macro request
+.Sh DESCRIPTION
+.de mymacro
+Hello
+..
+.ds mystring world
+before rm:
+.mymacro
+\*[mystring]!
+.br
+.rm mymacro mystring
+after rm:
+.mymacro
+\*[mystring]!
diff --git a/regress/roff/rm/basic.out_ascii b/regress/roff/rm/basic.out_ascii
new file mode 100644
index 00000000..145b85d0
--- /dev/null
+++ b/regress/roff/rm/basic.out_ascii
@@ -0,0 +1,10 @@
+RM-BASIC(1) General Commands Manual RM-BASIC(1)
+
+NNAAMMEE
+ rrmm--bbaassiicc - the remove macro request
+
+DDEESSCCRRIIPPTTIIOONN
+ before rm: Hello world!
+ after rm: !
+
+OpenBSD January 11, 2011 OpenBSD
diff --git a/regress/roff/scale/Makefile b/regress/roff/scale/Makefile
new file mode 100644
index 00000000..822f7555
--- /dev/null
+++ b/regress/roff/scale/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2014/08/14 02:00:53 schwarze Exp $
+
+REGRESS_TARGETS = horiz
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/scale/horiz.in b/regress/roff/scale/horiz.in
new file mode 100644
index 00000000..edba2f75
--- /dev/null
+++ b/regress/roff/scale/horiz.in
@@ -0,0 +1,31 @@
+.TH HORIZ 1 "December 23, 2014" OpenBSD
+.SH NAME
+horiz \- horizontal distances
+.SH DESCRIPTION
+initial text
+.in 240u
+240u
+.in 3.6c
+3.6c
+.in 0.003f
+0.003f
+.in 2i
+2i
+.in 500M
+500M
+.in 6P
+6P
+.in 36p
+36p
+.in 10n
+10n
+.in 5m
+5m
+.in 79n
+79n
+.in 1.5ix
+1.5ix
+.in -6n
+-6n
+.PP
+final text
diff --git a/regress/roff/scale/horiz.out_ascii b/regress/roff/scale/horiz.out_ascii
new file mode 100644
index 00000000..75e12a4f
--- /dev/null
+++ b/regress/roff/scale/horiz.out_ascii
@@ -0,0 +1,27 @@
+HORIZ(1) General Commands Manual HORIZ(1)
+
+
+
+NNAAMMEE
+ horiz - horizontal distances
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text
+ 240u
+ 3.6c
+ 0.003f
+ 2i
+ 500M
+ 6P
+ 36p
+ 10n
+ 5m
+ 79n
+ 1.5ix
+ -6n
+
+ final text
+
+
+
+OpenBSD December 23, 2014 HORIZ(1)
diff --git a/regress/roff/sp/Makefile b/regress/roff/sp/Makefile
new file mode 100644
index 00000000..7a09afb1
--- /dev/null
+++ b/regress/roff/sp/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.5 2015/02/06 09:38:22 schwarze Exp $
+
+REGRESS_TARGETS = badargs-man badargs-mdoc negative scaling-man scaling-mdoc
+LINT_TARGETS = badargs-man
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/sp/badargs-man.in b/regress/roff/sp/badargs-man.in
new file mode 100644
index 00000000..0a7eb075
--- /dev/null
+++ b/regress/roff/sp/badargs-man.in
@@ -0,0 +1,17 @@
+.TH SP-BADARGS-MAN 1 "December 23, 2014" OpenBSD
+.SH NAME
+sp-badargs-man \- bad arguments to .sp macros in man(7)
+.SH DESCRIPTION
+no arguments:
+.sp
+one argument:
+.sp 2v
+two arguments:
+.sp 3v 2i
+no scaling unit specified:
+.sp 1
+trailing garbage:
+.sp 2vx
+garbage only:
+.sp xxx
+end of test document
diff --git a/regress/roff/sp/badargs-man.out_ascii b/regress/roff/sp/badargs-man.out_ascii
new file mode 100644
index 00000000..b0421916
--- /dev/null
+++ b/regress/roff/sp/badargs-man.out_ascii
@@ -0,0 +1,29 @@
+SP-BADARGS-MAN(1) General Commands Manual SP-BADARGS-MAN(1)
+
+
+
+NNAAMMEE
+ sp-badargs-man - bad arguments to .sp macros in man(7)
+
+DDEESSCCRRIIPPTTIIOONN
+ no arguments:
+
+ one argument:
+
+
+ two arguments:
+
+
+
+ no scaling unit specified:
+
+ trailing garbage:
+
+
+ garbage only:
+
+ end of test document
+
+
+
+OpenBSD December 23, 2014 SP-BADARGS-MAN(1)
diff --git a/regress/roff/sp/badargs-man.out_lint b/regress/roff/sp/badargs-man.out_lint
new file mode 100644
index 00000000..d38502dd
--- /dev/null
+++ b/regress/roff/sp/badargs-man.out_lint
@@ -0,0 +1 @@
+mandoc: badargs-man.in:10:8: ERROR: skipping excess arguments: sp ... 2i
diff --git a/regress/roff/sp/badargs-mdoc.in b/regress/roff/sp/badargs-mdoc.in
new file mode 100644
index 00000000..684ee7e3
--- /dev/null
+++ b/regress/roff/sp/badargs-mdoc.in
@@ -0,0 +1,20 @@
+.Dd December 23, 2014
+.Dt SP-BADARGS-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm sp-badargs-mdoc
+.Nd bad arguments to .sp macros in mdoc(7)
+.Sh DESCRIPTION
+no arguments:
+.sp
+one argument:
+.sp 2v
+two arguments:
+.sp 3v 2i
+no scaling unit specified:
+.sp 1
+trailing garbage:
+.sp 2vx
+garbage only:
+.sp xxx
+end of test document
diff --git a/regress/roff/sp/badargs-mdoc.out_ascii b/regress/roff/sp/badargs-mdoc.out_ascii
new file mode 100644
index 00000000..3e1f87ed
--- /dev/null
+++ b/regress/roff/sp/badargs-mdoc.out_ascii
@@ -0,0 +1,25 @@
+SP-BADARGS-MDOC(1) General Commands Manual SP-BADARGS-MDOC(1)
+
+NNAAMMEE
+ sspp--bbaaddaarrggss--mmddoocc - bad arguments to .sp macros in mdoc(7)
+
+DDEESSCCRRIIPPTTIIOONN
+ no arguments:
+
+ one argument:
+
+
+ two arguments:
+
+
+
+ no scaling unit specified:
+
+ trailing garbage:
+
+
+ garbage only:
+
+ end of test document
+
+OpenBSD December 23, 2014 OpenBSD
diff --git a/regress/roff/sp/negative.in b/regress/roff/sp/negative.in
new file mode 100644
index 00000000..10c6edc9
--- /dev/null
+++ b/regress/roff/sp/negative.in
@@ -0,0 +1,8 @@
+.TH SP-NEGATIVE 1 "July 12, 2012" OpenBSD
+.SH NAME
+sp-negative \- negative vertical spacing
+.SH DESCRIPTION
+first line
+.sp -1v
+.PP
+second line
diff --git a/regress/roff/sp/negative.out_ascii b/regress/roff/sp/negative.out_ascii
new file mode 100644
index 00000000..8a71aba6
--- /dev/null
+++ b/regress/roff/sp/negative.out_ascii
@@ -0,0 +1,14 @@
+SP-NEGATIVE(1) General Commands Manual SP-NEGATIVE(1)
+
+
+
+NNAAMMEE
+ sp-negative - negative vertical spacing
+
+DDEESSCCRRIIPPTTIIOONN
+ first line
+ second line
+
+
+
+OpenBSD July 12, 2012 SP-NEGATIVE(1)
diff --git a/regress/roff/sp/scaling-man.in b/regress/roff/sp/scaling-man.in
new file mode 100644
index 00000000..69318eca
--- /dev/null
+++ b/regress/roff/sp/scaling-man.in
@@ -0,0 +1,27 @@
+.TH SP-SCALING-MAN 1 "December 23, 2014" OpenBSD
+.SH NAME
+sp-scaling-man \- scaled arguments to .sp requests in man(7)
+.SH DESCRIPTION
+20 basic units:
+.sp 20u
+21 basic units:
+.sp 21u
+one centimeter:
+.sp 1c
+quarter of an inch:
+.sp 0.25i
+half a pica:
+.sp 0.5P
+one pica:
+.sp 1P
+6 points:
+.sp 6p
+7 points:
+.sp 7p
+one en:
+.sp 1n
+three en:
+.sp 3n
+two em:
+.sp 2m
+end of test document
diff --git a/regress/roff/sp/scaling-man.out_ascii b/regress/roff/sp/scaling-man.out_ascii
new file mode 100644
index 00000000..72a0b53b
--- /dev/null
+++ b/regress/roff/sp/scaling-man.out_ascii
@@ -0,0 +1,34 @@
+SP-SCALING-MAN(1) General Commands Manual SP-SCALING-MAN(1)
+
+
+
+NNAAMMEE
+ sp-scaling-man - scaled arguments to .sp requests in man(7)
+
+DDEESSCCRRIIPPTTIIOONN
+ 20 basic units:
+ 21 basic units:
+
+ one centimeter:
+
+
+ quarter of an inch:
+
+ half a pica:
+ one pica:
+
+ 6 points:
+ 7 points:
+
+ one en:
+
+ three en:
+
+
+ two em:
+
+ end of test document
+
+
+
+OpenBSD December 23, 2014 SP-SCALING-MAN(1)
diff --git a/regress/roff/sp/scaling-mdoc.in b/regress/roff/sp/scaling-mdoc.in
new file mode 100644
index 00000000..ff4d45c7
--- /dev/null
+++ b/regress/roff/sp/scaling-mdoc.in
@@ -0,0 +1,30 @@
+.Dd December 23, 2014
+.Dt SP-SCALING-MDOC 1
+.Os OpenBSD
+.Sh NAME
+.Nm sp-scaling-mdoc
+.Nd scaled arguments to .sp requests in mdoc(7)
+.Sh DESCRIPTION
+20 basic units:
+.sp 20u
+21 basic units:
+.sp 21u
+one centimeter:
+.sp 1c
+quarter of an inch:
+.sp 0.25i
+half a pica:
+.sp 0.5P
+one pica:
+.sp 1P
+6 points:
+.sp 6p
+7 points:
+.sp 7p
+one en:
+.sp 1n
+three en:
+.sp 3n
+two em:
+.sp 2m
+end of test document
diff --git a/regress/roff/sp/scaling-mdoc.out_ascii b/regress/roff/sp/scaling-mdoc.out_ascii
new file mode 100644
index 00000000..625ba7c4
--- /dev/null
+++ b/regress/roff/sp/scaling-mdoc.out_ascii
@@ -0,0 +1,30 @@
+SP-SCALING-MDOC(1) General Commands Manual SP-SCALING-MDOC(1)
+
+NNAAMMEE
+ sspp--ssccaalliinngg--mmddoocc - scaled arguments to .sp requests in mdoc(7)
+
+DDEESSCCRRIIPPTTIIOONN
+ 20 basic units:
+ 21 basic units:
+
+ one centimeter:
+
+
+ quarter of an inch:
+
+ half a pica:
+ one pica:
+
+ 6 points:
+ 7 points:
+
+ one en:
+
+ three en:
+
+
+ two em:
+
+ end of test document
+
+OpenBSD December 23, 2014 OpenBSD
diff --git a/regress/roff/string/Makefile b/regress/roff/string/Makefile
new file mode 100644
index 00000000..d2cd125b
--- /dev/null
+++ b/regress/roff/string/Makefile
@@ -0,0 +1,11 @@
+# $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.
+
+SKIP_GROFF ?= infinite
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/string/escape.in b/regress/roff/string/escape.in
new file mode 100644
index 00000000..05a271e8
--- /dev/null
+++ b/regress/roff/string/escape.in
@@ -0,0 +1,26 @@
+.TH STRING-ESCAPE 1 "December 3, 2010"
+.SH NAME
+string-escape - preventing string interpolation
+.SH DESCRIPTION
+.ds right wrong
+.ds inner *[right]
+.ds outer \\*[inner]
+.SS Normal interpolation
+result: \*[inner]
+.PP
+The above line must be "result: *[right]".
+.SS Intervening character
+result: \e*[right]
+.PP
+The above line must be "result: backslash*[right]",
+not "result: rong".
+.SS Escaped backslash
+result: \\*[right]
+.PP
+The above line must be "result: backslash*[right]",
+not "result: rong".
+.SS Delayed interpolation
+result: \*[outer]
+.PP
+The above line must be "result: *[right]",
+not "result: wrong".
diff --git a/regress/roff/string/escape.out_ascii b/regress/roff/string/escape.out_ascii
new file mode 100644
index 00000000..fc8021aa
--- /dev/null
+++ b/regress/roff/string/escape.out_ascii
@@ -0,0 +1,31 @@
+STRING-ESCAPE(1) General Commands Manual STRING-ESCAPE(1)
+
+
+
+NNAAMMEE
+ string-escape - preventing string interpolation
+
+DDEESSCCRRIIPPTTIIOONN
+ NNoorrmmaall iinntteerrppoollaattiioonn
+ result: *[right]
+
+ The above line must be "result: *[right]".
+
+ IInntteerrvveenniinngg cchhaarraacctteerr
+ result: \*[right]
+
+ The above line must be "result: backslash*[right]", not "result: rong".
+
+ EEssccaappeedd bbaacckkssllaasshh
+ result: \*[right]
+
+ The above line must be "result: backslash*[right]", not "result: rong".
+
+ DDeellaayyeedd iinntteerrppoollaattiioonn
+ result: *[right]
+
+ The above line must be "result: *[right]", not "result: wrong".
+
+
+
+ December 3, 2010 STRING-ESCAPE(1)
diff --git a/regress/roff/string/infinite.in b/regress/roff/string/infinite.in
new file mode 100644
index 00000000..e16c527d
--- /dev/null
+++ b/regress/roff/string/infinite.in
@@ -0,0 +1,8 @@
+.TH STRING-INFINITE 1 "December 3, 2010" OpenBSD
+.SH NAME
+string-infinite - endless recursion in string expansion
+.SH DESCRIPTION
+.ds recur \\*[recur]
+Blow up,
+(and do not \*[recur] print this)
+but still render following text correctly.
diff --git a/regress/roff/string/infinite.out_ascii b/regress/roff/string/infinite.out_ascii
new file mode 100644
index 00000000..1a9a5d6a
--- /dev/null
+++ b/regress/roff/string/infinite.out_ascii
@@ -0,0 +1,13 @@
+STRING-INFINITE(1) General Commands Manual STRING-INFINITE(1)
+
+
+
+NNAAMMEE
+ string-infinite - endless recursion in string expansion
+
+DDEESSCCRRIIPPTTIIOONN
+ Blow up, but still render following text correctly.
+
+
+
+OpenBSD December 3, 2010 STRING-INFINITE(1)
diff --git a/regress/roff/string/name.in b/regress/roff/string/name.in
new file mode 100644
index 00000000..a2a524a4
--- /dev/null
+++ b/regress/roff/string/name.in
@@ -0,0 +1,35 @@
+.Dd January 10, 2011
+.Dt STRING-NAME 1
+.Os OpenBSD
+.Sh NAME
+.Nm string-name
+.Nd torturing .ds with weird string names
+.Sh DESCRIPTION
+.ds norm value of norm
+.ds "quot" value of "quot"
+.ds bs\e value of bs\ee
+.ds bs\\e value of bs\e\ee
+.ds bl\ e value of bl\e e
+norm: \*[norm]
+.br
+norm without closing brace: \*[norm
+.br
+quot: \*[quot]
+.br
+"quot": \*["quot"]
+.br
+bs\e\ee: \*[bs\\e]
+.\".br
+.\"bs\ee: \*[bs\e]
+.br
+bse: \*[bse]
+.br
+bs: \*[bs]
+.\".br
+.\"bl\e e: \*[bl\ e]
+.br
+bl e: \*[bl e]
+.br
+ble: \*[ble]
+.br
+bl: \*[bl]
diff --git a/regress/roff/string/name.out_ascii b/regress/roff/string/name.out_ascii
new file mode 100644
index 00000000..45ebba19
--- /dev/null
+++ b/regress/roff/string/name.out_ascii
@@ -0,0 +1,18 @@
+STRING-NAME(1) General Commands Manual STRING-NAME(1)
+
+NNAAMMEE
+ ssttrriinngg--nnaammee - torturing .ds with weird string names
+
+DDEESSCCRRIIPPTTIIOONN
+ norm: value of norm
+ norm without closing brace:
+ quot:
+ "quot": value of "quot"
+ bs\\e: value of bs\\e
+ bse:
+ bs:
+ bl e:
+ ble:
+ bl:
+
+OpenBSD January 10, 2011 OpenBSD
diff --git a/regress/roff/string/name.out_lint b/regress/roff/string/name.out_lint
new file mode 100644
index 00000000..c4c757f5
--- /dev/null
+++ b/regress/roff/string/name.out_lint
@@ -0,0 +1,17 @@
+mandoc: name.in:10:5: ERROR: escaped character not allowed in a name: bs\e
+mandoc: name.in:12:5: ERROR: escaped character not allowed in a name: bl\
+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
diff --git a/regress/roff/string/zerolength.in b/regress/roff/string/zerolength.in
new file mode 100644
index 00000000..0d4d9bac
--- /dev/null
+++ b/regress/roff/string/zerolength.in
@@ -0,0 +1,16 @@
+.TH STRING-ZEROLENGTH 1 "December 19, 2010"
+.SH NAME
+string-zerolength - handling of zero-length user-defined strings
+.SH DESCRIPTION
+.ds dszero "
+.de dezero
+..
+use zero-length string:
+x\*[dszero]x
+.dszero
+x
+.PP
+use zero-length macro:
+x\*[dezero]x
+.dezero
+x
diff --git a/regress/roff/string/zerolength.out_ascii b/regress/roff/string/zerolength.out_ascii
new file mode 100644
index 00000000..ff9d2473
--- /dev/null
+++ b/regress/roff/string/zerolength.out_ascii
@@ -0,0 +1,15 @@
+STRING-ZEROLENGTH(1) General Commands Manual STRING-ZEROLENGTH(1)
+
+
+
+NNAAMMEE
+ string-zerolength - handling of zero-length user-defined strings
+
+DDEESSCCRRIIPPTTIIOONN
+ use zero-length string: xx x
+
+ use zero-length macro: xx x
+
+
+
+ December 19, 2010 STRING-ZEROLENGTH(1)
diff --git a/regress/roff/tr/Makefile b/regress/roff/tr/Makefile
new file mode 100644
index 00000000..791c27ef
--- /dev/null
+++ b/regress/roff/tr/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2015/02/06 16:05:51 schwarze Exp $
+
+REGRESS_TARGETS = args
+LINT_TARGETS = args
+
+.include <bsd.regress.mk>
diff --git a/regress/roff/tr/args.in b/regress/roff/tr/args.in
new file mode 100644
index 00000000..1ef074d6
--- /dev/null
+++ b/regress/roff/tr/args.in
@@ -0,0 +1,16 @@
+.TH TR-BASIC 1 "February 6, 2015" OpenBSD
+.SH NAME
+tr-args \- arguments of the tr request
+.SH DESCRIPTION
+no argument:
+.tr
+one character:
+.tr x
+>>x<<
+two characters:
+.tr xy
+>>x<<
+three characters:
+.tr xyz
+>>xz<<
+last line
diff --git a/regress/roff/tr/args.out_ascii b/regress/roff/tr/args.out_ascii
new file mode 100644
index 00000000..b199ed6b
--- /dev/null
+++ b/regress/roff/tr/args.out_ascii
@@ -0,0 +1,14 @@
+TR-BASIC(1) General Commands Manual TR-BASIC(1)
+
+
+
+NNAAMMEE
+ tr-args - arguments of the tr request
+
+DDEESSCCRRIIPPTTIIOONN
+ no argument: one character: >> << two characters: >>y<< three
+ characters: >>y << last line
+
+
+
+OpenBSD February 6, 2015 TR-BASIC(1)
diff --git a/regress/roff/tr/args.out_lint b/regress/roff/tr/args.out_lint
new file mode 100644
index 00000000..dec14b80
--- /dev/null
+++ b/regress/roff/tr/args.out_lint
@@ -0,0 +1,3 @@
+mandoc: args.in:6:1: WARNING: skipping empty request: tr
+mandoc: args.in:8:5: WARNING: odd number of characters in request: tr x
+mandoc: args.in:14:7: WARNING: odd number of characters in request: tr z
diff --git a/regress/tbl/Makefile b/regress/tbl/Makefile
new file mode 100644
index 00000000..05743c8d
--- /dev/null
+++ b/regress/tbl/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.13 2015/01/29 23:34:45 schwarze Exp $
+
+SUBDIR = opt layout mod data macro
+
+.include "../Makefile.sub"
+.include <bsd.subdir.mk>
diff --git a/regress/tbl/Makefile.inc b/regress/tbl/Makefile.inc
new file mode 100644
index 00000000..3d862dd4
--- /dev/null
+++ b/regress/tbl/Makefile.inc
@@ -0,0 +1,15 @@
+# $OpenBSD: Makefile.inc,v 1.2 2015/02/03 19:37:25 schwarze Exp $
+
+TBL = /usr/local/bin/tbl
+
+SKIP_TMAN ?= ALL
+
+
+# OpenBSD only: maintainer targets
+
+.for t in ${REGRESS_TARGETS}
+${t}.out_ascii: ${t}.in
+ ${TBL} ${.ALLSRC} | ${NROFF} ${NOPTS} -Tascii > ${.TARGET}
+.endfor
+
+.include "../Makefile.inc"
diff --git a/regress/tbl/data/Makefile b/regress/tbl/data/Makefile
new file mode 100644
index 00000000..cdb97f36
--- /dev/null
+++ b/regress/tbl/data/Makefile
@@ -0,0 +1,12 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2015/01/29 23:24:24 schwarze Exp $
+
+REGRESS_TARGETS = blankline block_unclosed empty
+LINT_TARGETS = block_unclosed empty
+
+# groff-1.22.3 defect:
+# - When a table ends in the middle of a block,
+# GNU eqn produces no output whatsoever for the whole table.
+
+SKIP_GROFF = block_unclosed
+
+.include <bsd.regress.mk>
diff --git a/regress/tbl/data/blankline.in b/regress/tbl/data/blankline.in
new file mode 100644
index 00000000..dd11433a
--- /dev/null
+++ b/regress/tbl/data/blankline.in
@@ -0,0 +1,14 @@
+.TH TBL-DATA-BLANKLINE 1 "January 21, 2015" OpenBSD
+.SH NAME
+tbl-data-blankline \- blank line in a table
+.SH DESCRIPTION
+normal text
+.TS
+lb
+li
+lb.
+first
+
+last
+.TE
+normal text
diff --git a/regress/tbl/data/blankline.out_ascii b/regress/tbl/data/blankline.out_ascii
new file mode 100644
index 00000000..2cfd35a1
--- /dev/null
+++ b/regress/tbl/data/blankline.out_ascii
@@ -0,0 +1,18 @@
+TBL-DATA-BLANKLINE(1) General Commands Manual TBL-DATA-BLANKLINE(1)
+
+
+
+NNAAMMEE
+ tbl-data-blankline - blank line in a table
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ ffiirrsstt
+
+ llaasstt
+ normal text
+
+
+
+OpenBSD January 21, 2015 TBL-DATA-BLANKLINE(1)
diff --git a/regress/tbl/data/block_unclosed.in b/regress/tbl/data/block_unclosed.in
new file mode 100644
index 00000000..5e3526c4
--- /dev/null
+++ b/regress/tbl/data/block_unclosed.in
@@ -0,0 +1,33 @@
+.TH TBL-DATA-BLOCK_UNCLOSED 1 "January 28, 2015" OpenBSD
+.SH NAME
+tbl-data-block_unclosed \- unclosed text block
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+lll.
+begin:T{
+middle
+T}:end
+T{
+begin
+T}:middle:T{
+end
+T}
+incomplete:T{
+block
+.TE
+normal text
+.TS
+box tab(:);
+lll.
+begin:T{
+middle
+T}:end
+incomplete:T{
+block
+.T&
+rrr.
+reset:still:works
+.TE
+normal text
diff --git a/regress/tbl/data/block_unclosed.out_ascii b/regress/tbl/data/block_unclosed.out_ascii
new file mode 100644
index 00000000..bf0338ce
--- /dev/null
+++ b/regress/tbl/data/block_unclosed.out_ascii
@@ -0,0 +1,27 @@
+TBL-DATA-BLOCK_UNCLOSED(1) General Commands Manual TBL-DATA-BLOCK_UNCLOSED(1)
+
+
+
+NNAAMMEE
+ tbl-data-block_unclosed - unclosed text block
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +--------------------------+
+ |begin middle end |
+ |begin middle end |
+ |incomplete block |
+ +--------------------------+
+ normal text
+
+ +----------------------------+
+ |begin middle end |
+ |incomplete block |
+ | reset still works |
+ +----------------------------+
+ normal text
+
+
+
+OpenBSD January 28, 2015 TBL-DATA-BLOCK_UNCLOSED(1)
diff --git a/regress/tbl/data/block_unclosed.out_lint b/regress/tbl/data/block_unclosed.out_lint
new file mode 100644
index 00000000..452cde4d
--- /dev/null
+++ b/regress/tbl/data/block_unclosed.out_lint
@@ -0,0 +1,2 @@
+mandoc: block_unclosed.in:6:1: ERROR: data block open at end of tbl: TE
+mandoc: block_unclosed.in: ERROR: data block open at end of tbl: T&
diff --git a/regress/tbl/data/empty.in b/regress/tbl/data/empty.in
new file mode 100644
index 00000000..2107dcf5
--- /dev/null
+++ b/regress/tbl/data/empty.in
@@ -0,0 +1,9 @@
+.TH TBL-DATA-EMPTY 1 "January 28, 2015" OpenBSD
+.SH NAME
+tbl-data-empty \- empty table
+.SH DESCRIPTION
+normal text
+.TS
+box; l.
+.TE
+normal text
diff --git a/regress/tbl/data/empty.out_ascii b/regress/tbl/data/empty.out_ascii
new file mode 100644
index 00000000..6aaafe7f
--- /dev/null
+++ b/regress/tbl/data/empty.out_ascii
@@ -0,0 +1,15 @@
+TBL-DATA-EMPTY(1) General Commands Manual TBL-DATA-EMPTY(1)
+
+
+
+NNAAMMEE
+ tbl-data-empty - empty table
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ normal text
+
+
+
+OpenBSD January 28, 2015 TBL-DATA-EMPTY(1)
diff --git a/regress/tbl/data/empty.out_lint b/regress/tbl/data/empty.out_lint
new file mode 100644
index 00000000..153902d0
--- /dev/null
+++ b/regress/tbl/data/empty.out_lint
@@ -0,0 +1 @@
+mandoc: empty.in:6:1: ERROR: tbl without any data cells
diff --git a/regress/tbl/layout/Makefile b/regress/tbl/layout/Makefile
new file mode 100644
index 00000000..9ad5d7f9
--- /dev/null
+++ b/regress/tbl/layout/Makefile
@@ -0,0 +1,12 @@
+# $OpenBSD: Makefile,v 1.2 2015/01/30 00:27:09 schwarze Exp $
+
+REGRESS_TARGETS = center complex empty emptyline numbers span
+LINT_TARGETS = complex empty
+
+# groff-1.22.3 defect:
+# - When the layout is completely empty,
+# GNU eqn produces no output whatsoever for the whole table.
+
+SKIP_GROFF = empty
+
+.include <bsd.regress.mk>
diff --git a/regress/tbl/layout/center.in b/regress/tbl/layout/center.in
new file mode 100644
index 00000000..d4ca166e
--- /dev/null
+++ b/regress/tbl/layout/center.in
@@ -0,0 +1,22 @@
+.TH TBL-LAYOUT-CENTER 1
+.SH NAME
+tbl-layout-center \- centering of table cells
+.SH DESCRIPTION
+normal text
+.TS
+tab(:);
+r c l
+r c l
+r c l
+c s l
+r c s
+r c l .
+*:*:*
+**:**:**
+***:***:***
+***:***
+***:***
+***:***:***
+****:****:****
+*****:*****:*****
+.TE
diff --git a/regress/tbl/layout/center.out_ascii b/regress/tbl/layout/center.out_ascii
new file mode 100644
index 00000000..27e03c99
--- /dev/null
+++ b/regress/tbl/layout/center.out_ascii
@@ -0,0 +1,22 @@
+TBL-LAYOUT-CENTER(1) General Commands Manual TBL-LAYOUT-CENTER(1)
+
+
+
+NNAAMMEE
+ tbl-layout-center - centering of table cells
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ * * *
+ ** ** **
+ *** *** ***
+ *** ***
+ *** ***
+ *** *** ***
+ **** **** ****
+ ***** ***** *****
+
+
+
+ TBL-LAYOUT-CENTER(1)
diff --git a/regress/tbl/layout/complex.in b/regress/tbl/layout/complex.in
new file mode 100644
index 00000000..185c5af2
--- /dev/null
+++ b/regress/tbl/layout/complex.in
@@ -0,0 +1,37 @@
+.TH TBL-LAYOUT-COMPLEX 1 "January 26, 2015" OpenBSD
+.SH NAME
+tbl-layout-complex \- complex table layout
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+l|p-1l bsil|||l,l|l ilb^|i||l.
+a:b:c:d
+e:f:g:h:i
+.TE
+.PP
+normal text
+.TS
+box tab(:);
+l ^
+l l.
+a:b
+c:d
+.TE
+.PP
+normal text
+.TS
+tab(:);
+||l||l||
+|l|l|
+ll.
+_
+a:b
+_
+c:d
+_
+e:f
+_
+.TE
+.PP
+normal text
diff --git a/regress/tbl/layout/complex.out_ascii b/regress/tbl/layout/complex.out_ascii
new file mode 100644
index 00000000..8581f202
--- /dev/null
+++ b/regress/tbl/layout/complex.out_ascii
@@ -0,0 +1,35 @@
+TBL-LAYOUT-COMPLEX(1) General Commands Manual TBL-LAYOUT-COMPLEX(1)
+
+
+
+NNAAMMEE
+ tbl-layout-complex - complex table layout
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +--+-----------++--+
+ |a | bb c ||d |
+ |e | _f gg ||i |
+ +--+-----------++--+
+ normal text
+
+ +------+
+ |a |
+ |c d |
+ +------+
+ normal text
+
+ +--++--+
+ |a ||b |
+ +--++--+
+ |c | d |
+ +--+---+
+ e f
+ --------
+
+ normal text
+
+
+
+OpenBSD January 26, 2015 TBL-LAYOUT-COMPLEX(1)
diff --git a/regress/tbl/layout/complex.out_lint b/regress/tbl/layout/complex.out_lint
new file mode 100644
index 00000000..a72604fb
--- /dev/null
+++ b/regress/tbl/layout/complex.out_lint
@@ -0,0 +1,5 @@
+mandoc: complex.in:8:14: WARNING: skipping vertical bar in tbl layout
+mandoc: complex.in:8:28: WARNING: skipping vertical bar in tbl layout
+mandoc: complex.in:10:7: ERROR: ignoring data in spanned tbl cell: h
+mandoc: complex.in:16:3: WARNING: tbl column starts with span
+mandoc: complex.in:18:3: ERROR: ignoring data in spanned tbl cell: b
diff --git a/regress/tbl/layout/empty.in b/regress/tbl/layout/empty.in
new file mode 100644
index 00000000..3afff955
--- /dev/null
+++ b/regress/tbl/layout/empty.in
@@ -0,0 +1,15 @@
+.TH TBL-LAYOUT-EMPTY 1 "January 29, 2015" OpenBSD
+.SH NAME
+tbl-layout-empty \- empty table layout
+.SH DESCRIPTION
+completely empty layout:
+.TS
+.
+table text
+.TE
+layout only contains a bar:
+.TS
+|.
+table text
+.TE
+normal text
diff --git a/regress/tbl/layout/empty.out_ascii b/regress/tbl/layout/empty.out_ascii
new file mode 100644
index 00000000..96d224fa
--- /dev/null
+++ b/regress/tbl/layout/empty.out_ascii
@@ -0,0 +1,19 @@
+TBL-LAYOUT-EMPTY(1) General Commands Manual TBL-LAYOUT-EMPTY(1)
+
+
+
+NNAAMMEE
+ tbl-layout-empty - empty table layout
+
+DDEESSCCRRIIPPTTIIOONN
+ completely empty layout:
+
+ table text
+ layout only contains a bar:
+
+ |table text
+ normal text
+
+
+
+OpenBSD January 29, 2015 TBL-LAYOUT-EMPTY(1)
diff --git a/regress/tbl/layout/empty.out_lint b/regress/tbl/layout/empty.out_lint
new file mode 100644
index 00000000..20ae24a5
--- /dev/null
+++ b/regress/tbl/layout/empty.out_lint
@@ -0,0 +1,2 @@
+mandoc: empty.in:7:2: ERROR: empty tbl layout
+mandoc: empty.in:12:3: ERROR: empty tbl layout
diff --git a/regress/tbl/layout/emptyline.in b/regress/tbl/layout/emptyline.in
new file mode 100644
index 00000000..647b70db
--- /dev/null
+++ b/regress/tbl/layout/emptyline.in
@@ -0,0 +1,24 @@
+.TH TBL-LAYOUT-EMPTYLINE 1 "January 29, 2015" OpenBSD
+.SH NAME
+tbl-layout-emptyline \- empty lines in table layouts
+.SH DESCRIPTION
+An empty line in the middle of a table joins with the next:
+.TS
+l
+|
+r.
+table text
+_
+bar
+right
+.TE
+.PP
+An empty line at the end of a table is discarded:
+.TS
+l
+r
+|.
+table text
+right
+.TE
+normal text
diff --git a/regress/tbl/layout/emptyline.out_ascii b/regress/tbl/layout/emptyline.out_ascii
new file mode 100644
index 00000000..230cc597
--- /dev/null
+++ b/regress/tbl/layout/emptyline.out_ascii
@@ -0,0 +1,24 @@
+TBL-LAYOUT-EMPTYLINE(1) General Commands Manual TBL-LAYOUT-EMPTYLINE(1)
+
+
+
+NNAAMMEE
+ tbl-layout-emptyline - empty lines in table layouts
+
+DDEESSCCRRIIPPTTIIOONN
+ An empty line in the middle of a table joins with the next:
+
+ table text
+ +-----------
+ | bar
+ | right
+
+ An empty line at the end of a table is discarded:
+
+ table text
+ right
+ normal text
+
+
+
+OpenBSD January 29, 2015 TBL-LAYOUT-EMPTYLINE(1)
diff --git a/regress/tbl/layout/numbers.in b/regress/tbl/layout/numbers.in
new file mode 100644
index 00000000..24f1cada
--- /dev/null
+++ b/regress/tbl/layout/numbers.in
@@ -0,0 +1,12 @@
+.TH TBL-LAYOUT-NUMBERS 1
+.SH NAME
+tbl-layout-numbers \- alignment of numbers in tables
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+r || n | n .
+1:1.00:+42.0
+_
+10:-10.0:3.14
+.TE
diff --git a/regress/tbl/layout/numbers.out_ascii b/regress/tbl/layout/numbers.out_ascii
new file mode 100644
index 00000000..c93d12b0
--- /dev/null
+++ b/regress/tbl/layout/numbers.out_ascii
@@ -0,0 +1,18 @@
+TBL-LAYOUT-NUMBERS(1) General Commands Manual TBL-LAYOUT-NUMBERS(1)
+
+
+
+NNAAMMEE
+ tbl-layout-numbers - alignment of numbers in tables
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +---++-------+--------+
+ | 1 || 1.00 | +42.0 |
+ +---++-------+--------+
+ |10 ||-10.0 | 3.14 |
+ +---++-------+--------+
+
+
+ TBL-LAYOUT-NUMBERS(1)
diff --git a/regress/tbl/layout/span.in b/regress/tbl/layout/span.in
new file mode 100644
index 00000000..dc172dcd
--- /dev/null
+++ b/regress/tbl/layout/span.in
@@ -0,0 +1,40 @@
+.TH TBL-LAYOUT-SPAN 1
+.SH NAME
+tbl-layout-span \- alignment of spanned cells
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+L L L L
+L S L L
+L L S L
+L L L S.
+a:b:c:d
+s:c:d
+a:s:d
+a:b:s
+.TE
+.sp
+.TS
+box tab(:);
+C C C C
+C S C C
+C C S C
+C C C S.
+a:b:c:d
+s:c:d
+a:s:d
+a:b:s
+.TE
+.sp
+.TS
+box tab(:);
+R R R R
+R S R R
+R R S R
+R R R S.
+a:b:c:d
+s:c:d
+a:s:d
+a:b:s
+.TE
diff --git a/regress/tbl/layout/span.out_ascii b/regress/tbl/layout/span.out_ascii
new file mode 100644
index 00000000..0ffb9899
--- /dev/null
+++ b/regress/tbl/layout/span.out_ascii
@@ -0,0 +1,33 @@
+TBL-LAYOUT-SPAN(1) General Commands Manual TBL-LAYOUT-SPAN(1)
+
+
+
+NNAAMMEE
+ tbl-layout-span - alignment of spanned cells
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +--------------+
+ |a b c d |
+ |s c d |
+ |a s d |
+ |a b s |
+ +--------------+
+
+ +--------------+
+ |a b c d |
+ | s c d |
+ |a s d |
+ |a b s |
+ +--------------+
+
+ +--------------+
+ |a b c d |
+ | s c d |
+ |a s d |
+ |a b s |
+ +--------------+
+
+
+ TBL-LAYOUT-SPAN(1)
diff --git a/regress/tbl/macro/Makefile b/regress/tbl/macro/Makefile
new file mode 100644
index 00000000..70ec1b33
--- /dev/null
+++ b/regress/tbl/macro/Makefile
@@ -0,0 +1,12 @@
+# $OpenBSD: Makefile,v 1.2 2016/08/20 14:43:40 schwarze Exp $
+
+REGRESS_TARGETS = man nested column
+LINT_TARGETS = man nested
+
+# trivial differences to groff-1.22.3:
+# .TS in a table causes a blank table line in GNU tbl(1), but not in mandoc.
+# .TS in a column list causes a blank line in mandoc, but not in GNU tbl(1).
+
+SKIP_GROFF = nested column
+
+.include <bsd.regress.mk>
diff --git a/regress/tbl/macro/column.in b/regress/tbl/macro/column.in
new file mode 100644
index 00000000..511025ea
--- /dev/null
+++ b/regress/tbl/macro/column.in
@@ -0,0 +1,16 @@
+.Dd August 20, 2016
+.Dt TBL-COLUMN 1
+.Os OpenBSD
+.Sh NAME
+.Nm TBL-column
+.Nd tables inside column lists
+.Sh DESCRIPTION
+.Bl -column "a" "b"
+.Sy a Ta b
+.TS
+lll.
+1 2 3
+4 5 6
+.TE
+.Em c Ta d
+.El
diff --git a/regress/tbl/macro/column.out_ascii b/regress/tbl/macro/column.out_ascii
new file mode 100644
index 00000000..b4428aa6
--- /dev/null
+++ b/regress/tbl/macro/column.out_ascii
@@ -0,0 +1,13 @@
+TBL-COLUMN(1) General Commands Manual TBL-COLUMN(1)
+
+NNAAMMEE
+ TTBBLL--ccoolluummnn - tables inside column lists
+
+DDEESSCCRRIIPPTTIIOONN
+ aa b
+ 1 2 3
+ 4 5 6
+
+ _c d
+
+OpenBSD August 20, 2016 OpenBSD
diff --git a/regress/tbl/macro/man.in b/regress/tbl/macro/man.in
new file mode 100644
index 00000000..36e39569
--- /dev/null
+++ b/regress/tbl/macro/man.in
@@ -0,0 +1,16 @@
+.TH TBL-MACRO-MAN 1 "December 16, 2014"
+.SH NAME
+tbl-macro-man \- man macro in a table
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+l | l .
+a:b:stray
+_
+c:T{
+.SM d
+T}
+.TE
+.PP
+normal text
diff --git a/regress/tbl/macro/man.out_ascii b/regress/tbl/macro/man.out_ascii
new file mode 100644
index 00000000..2a96f0b7
--- /dev/null
+++ b/regress/tbl/macro/man.out_ascii
@@ -0,0 +1,20 @@
+TBL-MACRO-MAN(1) General Commands Manual TBL-MACRO-MAN(1)
+
+
+
+NNAAMMEE
+ tbl-macro-man - man macro in a table
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +--+---+
+ |a | b |
+ +--+---+
+ |c | d |
+ +--+---+
+ normal text
+
+
+
+ December 16, 2014 TBL-MACRO-MAN(1)
diff --git a/regress/tbl/macro/man.out_lint b/regress/tbl/macro/man.out_lint
new file mode 100644
index 00000000..292af268
--- /dev/null
+++ b/regress/tbl/macro/man.out_lint
@@ -0,0 +1,2 @@
+mandoc: man.in:9:5: ERROR: ignoring extra tbl data cells: stray
+mandoc: man.in:12:2: UNSUPP: ignoring macro in table: SM d
diff --git a/regress/tbl/macro/nested.in b/regress/tbl/macro/nested.in
new file mode 100644
index 00000000..35844eb5
--- /dev/null
+++ b/regress/tbl/macro/nested.in
@@ -0,0 +1,16 @@
+.TH TBL-MACRO-NESTED 1 "December 16, 2014"
+.SH NAME
+tbl-macro-nested \- nested table
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+l | l .
+a:b
+_
+c:d
+.TS
+e:f
+.TE
+.PP
+normal text
diff --git a/regress/tbl/macro/nested.out_ascii b/regress/tbl/macro/nested.out_ascii
new file mode 100644
index 00000000..24a5c17a
--- /dev/null
+++ b/regress/tbl/macro/nested.out_ascii
@@ -0,0 +1,21 @@
+TBL-MACRO-NESTED(1) General Commands Manual TBL-MACRO-NESTED(1)
+
+
+
+NNAAMMEE
+ tbl-macro-nested - nested table
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +--+---+
+ |a | b |
+ +--+---+
+ |c | d |
+ |e | f |
+ +--+---+
+ normal text
+
+
+
+ December 16, 2014 TBL-MACRO-NESTED(1)
diff --git a/regress/tbl/macro/nested.out_lint b/regress/tbl/macro/nested.out_lint
new file mode 100644
index 00000000..0f650c85
--- /dev/null
+++ b/regress/tbl/macro/nested.out_lint
@@ -0,0 +1 @@
+mandoc: nested.in:12:4: UNSUPP: ignoring macro in table: TS
diff --git a/regress/tbl/mod/Makefile b/regress/tbl/mod/Makefile
new file mode 100644
index 00000000..c5bebb0f
--- /dev/null
+++ b/regress/tbl/mod/Makefile
@@ -0,0 +1,15 @@
+# $OpenBSD: Makefile,v 1.2 2015/02/10 11:02:19 schwarze Exp $
+
+REGRESS_TARGETS = badfont expand font misalign
+LINT_TARGETS = badfont font
+
+# groff-1.22.3 defects:
+# - The "f" font modifier swallows a following newline character.
+# - When space is insufficient (on either side) for properly aligning
+# a number, GNU tbl(1) moves the number too much to the right,
+# overflowing the column, even if space would be sufficient without
+# left padding.
+
+SKIP_GROFF = badfont misalign
+
+.include <bsd.regress.mk>
diff --git a/regress/tbl/mod/badfont.in b/regress/tbl/mod/badfont.in
new file mode 100644
index 00000000..4b765aef
--- /dev/null
+++ b/regress/tbl/mod/badfont.in
@@ -0,0 +1,14 @@
+.TH TBL-MOD-BADFONT 1 "February 10, 2015" OpenBSD
+.SH NAME
+tbl-mod-badfont \- invalid font modifiers in table layouts
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+lfB lf
+lfI lf.
+lfB lfI.
+bold:none
+italic:none
+bold:italic
+.TE
diff --git a/regress/tbl/mod/badfont.out_ascii b/regress/tbl/mod/badfont.out_ascii
new file mode 100644
index 00000000..b0788c50
--- /dev/null
+++ b/regress/tbl/mod/badfont.out_ascii
@@ -0,0 +1,18 @@
+TBL-MOD-BADFONT(1) General Commands Manual TBL-MOD-BADFONT(1)
+
+
+
+NNAAMMEE
+ tbl-mod-badfont - invalid font modifiers in table layouts
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +----------------+
+ |bboolldd none |
+ |_i_t_a_l_i_c none |
+ |bboolldd _i_t_a_l_i_c |
+ +----------------+
+
+
+OpenBSD February 10, 2015 TBL-MOD-BADFONT(1)
diff --git a/regress/tbl/mod/badfont.out_lint b/regress/tbl/mod/badfont.out_lint
new file mode 100644
index 00000000..0882648c
--- /dev/null
+++ b/regress/tbl/mod/badfont.out_lint
@@ -0,0 +1,2 @@
+mandoc: badfont.in:8:7: WARNING: unknown font, skipping request: TS f
+mandoc: badfont.in:9:7: WARNING: unknown font, skipping request: TS f.
diff --git a/regress/tbl/mod/expand.in b/regress/tbl/mod/expand.in
new file mode 100644
index 00000000..dbb490f5
--- /dev/null
+++ b/regress/tbl/mod/expand.in
@@ -0,0 +1,225 @@
+.TH TBL-MOD-EXPAND 1 "January 27, 2015" OpenBSD
+.SH NAME
+tbl-mod-expand \- expand modifier in table layout
+.SH DESCRIPTION
+normal text
+.TS
+tab(:);
+lx lx l.
+x:x:123456789012345678901234567890123456789012345678901234567890123
+.TE
+.TS
+tab(:);
+lx lx l.
+x:x:12345678901234567890123456789012345678901234567890123456789012
+.TE
+.TS
+tab(:);
+lx lx l.
+x:x:1234567890123456789012345678901234567890123456789012345678901
+.TE
+.TS
+tab(:);
+lx lx l.
+x:x:123456789012345678901234567890123456789012345678901234567890
+.TE
+.TS
+tab(:);
+lx lx lx l.
+x:x:x:12345678901234567890123456789012345678901234567890123456789
+.TE
+.TS
+tab(:);
+lx lx lx l.
+x:x:x:1234567890123456789012345678901234567890123456789012345678
+.TE
+.TS
+tab(:);
+lx lx lx l.
+x:x:x:123456789012345678901234567890123456789012345678901234567
+.TE
+.TS
+tab(:);
+lx lx lx l.
+x:x:x:12345678901234567890123456789012345678901234567890123456
+.TE
+.TS
+tab(:);
+lx lx lx lx l.
+x:x:x:x:1234567890123456789012345678901234567890123456789012345
+.TE
+.TS
+tab(:);
+lx lx lx lx l.
+x:x:x:x:123456789012345678901234567890123456789012345678901234
+.TE
+.TS
+tab(:);
+lx lx lx lx l.
+x:x:x:x:12345678901234567890123456789012345678901234567890123
+.TE
+.TS
+tab(:);
+lx lx lx lx l.
+x:x:x:x:1234567890123456789012345678901234567890123456789012
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l.
+x:x:x:x:x:123456789012345678901234567890123456789012345678901
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l.
+x:x:x:x:x:12345678901234567890123456789012345678901234567890
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l.
+x:x:x:x:x:1234567890123456789012345678901234567890123456789
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l.
+x:x:x:x:x:123456789012345678901234567890123456789012345678
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l.
+x:x:x:x:x:12345678901234567890123456789012345678901234567
+.TE
+.TS
+tab(:);
+lx lx lx lx lx lx l.
+x:x:x:x:x:x:1234567890123456789012345678901234567890123456
+.TE
+.TS
+tab(:);
+lx lx lx lx lx lx l.
+x:x:x:x:x:x:123456789012345678901234567890123456789012345
+.TE
+.TS
+tab(:);
+lx lx lx lx lx lx l.
+x:x:x:x:x:x:12345678901234567890123456789012345678901234
+.TE
+.TS
+tab(:);
+lx lx lx lx lx lx l.
+x:x:x:x:x:x:1234567890123456789012345678901234567890123
+.TE
+.TS
+tab(:);
+lx lx lx lx lx lx l.
+x:x:x:x:x:x:123456789012345678901234567890123456789012
+.TE
+.TS
+tab(:);
+lx l rx.
+x:123456789012345678901234567890123456789012345678901234567890123:x
+.TE
+.TS
+tab(:);
+lx l rx.
+x:12345678901234567890123456789012345678901234567890123456789012:x
+.TE
+.TS
+tab(:);
+lx l rx.
+x:1234567890123456789012345678901234567890123456789012345678901:x
+.TE
+.TS
+tab(:);
+lx l rx.
+x:123456789012345678901234567890123456789012345678901234567890:x
+.TE
+.TS
+tab(:);
+lx lx l rx.
+x:x:12345678901234567890123456789012345678901234567890123456789:x
+.TE
+.TS
+tab(:);
+lx lx l rx.
+x:x:1234567890123456789012345678901234567890123456789012345678:x
+.TE
+.TS
+tab(:);
+lx lx l rx.
+x:x:123456789012345678901234567890123456789012345678901234567:x
+.TE
+.TS
+tab(:);
+lx lx l rx.
+x:x:12345678901234567890123456789012345678901234567890123456:x
+.TE
+.TS
+tab(:);
+lx lx lx l rx.
+x:x:x:1234567890123456789012345678901234567890123456789012345:x
+.TE
+.TS
+tab(:);
+lx lx lx l rx.
+x:x:x:123456789012345678901234567890123456789012345678901234:x
+.TE
+.TS
+tab(:);
+lx lx lx l rx.
+x:x:x:12345678901234567890123456789012345678901234567890123:x
+.TE
+.TS
+tab(:);
+lx lx lx l rx.
+x:x:x:1234567890123456789012345678901234567890123456789012:x
+.TE
+.TS
+tab(:);
+lx lx lx lx l rx.
+x:x:x:x:123456789012345678901234567890123456789012345678901:x
+.TE
+.TS
+tab(:);
+lx lx lx lx l rx.
+x:x:x:x:12345678901234567890123456789012345678901234567890:x
+.TE
+.TS
+tab(:);
+lx lx lx lx l rx.
+x:x:x:x:1234567890123456789012345678901234567890123456789:x
+.TE
+.TS
+tab(:);
+lx lx lx lx l rx.
+x:x:x:x:123456789012345678901234567890123456789012345678:x
+.TE
+.TS
+tab(:);
+lx lx lx lx l rx.
+x:x:x:x:12345678901234567890123456789012345678901234567:x
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l rx.
+x:x:x:x:x:1234567890123456789012345678901234567890123456:x
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l rx.
+x:x:x:x:x:123456789012345678901234567890123456789012345:x
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l rx.
+x:x:x:x:x:12345678901234567890123456789012345678901234:x
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l rx.
+x:x:x:x:x:1234567890123456789012345678901234567890123:x
+.TE
+.TS
+tab(:);
+lx lx lx lx lx l rx.
+x:x:x:x:x:123456789012345678901234567890123456789012:x
+.TE
diff --git a/regress/tbl/mod/expand.out_ascii b/regress/tbl/mod/expand.out_ascii
new file mode 100644
index 00000000..2b4d193a
--- /dev/null
+++ b/regress/tbl/mod/expand.out_ascii
@@ -0,0 +1,101 @@
+TBL-MOD-EXPAND(1) General Commands Manual TBL-MOD-EXPAND(1)
+
+
+
+NNAAMMEE
+ tbl-mod-expand - expand modifier in table layout
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ x x 123456789012345678901234567890123456789012345678901234567890123
+
+ x x 12345678901234567890123456789012345678901234567890123456789012
+
+ x x 1234567890123456789012345678901234567890123456789012345678901
+
+ x x 123456789012345678901234567890123456789012345678901234567890
+
+ x x x 12345678901234567890123456789012345678901234567890123456789
+
+ x x x 1234567890123456789012345678901234567890123456789012345678
+
+ x x x 123456789012345678901234567890123456789012345678901234567
+
+ x x x 12345678901234567890123456789012345678901234567890123456
+
+ x x x x 1234567890123456789012345678901234567890123456789012345
+
+ x x x x 123456789012345678901234567890123456789012345678901234
+
+ x x x x 12345678901234567890123456789012345678901234567890123
+
+ x x x x 1234567890123456789012345678901234567890123456789012
+
+ x x x x x 123456789012345678901234567890123456789012345678901
+
+ x x x x x 12345678901234567890123456789012345678901234567890
+
+ x x x x x 1234567890123456789012345678901234567890123456789
+
+ x x x x x 123456789012345678901234567890123456789012345678
+
+ x x x x x 12345678901234567890123456789012345678901234567
+
+ x x x x x x 1234567890123456789012345678901234567890123456
+
+ x x x x x x 123456789012345678901234567890123456789012345
+
+ x x x x x x 12345678901234567890123456789012345678901234
+
+ x x x x x x 1234567890123456789012345678901234567890123
+
+ x x x x x x 123456789012345678901234567890123456789012
+
+ x 123456789012345678901234567890123456789012345678901234567890123 x
+
+ x 12345678901234567890123456789012345678901234567890123456789012 x
+
+ x 1234567890123456789012345678901234567890123456789012345678901 x
+
+ x 123456789012345678901234567890123456789012345678901234567890 x
+
+ x x 12345678901234567890123456789012345678901234567890123456789 x
+
+ x x 1234567890123456789012345678901234567890123456789012345678 x
+
+ x x 123456789012345678901234567890123456789012345678901234567 x
+
+ x x 12345678901234567890123456789012345678901234567890123456 x
+
+ x x x 1234567890123456789012345678901234567890123456789012345 x
+
+ x x x 123456789012345678901234567890123456789012345678901234 x
+
+ x x x 12345678901234567890123456789012345678901234567890123 x
+
+ x x x 1234567890123456789012345678901234567890123456789012 x
+
+ x x x x 123456789012345678901234567890123456789012345678901 x
+
+ x x x x 12345678901234567890123456789012345678901234567890 x
+
+ x x x x 1234567890123456789012345678901234567890123456789 x
+
+ x x x x 123456789012345678901234567890123456789012345678 x
+
+ x x x x 12345678901234567890123456789012345678901234567 x
+
+ x x x x x 1234567890123456789012345678901234567890123456 x
+
+ x x x x x 123456789012345678901234567890123456789012345 x
+
+ x x x x x 12345678901234567890123456789012345678901234 x
+
+ x x x x x 1234567890123456789012345678901234567890123 x
+
+ x x x x x 123456789012345678901234567890123456789012 x
+
+
+
+OpenBSD January 27, 2015 TBL-MOD-EXPAND(1)
diff --git a/regress/tbl/mod/font.in b/regress/tbl/mod/font.in
new file mode 100644
index 00000000..b371bfcb
--- /dev/null
+++ b/regress/tbl/mod/font.in
@@ -0,0 +1,14 @@
+.TH TBL-MOD-FONT 1 "February 10, 2015" OpenBSD
+.SH NAME
+tbl-mod-font \- font modifiers in table layouts
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+cb|cfCW|ci
+cFI | cf(foobar) | cFB.
+bold:roman:italic
+_
+italic:roman:bold
+and:so:on
+.TE
diff --git a/regress/tbl/mod/font.out_ascii b/regress/tbl/mod/font.out_ascii
new file mode 100644
index 00000000..70438643
--- /dev/null
+++ b/regress/tbl/mod/font.out_ascii
@@ -0,0 +1,19 @@
+TBL-MOD-FONT(1) General Commands Manual TBL-MOD-FONT(1)
+
+
+
+NNAAMMEE
+ tbl-mod-font - font modifiers in table layouts
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +-------+-------+--------+
+ | bboolldd | roman | _i_t_a_l_i_c |
+ +-------+-------+--------+
+ |_i_t_a_l_i_c | roman | bboolldd |
+ | _a_n_d | so | oonn |
+ +-------+-------+--------+
+
+
+OpenBSD February 10, 2015 TBL-MOD-FONT(1)
diff --git a/regress/tbl/mod/font.out_lint b/regress/tbl/mod/font.out_lint
new file mode 100644
index 00000000..14506a51
--- /dev/null
+++ b/regress/tbl/mod/font.out_lint
@@ -0,0 +1 @@
+mandoc: font.in:8:6: WARNING: unknown font, skipping request: TS fCW|ci
diff --git a/regress/tbl/mod/misalign.in b/regress/tbl/mod/misalign.in
new file mode 100644
index 00000000..1f6bde49
--- /dev/null
+++ b/regress/tbl/mod/misalign.in
@@ -0,0 +1,16 @@
+.TH TBL-MOD-MISALIGN 1 "December 24, 2014" OpenBSD
+.SH NAME
+tbl-mod-misalign \- failing alignment in tables
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+n, nz.
+12.34
+_
+100.0
+0.001
+_
+1000.0
+0.0001
+.TE
diff --git a/regress/tbl/mod/misalign.out_ascii b/regress/tbl/mod/misalign.out_ascii
new file mode 100644
index 00000000..03e9b36c
--- /dev/null
+++ b/regress/tbl/mod/misalign.out_ascii
@@ -0,0 +1,22 @@
+TBL-MOD-MISALIGN(1) General Commands Manual TBL-MOD-MISALIGN(1)
+
+
+
+NNAAMMEE
+ tbl-mod-misalign - failing alignment in tables
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +------+
+ |12.34 |
+ +------+
+ |100.0 |
+ |0.001 |
+ +------+
+ |1000.0 |
+ |0.0001 |
+ +------+
+
+
+OpenBSD December 24, 2014 TBL-MOD-MISALIGN(1)
diff --git a/regress/tbl/opt/Makefile b/regress/tbl/opt/Makefile
new file mode 100644
index 00000000..ed9676b5
--- /dev/null
+++ b/regress/tbl/opt/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1.1.1 2015/01/29 23:24:24 schwarze Exp $
+
+REGRESS_TARGETS = box center invalid
+LINT_TARGETS = invalid
+
+.include <bsd.regress.mk>
diff --git a/regress/tbl/opt/box.in b/regress/tbl/opt/box.in
new file mode 100644
index 00000000..c892401c
--- /dev/null
+++ b/regress/tbl/opt/box.in
@@ -0,0 +1,39 @@
+.TH TBL-VERT 1
+.SH NAME
+tbl-vert \- vertical lines
+.SH DESCRIPTION
+no boxing:
+.TS
+tab(:);
+l l.
+a:b
+c:d
+.TE
+.sp
+automatic boxing:
+.TS
+tab(:) box;
+l l.
+a:b
+c:d
+.TE
+.sp
+manual boxing:
+.TS
+tab(:);
+||l||l||.
+_
+a:b
+_
+c:d
+_
+.TE
+.sp
+automatic and manual boxing:
+.TS
+tab(:) box;
+||l||l||.
+a:b
+_
+c:d
+.TE
diff --git a/regress/tbl/opt/box.out_ascii b/regress/tbl/opt/box.out_ascii
new file mode 100644
index 00000000..87ff5cf8
--- /dev/null
+++ b/regress/tbl/opt/box.out_ascii
@@ -0,0 +1,37 @@
+TBL-VERT(1) General Commands Manual TBL-VERT(1)
+
+
+
+NNAAMMEE
+ tbl-vert - vertical lines
+
+DDEESSCCRRIIPPTTIIOONN
+ no boxing:
+
+ a b
+ c d
+
+ automatic boxing:
+
+ +------+
+ |a b |
+ |c d |
+ +------+
+ manual boxing:
+
+ +--++--+
+ |a ||b |
+ +--++--+
+ |c ||d |
+ +--++--+
+
+ automatic and manual boxing:
+
+ +--++--+
+ |a ||b |
+ +--++--+
+ |c ||d |
+ +--++--+
+
+
+ TBL-VERT(1)
diff --git a/regress/tbl/opt/center.in b/regress/tbl/opt/center.in
new file mode 100644
index 00000000..7c05202c
--- /dev/null
+++ b/regress/tbl/opt/center.in
@@ -0,0 +1,98 @@
+.TH TBL-LAYOUT_CENTER 1 "January 28, 2015" OpenBSD
+.SH NAME
+tbl-layout_center \- center a table as a whole
+.SH DESCRIPTION
+normal text
+.TS
+center; l.
+12345678901234567890123456789012345678901234567890123456789012345678901\
+234567890123456
+.TE
+.TS
+center; l.
+12345678901234567890123456789012345678901234567890123456789012345678901\
+23456789012345
+.TE
+.TS
+center; l.
+12345678901234567890123456789012345678901234567890123456789012345678901\
+2345678901234
+.TE
+.TS
+center; l.
+12345678901234567890123456789012345678901234567890123456789012345678901234
+.TE
+.TS
+center; l.
+1234567890123456789012345678901234567890123456789012345678901234567890123
+.TE
+.TS
+center; l.
+123456789012345678901234567890123456789012345678901234567890123456789012
+.TE
+.TS
+center; l.
+12345678901234567890123456789012345678901234567890123456789012345678901
+.TE
+.TS
+center; l.
+1234567890123456789012345678901234567890123456789012345678901234567890
+.TE
+.TS
+center; l.
+123456789012345678901234567890123456789012345678901234567890123456789
+.TE
+.TS
+center; l.
+12345678901234567890123456789012345678901234567890123456789012345678
+.TE
+.TS
+center; l|.
+_
+txt
+.TE
+.TS
+center; l|.
+_
+text
+.TE
+.TS
+center; |l.
+_
+txt
+.TE
+.TS
+center; |l.
+_
+text
+.TE
+.TS
+center; |l|.
+_
+txt
+.TE
+.TS
+center; |l|.
+_
+text
+.TE
+.TS
+center tab(:); |l||l|.
+_
+txt:text
+.TE
+.TS
+center tab(:); |l||l|.
+_
+text:text
+.TE
+.TS
+center box; l.
+txt
+.TE
+.PP
+normal text
+.TS
+center box; l.
+text
+.TE
diff --git a/regress/tbl/opt/center.out_ascii b/regress/tbl/opt/center.out_ascii
new file mode 100644
index 00000000..8df45eec
--- /dev/null
+++ b/regress/tbl/opt/center.out_ascii
@@ -0,0 +1,65 @@
+TBL-LAYOUT_CENTER(1) General Commands Manual TBL-LAYOUT_CENTER(1)
+
+
+
+NNAAMMEE
+ tbl-layout_center - center a table as a whole
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+12345678901234567890123456789012345678901234567890123456789012345678901234567890123456
+
+1234567890123456789012345678901234567890123456789012345678901234567890123456789012345
+
+ 123456789012345678901234567890123456789012345678901234567890123456789012345678901234
+
+ 12345678901234567890123456789012345678901234567890123456789012345678901234
+
+ 1234567890123456789012345678901234567890123456789012345678901234567890123
+
+ 123456789012345678901234567890123456789012345678901234567890123456789012
+
+ 12345678901234567890123456789012345678901234567890123456789012345678901
+
+ 1234567890123456789012345678901234567890123456789012345678901234567890
+
+ 123456789012345678901234567890123456789012345678901234567890123456789
+
+ 12345678901234567890123456789012345678901234567890123456789012345678
+
+ ----+
+ txt |
+
+ -----+
+ text |
+
+ +----
+ |txt
+
+ +-----
+ |text
+
+ +----+
+ |txt |
+
+ +-----+
+ |text |
+
+ +----++-----+
+ |txt ||text |
+
+ +-----++-----+
+ |text ||text |
+
+ +----+
+ |txt |
+ +----+
+ normal text
+
+ +-----+
+ |text |
+ +-----+
+
+
+OpenBSD January 28, 2015 TBL-LAYOUT_CENTER(1)
diff --git a/regress/tbl/opt/invalid.in b/regress/tbl/opt/invalid.in
new file mode 100644
index 00000000..24b2fdfd
--- /dev/null
+++ b/regress/tbl/opt/invalid.in
@@ -0,0 +1,19 @@
+.TH TBL-OPT 1 "January 25, 2015" OpenBSD
+.SH NAME
+tbl-opt \- table options
+.SH DESCRIPTION
+normal text
+.TS
+tab decimalpoint (,x) %foo box;
+n n .
+10.0 0.01
+0.01 10.0
+.TE
+.PP
+normal text
+.TS
+ , box,tab(:) delim($$); l l .
+a:b
+.TE
+.PP
+normal text
diff --git a/regress/tbl/opt/invalid.out_ascii b/regress/tbl/opt/invalid.out_ascii
new file mode 100644
index 00000000..320b8023
--- /dev/null
+++ b/regress/tbl/opt/invalid.out_ascii
@@ -0,0 +1,24 @@
+TBL-OPT(1) General Commands Manual TBL-OPT(1)
+
+
+
+NNAAMMEE
+ tbl-opt - table options
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +--------------+
+ |10.0 0.01 |
+ | 0.01 10.0 |
+ +--------------+
+ normal text
+
+ +------+
+ |a b |
+ +------+
+ normal text
+
+
+
+OpenBSD January 25, 2015 TBL-OPT(1)
diff --git a/regress/tbl/opt/invalid.out_lint b/regress/tbl/opt/invalid.out_lint
new file mode 100644
index 00000000..56c65e47
--- /dev/null
+++ b/regress/tbl/opt/invalid.out_lint
@@ -0,0 +1,5 @@
+mandoc: invalid.in:7:5: ERROR: missing tbl option argument: tab
+mandoc: invalid.in:7:19: ERROR: wrong tbl option argument size: decimalpoint want 1 have 2
+mandoc: invalid.in:7:23: ERROR: non-alphabetic character in tbl options: %
+mandoc: invalid.in:7:24: ERROR: skipping unknown tbl option: foo
+mandoc: invalid.in:15:21: UNSUPP: eqn delim option in tbl: $$