summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rwxr-xr-xregress/copyless14
-rw-r--r--regress/man/IP/Makefile7
-rw-r--r--regress/man/IP/empty.in4
-rw-r--r--regress/man/IP/empty.out_ascii4
-rw-r--r--regress/man/IP/empty.out_html18
-rw-r--r--regress/man/IP/empty.out_lint4
-rw-r--r--regress/man/IP/empty.out_tag3
-rw-r--r--regress/man/IP/literal.out_html8
-rw-r--r--regress/man/IP/tag.in18
-rw-r--r--regress/man/IP/tag.out_ascii23
-rw-r--r--regress/man/IP/tag.out_html10
-rw-r--r--regress/man/IP/tag.out_tag2
-rw-r--r--regress/man/TP/Makefile7
-rw-r--r--regress/man/TP/literal.out_html4
-rw-r--r--regress/man/TP/tag.in31
-rw-r--r--regress/man/TP/tag.out_ascii29
-rw-r--r--regress/man/TP/tag.out_html16
-rw-r--r--regress/man/TP/tag.out_tag3
-rw-r--r--regress/man/TP/vert.out_html4
-rw-r--r--regress/mdoc/Cm/Makefile6
-rw-r--r--regress/mdoc/Cm/tag.in21
-rw-r--r--regress/mdoc/Cm/tag.out_ascii17
-rw-r--r--regress/mdoc/Cm/tag.out_html9
-rw-r--r--regress/mdoc/Cm/tag.out_markdown23
-rw-r--r--regress/mdoc/Cm/tag.out_tag4
-rw-r--r--regress/mdoc/Dv/Makefile6
-rw-r--r--regress/mdoc/Dv/tag.in21
-rw-r--r--regress/mdoc/Dv/tag.out_ascii17
-rw-r--r--regress/mdoc/Dv/tag.out_html9
-rw-r--r--regress/mdoc/Dv/tag.out_markdown23
-rw-r--r--regress/mdoc/Dv/tag.out_tag4
-rw-r--r--regress/mdoc/Em/Makefile6
-rw-r--r--regress/mdoc/Em/tag.in23
-rw-r--r--regress/mdoc/Em/tag.out_ascii17
-rw-r--r--regress/mdoc/Em/tag.out_html10
-rw-r--r--regress/mdoc/Em/tag.out_markdown25
-rw-r--r--regress/mdoc/Em/tag.out_tag5
-rw-r--r--regress/mdoc/Er/Makefile6
-rw-r--r--regress/mdoc/Er/tag.in21
-rw-r--r--regress/mdoc/Er/tag.out_ascii16
-rw-r--r--regress/mdoc/Er/tag.out_html12
-rw-r--r--regress/mdoc/Er/tag.out_markdown25
-rw-r--r--regress/mdoc/Er/tag.out_tag2
-rw-r--r--regress/mdoc/Ev/Makefile6
-rw-r--r--regress/mdoc/Ev/tag.in21
-rw-r--r--regress/mdoc/Ev/tag.out_ascii17
-rw-r--r--regress/mdoc/Ev/tag.out_html9
-rw-r--r--regress/mdoc/Ev/tag.out_markdown23
-rw-r--r--regress/mdoc/Ev/tag.out_tag4
-rw-r--r--regress/mdoc/Fl/Makefile7
-rw-r--r--regress/mdoc/Fl/tag.in21
-rw-r--r--regress/mdoc/Fl/tag.out_ascii17
-rw-r--r--regress/mdoc/Fl/tag.out_html8
-rw-r--r--regress/mdoc/Fl/tag.out_markdown23
-rw-r--r--regress/mdoc/Fl/tag.out_tag4
-rw-r--r--regress/mdoc/Fo/Makefile6
-rw-r--r--regress/mdoc/Fo/tag.in29
-rw-r--r--regress/mdoc/Fo/tag.out_ascii17
-rw-r--r--regress/mdoc/Fo/tag.out_html9
-rw-r--r--regress/mdoc/Fo/tag.out_markdown27
-rw-r--r--regress/mdoc/Fo/tag.out_tag4
-rw-r--r--regress/mdoc/Ic/Makefile6
-rw-r--r--regress/mdoc/Ic/tag.in21
-rw-r--r--regress/mdoc/Ic/tag.out_ascii17
-rw-r--r--regress/mdoc/Ic/tag.out_html9
-rw-r--r--regress/mdoc/Ic/tag.out_markdown23
-rw-r--r--regress/mdoc/Ic/tag.out_tag4
-rw-r--r--regress/mdoc/Li/Makefile6
-rw-r--r--regress/mdoc/Li/tag.in21
-rw-r--r--regress/mdoc/Li/tag.out_ascii17
-rw-r--r--regress/mdoc/Li/tag.out_html9
-rw-r--r--regress/mdoc/Li/tag.out_markdown23
-rw-r--r--regress/mdoc/Li/tag.out_tag4
-rw-r--r--regress/mdoc/Makefile4
-rw-r--r--regress/mdoc/Ms/Makefile6
-rw-r--r--regress/mdoc/Ms/tag.in21
-rw-r--r--regress/mdoc/Ms/tag.out_ascii17
-rw-r--r--regress/mdoc/Ms/tag.out_html9
-rw-r--r--regress/mdoc/Ms/tag.out_markdown23
-rw-r--r--regress/mdoc/Ms/tag.out_tag4
-rw-r--r--regress/mdoc/No/Makefile6
-rw-r--r--regress/mdoc/No/punct.out_lint1
-rw-r--r--regress/mdoc/No/tag.in21
-rw-r--r--regress/mdoc/No/tag.out_ascii17
-rw-r--r--regress/mdoc/No/tag.out_html9
-rw-r--r--regress/mdoc/No/tag.out_markdown23
-rw-r--r--regress/mdoc/No/tag.out_tag4
-rw-r--r--regress/mdoc/Sy/Makefile6
-rw-r--r--regress/mdoc/Sy/tag.in23
-rw-r--r--regress/mdoc/Sy/tag.out_ascii17
-rw-r--r--regress/mdoc/Sy/tag.out_html10
-rw-r--r--regress/mdoc/Sy/tag.out_markdown25
-rw-r--r--regress/mdoc/Sy/tag.out_tag5
-rw-r--r--regress/mdoc/Tg/Makefile8
-rw-r--r--regress/mdoc/Tg/warn.in34
-rw-r--r--regress/mdoc/Tg/warn.out_ascii19
-rw-r--r--regress/mdoc/Tg/warn.out_html11
-rw-r--r--regress/mdoc/Tg/warn.out_lint6
-rw-r--r--regress/mdoc/Tg/warn.out_markdown30
-rw-r--r--regress/mdoc/Tg/warn.out_tag5
-rwxr-xr-xregress/regress.pl88
-rw-r--r--regress/regress.pl.113
102 files changed, 1331 insertions, 83 deletions
diff --git a/regress/copyless b/regress/copyless
new file mode 100755
index 00000000..a00c0009
--- /dev/null
+++ b/regress/copyless
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+umask 022
+if [ "$#" -ne 4 ]; then
+ echo "$0 $*: $# args instead of 4" 1>&2
+ exit 1
+fi
+if [ "$2" != "-T" ]; then
+ echo "$0 $*: second arg is not -T" 1>&2
+ exit 1
+fi
+cut -d ' ' -f 1,3 "$3" > "$1.mandoc_tag"
+cp "$4" "$1.mandoc_ascii"
+exit 0
diff --git a/regress/man/IP/Makefile b/regress/man/IP/Makefile
index 70094e5f..8d607c62 100644
--- a/regress/man/IP/Makefile
+++ b/regress/man/IP/Makefile
@@ -1,8 +1,9 @@
-# $OpenBSD: Makefile,v 1.10 2020/02/27 01:25:58 schwarze Exp $
+# $OpenBSD: Makefile,v 1.11 2020/03/13 00:31:05 schwarze Exp $
-REGRESS_TARGETS = bullet empty literal longhead manyargs spacing vert width
+REGRESS_TARGETS = bullet empty literal longhead manyargs spacing tag vert width
+TAG_TARGETS = empty tag
UTF8_TARGETS = bullet
LINT_TARGETS = empty
-HTML_TARGETS = bullet literal
+HTML_TARGETS = bullet empty literal tag
.include <bsd.regress.mk>
diff --git a/regress/man/IP/empty.in b/regress/man/IP/empty.in
index 21c42983..bb814870 100644
--- a/regress/man/IP/empty.in
+++ b/regress/man/IP/empty.in
@@ -1,8 +1,9 @@
-.\" $OpenBSD: empty.in,v 1.2 2017/07/04 14:53:23 schwarze Exp $
+.\" $OpenBSD: empty.in,v 1.3 2020/03/13 00:31:05 schwarze Exp $
.TH IP-EMPTY 1 "July 17, 2012"
.SH NAME
IP-empty \- empty indented paragraphs
.SH DESCRIPTION
+BEGINTEST
regular
text
.IP
@@ -25,3 +26,4 @@ text
.RE
regular
text
+ENDTEST
diff --git a/regress/man/IP/empty.out_ascii b/regress/man/IP/empty.out_ascii
index 24ab17fa..b17190ab 100644
--- a/regress/man/IP/empty.out_ascii
+++ b/regress/man/IP/empty.out_ascii
@@ -6,7 +6,7 @@ NNAAMMEE
IP-empty - empty indented paragraphs
DDEESSCCRRIIPPTTIIOONN
- regular text
+ BEGINTEST regular text
indented text
@@ -19,7 +19,7 @@ DDEESSCCRRIIPPTTIIOONN
Empty IP is deleted, RS does not cause additional spacing:
tag indented text
- regular text
+ regular text ENDTEST
diff --git a/regress/man/IP/empty.out_html b/regress/man/IP/empty.out_html
new file mode 100644
index 00000000..f2498dba
--- /dev/null
+++ b/regress/man/IP/empty.out_html
@@ -0,0 +1,18 @@
+<dl class="Bl-tag">
+ <dt></dt>
+ <dd>indented text</dd>
+</dl>
+<p class="Pp">Empty IP is deleted:</p>
+<dl class="Bl-tag">
+ <dt id="tag1"><a class="permalink" href="#tag1">tag1</a></dt>
+ <dd></dd>
+ <dt id="tag2"><a class="permalink" href="#tag2">tag2</a></dt>
+ <dd>indented text</dd>
+</dl>
+<p class="Pp">Empty IP is deleted, RS does not cause additional spacing:</p>
+<div class="Bd-indent">
+<dl class="Bl-tag">
+ <dt id="tag"><a class="permalink" href="#tag">tag</a></dt>
+ <dd>indented text</dd>
+</dl>
+</div>
diff --git a/regress/man/IP/empty.out_lint b/regress/man/IP/empty.out_lint
index 6c666c88..3514b94f 100644
--- a/regress/man/IP/empty.out_lint
+++ b/regress/man/IP/empty.out_lint
@@ -1,2 +1,2 @@
-mandoc: empty.in:13:2: WARNING: skipping paragraph macro: IP empty
-mandoc: empty.in:20:2: WARNING: skipping paragraph macro: IP empty
+mandoc: empty.in:14:2: WARNING: skipping paragraph macro: IP empty
+mandoc: empty.in:21:2: WARNING: skipping paragraph macro: IP empty
diff --git a/regress/man/IP/empty.out_tag b/regress/man/IP/empty.out_tag
new file mode 100644
index 00000000..f35f1120
--- /dev/null
+++ b/regress/man/IP/empty.out_tag
@@ -0,0 +1,3 @@
+tag1 15
+tag2 17
+tag 21
diff --git a/regress/man/IP/literal.out_html b/regress/man/IP/literal.out_html
index b61fc843..3b9cc429 100644
--- a/regress/man/IP/literal.out_html
+++ b/regress/man/IP/literal.out_html
@@ -1,5 +1,5 @@
<dl class="Bl-tag">
- <dt>tag</dt>
+ <dt id="tag"><a class="permalink" href="#tag">tag</a></dt>
<dd>indented regular text</dd>
</dl>
<p class="Pp">new regular paragraph</p>
@@ -8,7 +8,7 @@ literal
text
</pre>
<dl class="Bl-tag">
- <dt>tag</dt>
+ <dt id="tag_2"><a class="permalink" href="#tag_2">tag</a></dt>
<dd>
<pre>
indented
@@ -32,7 +32,7 @@ literal
text
</pre>
<dl class="Bl-tag">
- <dt>tag</dt>
+ <dt id="tag_3"><a class="permalink" href="#tag_3">tag</a></dt>
<dd>
<pre>
indented
@@ -48,7 +48,7 @@ text
out of indented paragraph</a></h2>
<p class="Pp">regular text</p>
<dl class="Bl-tag">
- <dt>tag</dt>
+ <dt id="tag_4"><a class="permalink" href="#tag_4">tag</a></dt>
<dd>indented regular text
<pre>
indented
diff --git a/regress/man/IP/tag.in b/regress/man/IP/tag.in
new file mode 100644
index 00000000..038fa969
--- /dev/null
+++ b/regress/man/IP/tag.in
@@ -0,0 +1,18 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:05 schwarze Exp $
+.TH IP-TAG 1 "March 10, 2020"
+.SH NAME
+IP-tag \- automatic tagging of indented blocks
+.SH DESCRIPTION
+BEGINTEST
+initial
+text
+.IP " strong" 10n
+text
+.IP "-strong"
+text
+.IP "\&\fI \-weak\fP"
+text
+.IP " strong"
+text
+.PP
+ENDTEST
diff --git a/regress/man/IP/tag.out_ascii b/regress/man/IP/tag.out_ascii
new file mode 100644
index 00000000..afd4f587
--- /dev/null
+++ b/regress/man/IP/tag.out_ascii
@@ -0,0 +1,23 @@
+IP-TAG(1) General Commands Manual IP-TAG(1)
+
+
+
+NNAAMMEE
+ IP-tag - automatic tagging of indented blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST initial text
+
+ strong text
+
+ -strong text
+
+ _-_w_e_a_k text
+
+ strong text
+
+ ENDTEST
+
+
+
+OpenBSD March 10, 2020 IP-TAG(1)
diff --git a/regress/man/IP/tag.out_html b/regress/man/IP/tag.out_html
new file mode 100644
index 00000000..4d25b12b
--- /dev/null
+++ b/regress/man/IP/tag.out_html
@@ -0,0 +1,10 @@
+<dl class="Bl-tag">
+ <dt> strong</dt>
+ <dd>text</dd>
+ <dt id="strong"><a class="permalink" href="#strong">-strong</a></dt>
+ <dd>text</dd>
+ <dt id="weak"><a class="permalink" href="#weak"><i> -weak</i></a></dt>
+ <dd>text</dd>
+ <dt> strong</dt>
+ <dd>text</dd>
+</dl>
diff --git a/regress/man/IP/tag.out_tag b/regress/man/IP/tag.out_tag
new file mode 100644
index 00000000..5be038db
--- /dev/null
+++ b/regress/man/IP/tag.out_tag
@@ -0,0 +1,2 @@
+strong 13
+weak 15
diff --git a/regress/man/TP/Makefile b/regress/man/TP/Makefile
index ca2475b0..9dd2fde7 100644
--- a/regress/man/TP/Makefile
+++ b/regress/man/TP/Makefile
@@ -1,9 +1,10 @@
-# $OpenBSD: Makefile,v 1.16 2020/02/27 01:25:58 schwarze Exp $
+# $OpenBSD: Makefile,v 1.17 2020/03/13 00:31:05 schwarze Exp $
REGRESS_TARGETS = badarg broken double eof fill indent literal longhead
-REGRESS_TARGETS += macrotag manyargs sameline spacing vert width
+REGRESS_TARGETS += macrotag manyargs sameline spacing tag vert width
+TAG_TARGETS = tag
LINT_TARGETS = broken double eof
-HTML_TARGETS = literal vert
+HTML_TARGETS = literal tag vert
# groff-1.22.3 defects:
# - If .TP precedes .RE, the latter does not properly reset indentation.
diff --git a/regress/man/TP/literal.out_html b/regress/man/TP/literal.out_html
index 7f5b1c1f..8b818ed8 100644
--- a/regress/man/TP/literal.out_html
+++ b/regress/man/TP/literal.out_html
@@ -1,5 +1,5 @@
<dl class="Bl-tag">
- <dt>tag</dt>
+ <dt id="tag"><a class="permalink" href="#tag">tag</a></dt>
<dd>regular indented text</dd>
</dl>
<p class="Pp">regular paragraph</p>
@@ -8,7 +8,7 @@ literal
text
</pre>
<dl class="Bl-tag">
- <dt>tag</dt>
+ <dt id="tag_2"><a class="permalink" href="#tag_2">tag</a></dt>
<dd>
<pre>
indented
diff --git a/regress/man/TP/tag.in b/regress/man/TP/tag.in
new file mode 100644
index 00000000..34d1e151
--- /dev/null
+++ b/regress/man/TP/tag.in
@@ -0,0 +1,31 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:05 schwarze Exp $
+.TH IP-TAG 1 "March 10, 2020"
+.SH NAME
+IP-tag \- automatic tagging of indented blocks
+.SH DESCRIPTION
+BEGINTEST
+initial
+text
+.TP 10n
+.I " plain"
+text
+.TP
+plain
+text
+.TP
+.I "plain "
+text
+.TP
+\& strong
+text
+.TP
+.B -strong
+text
+.TP
+\&\fI \-weak\fP
+text
+.TP
+.B "strong "
+text
+.PP
+ENDTEST
diff --git a/regress/man/TP/tag.out_ascii b/regress/man/TP/tag.out_ascii
new file mode 100644
index 00000000..4da2efa0
--- /dev/null
+++ b/regress/man/TP/tag.out_ascii
@@ -0,0 +1,29 @@
+IP-TAG(1) General Commands Manual IP-TAG(1)
+
+
+
+NNAAMMEE
+ IP-tag - automatic tagging of indented blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST initial text
+
+ _p_l_a_i_n text
+
+ plain text
+
+ _p_l_a_i_n text
+
+ strong text
+
+ --ssttrroonngg text
+
+ _-_w_e_a_k text
+
+ ssttrroonngg text
+
+ ENDTEST
+
+
+
+OpenBSD March 10, 2020 IP-TAG(1)
diff --git a/regress/man/TP/tag.out_html b/regress/man/TP/tag.out_html
new file mode 100644
index 00000000..3fbbe41d
--- /dev/null
+++ b/regress/man/TP/tag.out_html
@@ -0,0 +1,16 @@
+<dl class="Bl-tag">
+ <dt><i> plain</i></dt>
+ <dd>text</dd>
+ <dt id="plain"><a class="permalink" href="#plain">plain</a></dt>
+ <dd>text</dd>
+ <dt><i>plain </i></dt>
+ <dd>text</dd>
+ <dt> strong</dt>
+ <dd>text</dd>
+ <dt id="strong"><a class="permalink" href="#strong"><b>-strong</b></a></dt>
+ <dd>text</dd>
+ <dt id="weak"><a class="permalink" href="#weak"><i> -weak</i></a></dt>
+ <dd>text</dd>
+ <dt><b>strong </b></dt>
+ <dd>text</dd>
+</dl>
diff --git a/regress/man/TP/tag.out_tag b/regress/man/TP/tag.out_tag
new file mode 100644
index 00000000..88f6cff8
--- /dev/null
+++ b/regress/man/TP/tag.out_tag
@@ -0,0 +1,3 @@
+plain 13
+strong 19
+weak 21
diff --git a/regress/man/TP/vert.out_html b/regress/man/TP/vert.out_html
index 7301819f..1124ed33 100644
--- a/regress/man/TP/vert.out_html
+++ b/regress/man/TP/vert.out_html
@@ -2,8 +2,8 @@
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<dl class="Bl-tag">
- <dt>tag</dt>
+ <dt id="tag"><a class="permalink" href="#tag">tag</a></dt>
<dd>text</dd>
- <dt>tag</dt>
+ <dt id="tag_2"><a class="permalink" href="#tag_2">tag</a></dt>
<dd>text</dd>
</dl>
diff --git a/regress/mdoc/Cm/Makefile b/regress/mdoc/Cm/Makefile
index 4b7066ec..7bc3fc20 100644
--- a/regress/mdoc/Cm/Makefile
+++ b/regress/mdoc/Cm/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.3 2014/07/02 20:18:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.7 2020/03/13 00:31:05 schwarze Exp $
-REGRESS_TARGETS = basic font noarg punct
+REGRESS_TARGETS = basic font noarg punct tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Cm/tag.in b/regress/mdoc/Cm/tag.in
new file mode 100644
index 00000000..2fe7d1e3
--- /dev/null
+++ b/regress/mdoc/Cm/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:05 schwarze Exp $
+.Dd $Mdocdate$
+.Dt CM-TAG 1
+.Os
+.Sh NAME
+.Nm Cm-tag
+.Nd tagging of command modifier macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Cm one | two
+text
+.It Xo
+.Cm three
+.Xc
+text
+.El
+.Tg
+.Cm four
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Cm/tag.out_ascii b/regress/mdoc/Cm/tag.out_ascii
new file mode 100644
index 00000000..071408c7
--- /dev/null
+++ b/regress/mdoc/Cm/tag.out_ascii
@@ -0,0 +1,17 @@
+CM-TAG(1) General Commands Manual CM-TAG(1)
+
+NNAAMMEE
+ CCmm--ttaagg - tagging of command modifier macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ oonnee | ttwwoo
+ text
+
+ tthhrreeee text
+ ffoouurr
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Cm/tag.out_html b/regress/mdoc/Cm/tag.out_html
new file mode 100644
index 00000000..a140fe3e
--- /dev/null
+++ b/regress/mdoc/Cm/tag.out_html
@@ -0,0 +1,9 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><code class="Cm" id="one">one</code></a>
+ |
+ <a class="permalink" href="#two"><code class="Cm" id="two">two</code></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><code class="Cm" id="three">three</code></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><code class="Cm" id="four">four</code></a>
diff --git a/regress/mdoc/Cm/tag.out_markdown b/regress/mdoc/Cm/tag.out_markdown
new file mode 100644
index 00000000..893a8fe5
--- /dev/null
+++ b/regress/mdoc/Cm/tag.out_markdown
@@ -0,0 +1,23 @@
+CM-TAG(1) - General Commands Manual
+
+# NAME
+
+**Cm-tag** - tagging of command modifier macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+**one** | **two**
+
+> text
+
+**three**
+
+> text
+
+**four**
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Cm/tag.out_tag b/regress/mdoc/Cm/tag.out_tag
new file mode 100644
index 00000000..94f0cfb2
--- /dev/null
+++ b/regress/mdoc/Cm/tag.out_tag
@@ -0,0 +1,4 @@
+one 9
+two 9
+three 12
+four 13
diff --git a/regress/mdoc/Dv/Makefile b/regress/mdoc/Dv/Makefile
index cfe3ad0b..979e1826 100644
--- a/regress/mdoc/Dv/Makefile
+++ b/regress/mdoc/Dv/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.2 2014/07/02 20:18:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.5 2020/03/13 00:31:05 schwarze Exp $
-REGRESS_TARGETS = font noarg
+REGRESS_TARGETS = font noarg tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Dv/tag.in b/regress/mdoc/Dv/tag.in
new file mode 100644
index 00000000..60d2716b
--- /dev/null
+++ b/regress/mdoc/Dv/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:05 schwarze Exp $
+.Dd $Mdocdate$
+.Dt DV-TAG 1
+.Os
+.Sh NAME
+.Nm Dv-tag
+.Nd tagging of defined variable macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Dv one | two
+text
+.It Xo
+.Dv three
+.Xc
+text
+.El
+.Tg
+.Dv four
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Dv/tag.out_ascii b/regress/mdoc/Dv/tag.out_ascii
new file mode 100644
index 00000000..119e3509
--- /dev/null
+++ b/regress/mdoc/Dv/tag.out_ascii
@@ -0,0 +1,17 @@
+DV-TAG(1) General Commands Manual DV-TAG(1)
+
+NNAAMMEE
+ DDvv--ttaagg - tagging of defined variable macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ one | two
+ text
+
+ three text
+ four
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Dv/tag.out_html b/regress/mdoc/Dv/tag.out_html
new file mode 100644
index 00000000..cee78340
--- /dev/null
+++ b/regress/mdoc/Dv/tag.out_html
@@ -0,0 +1,9 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><code class="Dv" id="one">one</code></a>
+ |
+ <a class="permalink" href="#two"><code class="Dv" id="two">two</code></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><code class="Dv" id="three">three</code></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><code class="Dv" id="four">four</code></a>
diff --git a/regress/mdoc/Dv/tag.out_markdown b/regress/mdoc/Dv/tag.out_markdown
new file mode 100644
index 00000000..29b454bb
--- /dev/null
+++ b/regress/mdoc/Dv/tag.out_markdown
@@ -0,0 +1,23 @@
+DV-TAG(1) - General Commands Manual
+
+# NAME
+
+**Dv-tag** - tagging of defined variable macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+`one` | `two`
+
+> text
+
+`three`
+
+> text
+
+`four`
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Dv/tag.out_tag b/regress/mdoc/Dv/tag.out_tag
new file mode 100644
index 00000000..94f0cfb2
--- /dev/null
+++ b/regress/mdoc/Dv/tag.out_tag
@@ -0,0 +1,4 @@
+one 9
+two 9
+three 12
+four 13
diff --git a/regress/mdoc/Em/Makefile b/regress/mdoc/Em/Makefile
index 13de4337..2b500444 100644
--- a/regress/mdoc/Em/Makefile
+++ b/regress/mdoc/Em/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.3 2014/11/17 06:44:35 schwarze Exp $
+# $OpenBSD: Makefile,v 1.6 2020/03/13 00:31:05 schwarze Exp $
-REGRESS_TARGETS = font noarg punct
+REGRESS_TARGETS = font noarg punct tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg punct
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Em/tag.in b/regress/mdoc/Em/tag.in
new file mode 100644
index 00000000..9d309835
--- /dev/null
+++ b/regress/mdoc/Em/tag.in
@@ -0,0 +1,23 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:05 schwarze Exp $
+.Dd $Mdocdate$
+.Dt EM-TAG 1
+.Os
+.Sh NAME
+.Nm Em-tag
+.Nd tagging of emphasis macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Em one | two
+text
+.It Xo
+.Em three
+.Xc
+text
+.El
+.Em four
+.Em one
+.Tg explicit
+.Em five
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Em/tag.out_ascii b/regress/mdoc/Em/tag.out_ascii
new file mode 100644
index 00000000..74f8212b
--- /dev/null
+++ b/regress/mdoc/Em/tag.out_ascii
@@ -0,0 +1,17 @@
+EM-TAG(1) General Commands Manual EM-TAG(1)
+
+NNAAMMEE
+ EEmm--ttaagg - tagging of emphasis macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ _o_n_e | _t_w_o
+ text
+
+ _t_h_r_e_e text
+ _f_o_u_r _o_n_e _f_i_v_e
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Em/tag.out_html b/regress/mdoc/Em/tag.out_html
new file mode 100644
index 00000000..4046673f
--- /dev/null
+++ b/regress/mdoc/Em/tag.out_html
@@ -0,0 +1,10 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><i class="Em" id="one">one</i></a> |
+ <a class="permalink" href="#two"><i class="Em" id="two">two</i></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><i class="Em" id="three">three</i></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><i class="Em" id="four">four</i></a>
+ <i class="Em">one</i>
+ <a class="permalink" href="#explicit"><i class="Em" id="explicit">five</i></a>
diff --git a/regress/mdoc/Em/tag.out_markdown b/regress/mdoc/Em/tag.out_markdown
new file mode 100644
index 00000000..4c107159
--- /dev/null
+++ b/regress/mdoc/Em/tag.out_markdown
@@ -0,0 +1,25 @@
+EM-TAG(1) - General Commands Manual
+
+# NAME
+
+**Em-tag** - tagging of emphasis macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+*one* | *two*
+
+> text
+
+*three*
+
+> text
+
+*four*
+*one*
+*five*
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Em/tag.out_tag b/regress/mdoc/Em/tag.out_tag
new file mode 100644
index 00000000..c2fbaf59
--- /dev/null
+++ b/regress/mdoc/Em/tag.out_tag
@@ -0,0 +1,5 @@
+one 9
+two 9
+three 12
+four 13
+explicit 13
diff --git a/regress/mdoc/Er/Makefile b/regress/mdoc/Er/Makefile
index 1be2a84a..55f6cc76 100644
--- a/regress/mdoc/Er/Makefile
+++ b/regress/mdoc/Er/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.7 2020/03/13 00:31:05 schwarze Exp $
-REGRESS_TARGETS = noarg font
+REGRESS_TARGETS = noarg font tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Er/tag.in b/regress/mdoc/Er/tag.in
new file mode 100644
index 00000000..bad7a88b
--- /dev/null
+++ b/regress/mdoc/Er/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:05 schwarze Exp $
+.Dd $Mdocdate$
+.Dt ER-TAG 1
+.Os
+.Sh NAME
+.Nm Er-tag
+.Nd tagging of error number macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Er one
+text
+.El
+.Tg
+.Er two
+.Sh ERRORS
+.Bl -tag -width Er
+.It Bq Er ENOENT
+text
+.El
+ENDTEST
diff --git a/regress/mdoc/Er/tag.out_ascii b/regress/mdoc/Er/tag.out_ascii
new file mode 100644
index 00000000..62dbf9ca
--- /dev/null
+++ b/regress/mdoc/Er/tag.out_ascii
@@ -0,0 +1,16 @@
+ER-TAG(1) General Commands Manual ER-TAG(1)
+
+NNAAMMEE
+ EErr--ttaagg - tagging of error number macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ one text
+ two
+
+EERRRROORRSS
+ [ENOENT] text
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Er/tag.out_html b/regress/mdoc/Er/tag.out_html
new file mode 100644
index 00000000..a2c2978f
--- /dev/null
+++ b/regress/mdoc/Er/tag.out_html
@@ -0,0 +1,12 @@
+<dl class="Bl-tag">
+ <dt><code class="Er">one</code></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#two"><code class="Er" id="two">two</code></a>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
+<dl class="Bl-tag">
+ <dt>[<a class="permalink" href="#ENOENT"><code class="Er" id="ENOENT">ENOENT</code></a>]</dt>
+ <dd>text</dd>
+</dl>
diff --git a/regress/mdoc/Er/tag.out_markdown b/regress/mdoc/Er/tag.out_markdown
new file mode 100644
index 00000000..d11eb4b9
--- /dev/null
+++ b/regress/mdoc/Er/tag.out_markdown
@@ -0,0 +1,25 @@
+ER-TAG(1) - General Commands Manual
+
+# NAME
+
+**Er-tag** - tagging of error number macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+`one`
+
+> text
+
+`two`
+
+# ERRORS
+
+\[`ENOENT`]
+
+> text
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Er/tag.out_tag b/regress/mdoc/Er/tag.out_tag
new file mode 100644
index 00000000..b00a6718
--- /dev/null
+++ b/regress/mdoc/Er/tag.out_tag
@@ -0,0 +1,2 @@
+two 10
+ENOENT 13
diff --git a/regress/mdoc/Ev/Makefile b/regress/mdoc/Ev/Makefile
index cfe3ad0b..979e1826 100644
--- a/regress/mdoc/Ev/Makefile
+++ b/regress/mdoc/Ev/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.2 2014/07/02 20:18:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.5 2020/03/13 00:31:05 schwarze Exp $
-REGRESS_TARGETS = font noarg
+REGRESS_TARGETS = font noarg tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ev/tag.in b/regress/mdoc/Ev/tag.in
new file mode 100644
index 00000000..014b0fbc
--- /dev/null
+++ b/regress/mdoc/Ev/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:05 schwarze Exp $
+.Dd $Mdocdate$
+.Dt EV-TAG 1
+.Os
+.Sh NAME
+.Nm Ev-tag
+.Nd tagging of environment variable macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Ev one | two
+text
+.It Xo
+.Ev three
+.Xc
+text
+.El
+.Tg
+.Ev four
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Ev/tag.out_ascii b/regress/mdoc/Ev/tag.out_ascii
new file mode 100644
index 00000000..5569d1c8
--- /dev/null
+++ b/regress/mdoc/Ev/tag.out_ascii
@@ -0,0 +1,17 @@
+EV-TAG(1) General Commands Manual EV-TAG(1)
+
+NNAAMMEE
+ EEvv--ttaagg - tagging of environment variable macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ one | two
+ text
+
+ three text
+ four
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Ev/tag.out_html b/regress/mdoc/Ev/tag.out_html
new file mode 100644
index 00000000..1e1c92b9
--- /dev/null
+++ b/regress/mdoc/Ev/tag.out_html
@@ -0,0 +1,9 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><code class="Ev" id="one">one</code></a>
+ |
+ <a class="permalink" href="#two"><code class="Ev" id="two">two</code></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><code class="Ev" id="three">three</code></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><code class="Ev" id="four">four</code></a>
diff --git a/regress/mdoc/Ev/tag.out_markdown b/regress/mdoc/Ev/tag.out_markdown
new file mode 100644
index 00000000..f9a6712b
--- /dev/null
+++ b/regress/mdoc/Ev/tag.out_markdown
@@ -0,0 +1,23 @@
+EV-TAG(1) - General Commands Manual
+
+# NAME
+
+**Ev-tag** - tagging of environment variable macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+`one` | `two`
+
+> text
+
+`three`
+
+> text
+
+`four`
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Ev/tag.out_tag b/regress/mdoc/Ev/tag.out_tag
new file mode 100644
index 00000000..94f0cfb2
--- /dev/null
+++ b/regress/mdoc/Ev/tag.out_tag
@@ -0,0 +1,4 @@
+one 9
+two 9
+three 12
+four 13
diff --git a/regress/mdoc/Fl/Makefile b/regress/mdoc/Fl/Makefile
index e4e4a6bc..c061adef 100644
--- a/regress/mdoc/Fl/Makefile
+++ b/regress/mdoc/Fl/Makefile
@@ -1,6 +1,9 @@
-# $OpenBSD: Makefile,v 1.13 2020/02/27 01:25:58 schwarze Exp $
+# $OpenBSD: Makefile,v 1.14 2020/03/13 00:31:06 schwarze Exp $
-REGRESS_TARGETS = font multiarg noarg parsed punct spacing
+REGRESS_TARGETS = font multiarg noarg parsed punct spacing tag
+TAG_TARGETS = tag
LINT_TARGETS = punct
+HTML_TARGETS = tag
+SKIP_TMAN = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Fl/tag.in b/regress/mdoc/Fl/tag.in
new file mode 100644
index 00000000..a4d3c135
--- /dev/null
+++ b/regress/mdoc/Fl/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt FL-TAG 1
+.Os
+.Sh NAME
+.Nm Fl-tag
+.Nd tagging of command line option macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Fl a | b
+text
+.It Xo
+.Fl c
+.Xc
+text
+.El
+.Tg
+.Fl d
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Fl/tag.out_ascii b/regress/mdoc/Fl/tag.out_ascii
new file mode 100644
index 00000000..4fcf803c
--- /dev/null
+++ b/regress/mdoc/Fl/tag.out_ascii
@@ -0,0 +1,17 @@
+FL-TAG(1) General Commands Manual FL-TAG(1)
+
+NNAAMMEE
+ FFll--ttaagg - tagging of command line option macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ --aa | --bb
+ text
+
+ --cc text
+ --dd
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Fl/tag.out_html b/regress/mdoc/Fl/tag.out_html
new file mode 100644
index 00000000..f67a30c0
--- /dev/null
+++ b/regress/mdoc/Fl/tag.out_html
@@ -0,0 +1,8 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#a"><code class="Fl" id="a">-a</code></a> |
+ <a class="permalink" href="#b"><code class="Fl" id="b">-b</code></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#c"><code class="Fl" id="c">-c</code></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#d"><code class="Fl" id="d">-d</code></a>
diff --git a/regress/mdoc/Fl/tag.out_markdown b/regress/mdoc/Fl/tag.out_markdown
new file mode 100644
index 00000000..1e7c6f14
--- /dev/null
+++ b/regress/mdoc/Fl/tag.out_markdown
@@ -0,0 +1,23 @@
+FL-TAG(1) - General Commands Manual
+
+# NAME
+
+**Fl-tag** - tagging of command line option macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+**-a** | **-b**
+
+> text
+
+**-c**
+
+> text
+
+**-d**
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Fl/tag.out_tag b/regress/mdoc/Fl/tag.out_tag
new file mode 100644
index 00000000..89a94151
--- /dev/null
+++ b/regress/mdoc/Fl/tag.out_tag
@@ -0,0 +1,4 @@
+a 9
+b 9
+c 12
+d 13
diff --git a/regress/mdoc/Fo/Makefile b/regress/mdoc/Fo/Makefile
index 7770e9a1..ce25ddf3 100644
--- a/regress/mdoc/Fo/Makefile
+++ b/regress/mdoc/Fo/Makefile
@@ -1,8 +1,10 @@
-# $OpenBSD: Makefile,v 1.17 2020/02/27 01:25:58 schwarze Exp $
+# $OpenBSD: Makefile,v 1.18 2020/03/13 00:31:06 schwarze Exp $
REGRESS_TARGETS = basic break eos font noarg nohead
-REGRESS_TARGETS += obsolete punct section transp warn
+REGRESS_TARGETS += obsolete punct section tag transp warn
+TAG_TARGETS = tag
LINT_TARGETS = noarg nohead obsolete punct warn
+HTML_TARGETS = tag
# groff-1.22.3 defects:
# - .Fo without an argument prints unbalanced parentheses
diff --git a/regress/mdoc/Fo/tag.in b/regress/mdoc/Fo/tag.in
new file mode 100644
index 00000000..727fdaf1
--- /dev/null
+++ b/regress/mdoc/Fo/tag.in
@@ -0,0 +1,29 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt FO-TAG 1
+.Os
+.Sh NAME
+.Nm Fo-tag
+.Nd tagging of function name macros
+.Sh DESCRIPTION
+BEGINTEST
+.Pp
+automatic:
+.Fn first
+and
+.Fn second
+.Pp
+.Fn second
+and
+.Fn first
+.Pp
+explicit:
+.Tg e3
+.Fn third
+and
+.Tg e4
+.Fo fourth
+.Fa void
+.Fc
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Fo/tag.out_ascii b/regress/mdoc/Fo/tag.out_ascii
new file mode 100644
index 00000000..505c0b7a
--- /dev/null
+++ b/regress/mdoc/Fo/tag.out_ascii
@@ -0,0 +1,17 @@
+FO-TAG(1) General Commands Manual FO-TAG(1)
+
+NNAAMMEE
+ FFoo--ttaagg - tagging of function name macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ automatic: ffiirrsstt() and sseeccoonndd()
+
+ sseeccoonndd() and ffiirrsstt()
+
+ explicit: tthhiirrdd() and ffoouurrtthh(_v_o_i_d)
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Fo/tag.out_html b/regress/mdoc/Fo/tag.out_html
new file mode 100644
index 00000000..b3508614
--- /dev/null
+++ b/regress/mdoc/Fo/tag.out_html
@@ -0,0 +1,9 @@
+<p class="Pp">automatic:
+ <a class="permalink" href="#first"><code class="Fn" id="first">first</code></a>()
+ and <code class="Fn">second</code>()</p>
+<p class="Pp"><a class="permalink" href="#second"><code class="Fn" id="second">second</code></a>()
+ and <code class="Fn">first</code>()</p>
+<p class="Pp">explicit:
+ <a class="permalink" href="#e3"><code class="Fn" id="e3">third</code></a>()
+ and
+ <a class="permalink" href="#e4"><code class="Fn" id="e4">fourth</code></a>(<var class="Fa">void</var>);</p>
diff --git a/regress/mdoc/Fo/tag.out_markdown b/regress/mdoc/Fo/tag.out_markdown
new file mode 100644
index 00000000..273a00d4
--- /dev/null
+++ b/regress/mdoc/Fo/tag.out_markdown
@@ -0,0 +1,27 @@
+FO-TAG(1) - General Commands Manual
+
+# NAME
+
+**Fo-tag** - tagging of function name macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+automatic:
+**first**()
+and
+**second**()
+
+**second**()
+and
+**first**()
+
+explicit:
+**third**()
+and
+**fourth**(*void*)
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Fo/tag.out_tag b/regress/mdoc/Fo/tag.out_tag
new file mode 100644
index 00000000..2387023c
--- /dev/null
+++ b/regress/mdoc/Fo/tag.out_tag
@@ -0,0 +1,4 @@
+first 9
+second 11
+e3 13
+e4 13
diff --git a/regress/mdoc/Ic/Makefile b/regress/mdoc/Ic/Makefile
index 33faa380..4a06ee20 100644
--- a/regress/mdoc/Ic/Makefile
+++ b/regress/mdoc/Ic/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2020/03/13 00:31:06 schwarze Exp $
-REGRESS_TARGETS = font noarg punct
+REGRESS_TARGETS = font noarg punct tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ic/tag.in b/regress/mdoc/Ic/tag.in
new file mode 100644
index 00000000..fb7b441e
--- /dev/null
+++ b/regress/mdoc/Ic/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt IC-TAG 1
+.Os
+.Sh NAME
+.Nm Ic-tag
+.Nd tagging of internal command macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Ic one | two
+text
+.It Xo
+.Ic three
+.Xc
+text
+.El
+.Tg
+.Ic four
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Ic/tag.out_ascii b/regress/mdoc/Ic/tag.out_ascii
new file mode 100644
index 00000000..513b2638
--- /dev/null
+++ b/regress/mdoc/Ic/tag.out_ascii
@@ -0,0 +1,17 @@
+IC-TAG(1) General Commands Manual IC-TAG(1)
+
+NNAAMMEE
+ IIcc--ttaagg - tagging of internal command macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ oonnee | ttwwoo
+ text
+
+ tthhrreeee text
+ ffoouurr
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Ic/tag.out_html b/regress/mdoc/Ic/tag.out_html
new file mode 100644
index 00000000..ad3cc1ef
--- /dev/null
+++ b/regress/mdoc/Ic/tag.out_html
@@ -0,0 +1,9 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><code class="Ic" id="one">one</code></a>
+ |
+ <a class="permalink" href="#two"><code class="Ic" id="two">two</code></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><code class="Ic" id="three">three</code></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><code class="Ic" id="four">four</code></a>
diff --git a/regress/mdoc/Ic/tag.out_markdown b/regress/mdoc/Ic/tag.out_markdown
new file mode 100644
index 00000000..c0f13879
--- /dev/null
+++ b/regress/mdoc/Ic/tag.out_markdown
@@ -0,0 +1,23 @@
+IC-TAG(1) - General Commands Manual
+
+# NAME
+
+**Ic-tag** - tagging of internal command macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+**one** | **two**
+
+> text
+
+**three**
+
+> text
+
+**four**
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Ic/tag.out_tag b/regress/mdoc/Ic/tag.out_tag
new file mode 100644
index 00000000..94f0cfb2
--- /dev/null
+++ b/regress/mdoc/Ic/tag.out_tag
@@ -0,0 +1,4 @@
+one 9
+two 9
+three 12
+four 13
diff --git a/regress/mdoc/Li/Makefile b/regress/mdoc/Li/Makefile
index 7b2a3313..44dcf01c 100644
--- a/regress/mdoc/Li/Makefile
+++ b/regress/mdoc/Li/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.7 2018/12/21 16:58:49 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2020/03/13 00:31:06 schwarze Exp $
-REGRESS_TARGETS = arg punct font
+REGRESS_TARGETS = arg punct font tag
+TAG_TARGETS = tag
LINT_TARGETS = punct
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Li/tag.in b/regress/mdoc/Li/tag.in
new file mode 100644
index 00000000..add672ad
--- /dev/null
+++ b/regress/mdoc/Li/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt LI-TAG 1
+.Os
+.Sh NAME
+.Nm Li-tag
+.Nd tagging of literal font macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Li one | two
+text
+.It Xo
+.Li three
+.Xc
+text
+.El
+.Tg
+.Li four
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Li/tag.out_ascii b/regress/mdoc/Li/tag.out_ascii
new file mode 100644
index 00000000..e1afda6e
--- /dev/null
+++ b/regress/mdoc/Li/tag.out_ascii
@@ -0,0 +1,17 @@
+LI-TAG(1) General Commands Manual LI-TAG(1)
+
+NNAAMMEE
+ LLii--ttaagg - tagging of literal font macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ one | two
+ text
+
+ three text
+ four
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Li/tag.out_html b/regress/mdoc/Li/tag.out_html
new file mode 100644
index 00000000..3730caa6
--- /dev/null
+++ b/regress/mdoc/Li/tag.out_html
@@ -0,0 +1,9 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><code class="Li" id="one">one</code></a>
+ |
+ <a class="permalink" href="#two"><code class="Li" id="two">two</code></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><code class="Li" id="three">three</code></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><code class="Li" id="four">four</code></a>
diff --git a/regress/mdoc/Li/tag.out_markdown b/regress/mdoc/Li/tag.out_markdown
new file mode 100644
index 00000000..6467e16d
--- /dev/null
+++ b/regress/mdoc/Li/tag.out_markdown
@@ -0,0 +1,23 @@
+LI-TAG(1) - General Commands Manual
+
+# NAME
+
+**Li-tag** - tagging of literal font macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+`one` | `two`
+
+> text
+
+`three`
+
+> text
+
+`four`
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Li/tag.out_tag b/regress/mdoc/Li/tag.out_tag
new file mode 100644
index 00000000..94f0cfb2
--- /dev/null
+++ b/regress/mdoc/Li/tag.out_tag
@@ -0,0 +1,4 @@
+one 9
+two 9
+three 12
+four 13
diff --git a/regress/mdoc/Makefile b/regress/mdoc/Makefile
index 86bdcb7a..83bd7fb7 100644
--- a/regress/mdoc/Makefile
+++ b/regress/mdoc/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.32 2017/01/11 17:39:45 schwarze Exp $
+# $OpenBSD: Makefile,v 1.33 2020/03/13 00:31:05 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
+SUBDIR += Sh Sm Sq St Sx Sy Tg Tn Ud Ux Va Vt Xr blank break
.include "../Makefile.sub"
.include <bsd.subdir.mk>
diff --git a/regress/mdoc/Ms/Makefile b/regress/mdoc/Ms/Makefile
index 1be2a84a..618edd3f 100644
--- a/regress/mdoc/Ms/Makefile
+++ b/regress/mdoc/Ms/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.4 2014/07/02 20:18:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2020/03/13 00:58:48 schwarze Exp $
-REGRESS_TARGETS = noarg font
+REGRESS_TARGETS = noarg font tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Ms/tag.in b/regress/mdoc/Ms/tag.in
new file mode 100644
index 00000000..e3465073
--- /dev/null
+++ b/regress/mdoc/Ms/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt MS-TAG 1
+.Os
+.Sh NAME
+.Nm Ms-tag
+.Nd tagging of mathematical symbol macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Ms one | two
+text
+.It Xo
+.Ms three
+.Xc
+text
+.El
+.Tg
+.Ms four
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Ms/tag.out_ascii b/regress/mdoc/Ms/tag.out_ascii
new file mode 100644
index 00000000..2d06f4bf
--- /dev/null
+++ b/regress/mdoc/Ms/tag.out_ascii
@@ -0,0 +1,17 @@
+MS-TAG(1) General Commands Manual MS-TAG(1)
+
+NNAAMMEE
+ MMss--ttaagg - tagging of mathematical symbol macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ oonnee | ttwwoo
+ text
+
+ tthhrreeee text
+ ffoouurr
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Ms/tag.out_html b/regress/mdoc/Ms/tag.out_html
new file mode 100644
index 00000000..0f24b2ac
--- /dev/null
+++ b/regress/mdoc/Ms/tag.out_html
@@ -0,0 +1,9 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><span class="Ms" id="one">one</span></a>
+ |
+ <a class="permalink" href="#two"><span class="Ms" id="two">two</span></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><span class="Ms" id="three">three</span></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><span class="Ms" id="four">four</span></a>
diff --git a/regress/mdoc/Ms/tag.out_markdown b/regress/mdoc/Ms/tag.out_markdown
new file mode 100644
index 00000000..055c3860
--- /dev/null
+++ b/regress/mdoc/Ms/tag.out_markdown
@@ -0,0 +1,23 @@
+MS-TAG(1) - General Commands Manual
+
+# NAME
+
+**Ms-tag** - tagging of mathematical symbol macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+**one** | **two**
+
+> text
+
+**three**
+
+> text
+
+**four**
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Ms/tag.out_tag b/regress/mdoc/Ms/tag.out_tag
new file mode 100644
index 00000000..94f0cfb2
--- /dev/null
+++ b/regress/mdoc/Ms/tag.out_tag
@@ -0,0 +1,4 @@
+one 9
+two 9
+three 12
+four 13
diff --git a/regress/mdoc/No/Makefile b/regress/mdoc/No/Makefile
index 3110bf2b..35aa4e1e 100644
--- a/regress/mdoc/No/Makefile
+++ b/regress/mdoc/No/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.4 2014/11/17 06:44:35 schwarze Exp $
+# $OpenBSD: Makefile,v 1.7 2020/03/13 00:31:06 schwarze Exp $
-REGRESS_TARGETS = punct spacing
+REGRESS_TARGETS = punct spacing tag
+TAG_TARGETS = tag
LINT_TARGETS = punct
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/No/punct.out_lint b/regress/mdoc/No/punct.out_lint
index e046da6a..6a65c3b4 100644
--- a/regress/mdoc/No/punct.out_lint
+++ b/regress/mdoc/No/punct.out_lint
@@ -23,3 +23,4 @@ mandoc: punct.in:72:7: WARNING: skipping empty macro: No
mandoc: punct.in:75:7: WARNING: skipping empty macro: No
mandoc: punct.in:76:7: WARNING: skipping empty macro: No
mandoc: punct.in:84:2: WARNING: skipping empty macro: No
+mandoc: punct.in:87:6: STYLE: no blank before trailing delimiter: No a.
diff --git a/regress/mdoc/No/tag.in b/regress/mdoc/No/tag.in
new file mode 100644
index 00000000..700d79da
--- /dev/null
+++ b/regress/mdoc/No/tag.in
@@ -0,0 +1,21 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt NO-TAG 1
+.Os
+.Sh NAME
+.Nm No-tag
+.Nd tagging of normal font macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It No one | two
+text
+.It Xo
+.No three
+.Xc
+text
+.El
+.Tg
+.No four
+.Pp
+ENDTEST
diff --git a/regress/mdoc/No/tag.out_ascii b/regress/mdoc/No/tag.out_ascii
new file mode 100644
index 00000000..44481b02
--- /dev/null
+++ b/regress/mdoc/No/tag.out_ascii
@@ -0,0 +1,17 @@
+NO-TAG(1) General Commands Manual NO-TAG(1)
+
+NNAAMMEE
+ NNoo--ttaagg - tagging of normal font macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ one | two
+ text
+
+ three text
+ four
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/No/tag.out_html b/regress/mdoc/No/tag.out_html
new file mode 100644
index 00000000..32696917
--- /dev/null
+++ b/regress/mdoc/No/tag.out_html
@@ -0,0 +1,9 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><span class="No" id="one">one</span></a>
+ |
+ <a class="permalink" href="#two"><span class="No" id="two">two</span></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><span class="No" id="three">three</span></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><span class="No" id="four">four</span></a>
diff --git a/regress/mdoc/No/tag.out_markdown b/regress/mdoc/No/tag.out_markdown
new file mode 100644
index 00000000..1590c010
--- /dev/null
+++ b/regress/mdoc/No/tag.out_markdown
@@ -0,0 +1,23 @@
+NO-TAG(1) - General Commands Manual
+
+# NAME
+
+**No-tag** - tagging of normal font macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+one | two
+
+> text
+
+three
+
+> text
+
+four
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/No/tag.out_tag b/regress/mdoc/No/tag.out_tag
new file mode 100644
index 00000000..94f0cfb2
--- /dev/null
+++ b/regress/mdoc/No/tag.out_tag
@@ -0,0 +1,4 @@
+one 9
+two 9
+three 12
+four 13
diff --git a/regress/mdoc/Sy/Makefile b/regress/mdoc/Sy/Makefile
index 36c1859b..752d1382 100644
--- a/regress/mdoc/Sy/Makefile
+++ b/regress/mdoc/Sy/Makefile
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.5 2014/11/17 06:44:35 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2020/03/13 00:31:06 schwarze Exp $
-REGRESS_TARGETS = noarg font punct
+REGRESS_TARGETS = noarg font punct tag
+TAG_TARGETS = tag
LINT_TARGETS = noarg punct
+HTML_TARGETS = tag
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Sy/tag.in b/regress/mdoc/Sy/tag.in
new file mode 100644
index 00000000..b2719093
--- /dev/null
+++ b/regress/mdoc/Sy/tag.in
@@ -0,0 +1,23 @@
+.\" $OpenBSD: tag.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt SY-TAG 1
+.Os
+.Sh NAME
+.Nm Sy-tag
+.Nd tagging of symbolic font macros
+.Sh DESCRIPTION
+BEGINTEST
+.Bl -tag -width Ds
+.It Sy one | two
+text
+.It Xo
+.Sy three
+.Xc
+text
+.El
+.Sy four
+.Sy one
+.Tg explicit
+.Sy five
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Sy/tag.out_ascii b/regress/mdoc/Sy/tag.out_ascii
new file mode 100644
index 00000000..3b89cb41
--- /dev/null
+++ b/regress/mdoc/Sy/tag.out_ascii
@@ -0,0 +1,17 @@
+SY-TAG(1) General Commands Manual SY-TAG(1)
+
+NNAAMMEE
+ SSyy--ttaagg - tagging of symbolic font macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ oonnee | ttwwoo
+ text
+
+ tthhrreeee text
+ ffoouurr oonnee ffiivvee
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Sy/tag.out_html b/regress/mdoc/Sy/tag.out_html
new file mode 100644
index 00000000..69276a18
--- /dev/null
+++ b/regress/mdoc/Sy/tag.out_html
@@ -0,0 +1,10 @@
+<dl class="Bl-tag">
+ <dt><a class="permalink" href="#one"><b class="Sy" id="one">one</b></a> |
+ <a class="permalink" href="#two"><b class="Sy" id="two">two</b></a></dt>
+ <dd>text</dd>
+ <dt><a class="permalink" href="#three"><b class="Sy" id="three">three</b></a></dt>
+ <dd>text</dd>
+</dl>
+<a class="permalink" href="#four"><b class="Sy" id="four">four</b></a>
+ <b class="Sy">one</b>
+ <a class="permalink" href="#explicit"><b class="Sy" id="explicit">five</b></a>
diff --git a/regress/mdoc/Sy/tag.out_markdown b/regress/mdoc/Sy/tag.out_markdown
new file mode 100644
index 00000000..5382a5e2
--- /dev/null
+++ b/regress/mdoc/Sy/tag.out_markdown
@@ -0,0 +1,25 @@
+SY-TAG(1) - General Commands Manual
+
+# NAME
+
+**Sy-tag** - tagging of symbolic font macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+**one** | **two**
+
+> text
+
+**three**
+
+> text
+
+**four**
+**one**
+**five**
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Sy/tag.out_tag b/regress/mdoc/Sy/tag.out_tag
new file mode 100644
index 00000000..c2fbaf59
--- /dev/null
+++ b/regress/mdoc/Sy/tag.out_tag
@@ -0,0 +1,5 @@
+one 9
+two 9
+three 12
+four 13
+explicit 13
diff --git a/regress/mdoc/Tg/Makefile b/regress/mdoc/Tg/Makefile
new file mode 100644
index 00000000..7f538766
--- /dev/null
+++ b/regress/mdoc/Tg/Makefile
@@ -0,0 +1,8 @@
+# $OpenBSD: Makefile,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+
+REGRESS_TARGETS = warn
+TAG_TARGETS = warn
+LINT_TARGETS = warn
+HTML_TARGETS = warn
+
+.include <bsd.regress.mk>
diff --git a/regress/mdoc/Tg/warn.in b/regress/mdoc/Tg/warn.in
new file mode 100644
index 00000000..af40f012
--- /dev/null
+++ b/regress/mdoc/Tg/warn.in
@@ -0,0 +1,34 @@
+.\" $OpenBSD: warn.in,v 1.1 2020/03/13 00:31:06 schwarze Exp $
+.Dd $Mdocdate$
+.Dt TG-WARN 1
+.Os
+.Sh NAME
+.Nm Tg-warn
+.Nd warnings about tagging macros
+.Sh DESCRIPTION
+BEGINTEST
+.Pp
+.Tg start
+initial
+text
+.Tg
+.Ic macro
+.Tg "" ignored arguments
+too many
+.Tg \&badstart
+badstart
+.Tg badend\&
+badend
+.Tg "white space"
+whitespace
+.Tg sub
+.Tg double
+.Ss Subsection
+subtext
+.Tg examples
+.Sh EXAMPLES
+example
+text
+.Pp
+ENDTEST
+.Tg
diff --git a/regress/mdoc/Tg/warn.out_ascii b/regress/mdoc/Tg/warn.out_ascii
new file mode 100644
index 00000000..8dee9aed
--- /dev/null
+++ b/regress/mdoc/Tg/warn.out_ascii
@@ -0,0 +1,19 @@
+TG-WARN(1) General Commands Manual TG-WARN(1)
+
+NNAAMMEE
+ TTgg--wwaarrnn - warnings about tagging macros
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ initial text mmaaccrroo too many badstart badend whitespace
+
+ SSuubbsseeccttiioonn
+ subtext
+
+EEXXAAMMPPLLEESS
+ example text
+
+ ENDTEST
+
+OpenBSD March 13, 2020 OpenBSD
diff --git a/regress/mdoc/Tg/warn.out_html b/regress/mdoc/Tg/warn.out_html
new file mode 100644
index 00000000..b4d3cf74
--- /dev/null
+++ b/regress/mdoc/Tg/warn.out_html
@@ -0,0 +1,11 @@
+<p class="Pp"><mark id="start"></mark>initial text
+ <a class="permalink" href="#macro"><code class="Ic" id="macro">macro</code></a>
+ too many badstart badend whitespace <mark id="sub"></mark></p>
+<section class="Ss">
+<h2 class="Ss" id="double"><a class="permalink" href="#double">Subsection</a></h2>
+<p class="Pp">subtext</p>
+</section>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="examples"><a class="permalink" href="#examples">EXAMPLES</a></h1>
+<p class="Pp">example text</p>
diff --git a/regress/mdoc/Tg/warn.out_lint b/regress/mdoc/Tg/warn.out_lint
new file mode 100644
index 00000000..39c1f541
--- /dev/null
+++ b/regress/mdoc/Tg/warn.out_lint
@@ -0,0 +1,6 @@
+mandoc: warn.in:16:2: WARNING: skipping empty macro: Tg
+mandoc: warn.in:16:8: ERROR: skipping excess arguments: Tg ... ignored
+mandoc: warn.in:18:5: ERROR: skipping tag containing whitespace: Tg \&badstart
+mandoc: warn.in:20:11: ERROR: skipping tag containing whitespace: Tg badend\&
+mandoc: warn.in:22:10: ERROR: skipping tag containing whitespace: Tg white space
+mandoc: warn.in:34:2: WARNING: skipping empty macro: Tg
diff --git a/regress/mdoc/Tg/warn.out_markdown b/regress/mdoc/Tg/warn.out_markdown
new file mode 100644
index 00000000..87204424
--- /dev/null
+++ b/regress/mdoc/Tg/warn.out_markdown
@@ -0,0 +1,30 @@
+TG-WARN(1) - General Commands Manual
+
+# NAME
+
+**Tg-warn** - warnings about tagging macros
+
+# DESCRIPTION
+
+BEGINTEST
+
+initial
+text
+**macro**
+too many
+badstart
+badend
+whitespace
+
+## Subsection
+
+subtext
+
+# EXAMPLES
+
+example
+text
+
+ENDTEST
+
+OpenBSD - March 13, 2020
diff --git a/regress/mdoc/Tg/warn.out_tag b/regress/mdoc/Tg/warn.out_tag
new file mode 100644
index 00000000..e1fc141c
--- /dev/null
+++ b/regress/mdoc/Tg/warn.out_tag
@@ -0,0 +1,5 @@
+start 9
+macro 9
+sub 9
+double 11
+examples 14
diff --git a/regress/regress.pl b/regress/regress.pl
index 01e46b3e..cb402875 100755
--- a/regress/regress.pl
+++ b/regress/regress.pl
@@ -2,7 +2,7 @@
#
# $Id$
#
-# Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
+# Copyright (c) 2017, 2018, 2019, 2020 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
@@ -120,16 +120,17 @@ sub fail ($$) {
my $onlytest = shift // '';
for (@ARGV) {
- /^(all|ascii|utf8|man|html|markdown|lint|clean|verbose)$/
+ /^(all|ascii|tag|man|utf8|html|markdown|lint|clean|verbose)$/
or usage "$_: invalid modifier";
$targets{$_} = 1;
}
$targets{all} = 1
- unless $targets{ascii} || $targets{utf8} || $targets{man} ||
- $targets{html} || $targets{markdown} ||
+ unless $targets{ascii} || $targets{tag} || $targets{man} ||
+ $targets{utf8} || $targets{html} || $targets{markdown} ||
$targets{lint} || $targets{clean};
-$targets{ascii} = $targets{utf8} = $targets{man} = $targets{html} =
- $targets{markdown} = $targets{lint} = 1 if $targets{all};
+$targets{ascii} = $targets{tag} = $targets{man} = $targets{utf8} =
+ $targets{html} = $targets{markdown} = $targets{lint} = 1
+ if $targets{all};
# --- parse Makefiles --------------------------------------------------
@@ -157,7 +158,7 @@ sub parse_makefile ($%) {
}
my (@regress_tests, @utf8_tests, @lint_tests, @html_tests);
-my (%skip_ascii, %skip_man, %skip_markdown);
+my (%tag_tests, %skip_ascii, %skip_man, %skip_markdown);
foreach my $module (qw(roff char mdoc man tbl eqn)) {
my %modvars;
parse_makefile "$module/Makefile", \%modvars;
@@ -168,36 +169,41 @@ foreach my $module (qw(roff char mdoc man tbl eqn)) {
delete $subvars{GOPTS};
delete $subvars{SKIP_GROFF};
delete $subvars{SKIP_GROFF_ASCII};
- my @mandoc = ('../mandoc', split ' ', $subvars{MOPTS});
+ my @mopts = split ' ', $subvars{MOPTS};
delete $subvars{MOPTS};
my @regress_testnames;
+ if (defined $subvars{TAG_TARGETS}) {
+ $tag_tests{"$module/$subdir/$_"} = 1
+ for split ' ', $subvars{TAG_TARGETS};
+ delete $subvars{TAG_TARGETS};
+ }
if (defined $subvars{REGRESS_TARGETS}) {
push @regress_testnames,
split ' ', $subvars{REGRESS_TARGETS};
push @regress_tests, {
NAME => "$module/$subdir/$_",
- MANDOC => \@mandoc,
+ MOPTS => \@mopts,
} foreach @regress_testnames;
delete $subvars{REGRESS_TARGETS};
}
if (defined $subvars{UTF8_TARGETS}) {
push @utf8_tests, {
NAME => "$module/$subdir/$_",
- MANDOC => \@mandoc,
+ MOPTS => \@mopts,
} foreach split ' ', $subvars{UTF8_TARGETS};
delete $subvars{UTF8_TARGETS};
}
if (defined $subvars{HTML_TARGETS}) {
push @html_tests, {
NAME => "$module/$subdir/$_",
- MANDOC => \@mandoc,
+ MOPTS => \@mopts,
} foreach split ' ', $subvars{HTML_TARGETS};
delete $subvars{HTML_TARGETS};
}
if (defined $subvars{LINT_TARGETS}) {
push @lint_tests, {
NAME => "$module/$subdir/$_",
- MANDOC => \@mandoc,
+ MOPTS => \@mopts,
} foreach split ' ', $subvars{LINT_TARGETS};
delete $subvars{LINT_TARGETS};
}
@@ -243,22 +249,44 @@ foreach my $module (qw(roff char mdoc man tbl eqn)) {
my $count_total = 0;
my $count_ascii = 0;
+my $count_tag = 0;
my $count_man = 0;
my $count_rm = 0;
-if ($targets{ascii} || $targets{man}) {
- print "Running ascii and man tests ";
+if ($targets{ascii} || $targets{tag} || $targets{man}) {
+ print "Running ascii, tag, and man tests ";
print "...\n" if $targets{verbose};
}
for my $test (@regress_tests) {
my $i = "$test->{NAME}.in";
my $o = "$test->{NAME}.mandoc_ascii";
my $w = "$test->{NAME}.out_ascii";
- if ($targets{ascii} && !$skip_ascii{$test->{NAME}} &&
+ my $to = "$test->{NAME}.mandoc_tag";
+ my $tw = "$test->{NAME}.out_tag";
+ my $diff_ascii;
+ if ($targets{tag} && $tag_tests{$test->{NAME}} &&
$test->{NAME} =~ /^$onlytest/) {
- $count_ascii++;
+ $count_tag++;
$count_total++;
- sysout $o, @{$test->{MANDOC}}, qw(-I os=OpenBSD -T ascii), $i
+ local $ENV{MANPAGER} = "./copyless $test->{NAME}";
+ my @cmd = (qw(../man -l), @{$test->{MOPTS}},
+ qw(-I os=OpenBSD -T ascii), $i);
+ print "@cmd\n" if $targets{verbose};
+ system @cmd
+ and fail $test->{NAME}, 'tag:man';
+ system @diff, $tw, $to
+ and fail $test->{NAME}, 'tag:diff';
+ print "." unless $targets{verbose};
+ $diff_ascii = $targets{ascii};
+ } elsif ($targets{ascii} && !$skip_ascii{$test->{NAME}} &&
+ $test->{NAME} =~ /^$onlytest/) {
+ sysout $o, '../mandoc', @{$test->{MOPTS}},
+ qw(-I os=OpenBSD -T ascii), $i
and fail $test->{NAME}, 'ascii:mandoc';
+ $diff_ascii = 1;
+ }
+ if ($diff_ascii) {
+ $count_ascii++;
+ $count_total++;
system @diff, $w, $o
and fail $test->{NAME}, 'ascii:diff';
print "." unless $targets{verbose};
@@ -269,9 +297,10 @@ for my $test (@regress_tests) {
$test->{NAME} =~ /^$onlytest/) {
$count_man++;
$count_total++;
- sysout $m, @{$test->{MANDOC}}, qw(-I os=OpenBSD -T man), $i
+ sysout $m, '../mandoc', @{$test->{MOPTS}},
+ qw(-I os=OpenBSD -T man), $i
and fail $test->{NAME}, 'man:man';
- sysout $mo, @{$test->{MANDOC}},
+ sysout $mo, '../mandoc', @{$test->{MOPTS}},
qw(-man -I os=OpenBSD -T ascii -O mdoc), $m
and fail $test->{NAME}, 'man:mandoc';
system @diff, $w, $mo
@@ -279,13 +308,13 @@ for my $test (@regress_tests) {
print "." unless $targets{verbose};
}
if ($targets{clean}) {
- print "rm $o $m $mo\n" if $targets{verbose};
- $count_rm += unlink $o, $m, $mo;
+ print "rm $o $to $m $mo\n" if $targets{verbose};
+ $count_rm += unlink $o, $to, $m, $mo;
}
}
-if ($targets{ascii} || $targets{man}) {
- print "Number of ascii and man tests:" if $targets{verbose};
- print " $count_ascii + $count_man tests run.\n";
+if ($targets{ascii} || $targets{tag} || $targets{man}) {
+ print "Number of ascii, tag, and man tests:" if $targets{verbose};
+ print " $count_ascii + $count_tag + $count_man tests run.\n";
}
my $count_utf8 = 0;
@@ -300,7 +329,8 @@ for my $test (@utf8_tests) {
if ($targets{utf8} && $test->{NAME} =~ /^$onlytest/o) {
$count_utf8++;
$count_total++;
- sysout $o, @{$test->{MANDOC}}, qw(-I os=OpenBSD -T utf8), $i
+ sysout $o, '../mandoc', @{$test->{MOPTS}},
+ qw(-I os=OpenBSD -T utf8), $i
and fail $test->{NAME}, 'utf8:mandoc';
system @diff, $w, $o
and fail $test->{NAME}, 'utf8:diff';
@@ -328,7 +358,8 @@ for my $test (@html_tests) {
if ($targets{html} && $test->{NAME} =~ /^$onlytest/) {
$count_html++;
$count_total++;
- syshtml $o, @{$test->{MANDOC}}, qw(-T html), $i
+ syshtml $o, '../mandoc', @{$test->{MOPTS}},
+ qw(-T html), $i
and fail $test->{NAME}, 'html:mandoc';
system @diff, $w, $o
and fail $test->{NAME}, 'html:diff';
@@ -357,7 +388,7 @@ for my $test (@regress_tests) {
$test->{NAME} =~ /^$onlytest/) {
$count_markdown++;
$count_total++;
- sysout $o, @{$test->{MANDOC}},
+ sysout $o, '../mandoc', @{$test->{MOPTS}},
qw(-I os=OpenBSD -T markdown), $i
and fail $test->{NAME}, 'markdown:mandoc';
system @diff, $w, $o
@@ -386,7 +417,7 @@ for my $test (@lint_tests) {
if ($targets{lint} && $test->{NAME} =~ /^$onlytest/) {
$count_lint++;
$count_total++;
- syslint $o, @{$test->{MANDOC}},
+ syslint $o, '../mandoc', @{$test->{MOPTS}},
qw(-I os=OpenBSD -T lint -W all), $i
and fail $test->{NAME}, 'lint:mandoc';
system @diff, $w, $o
@@ -418,6 +449,7 @@ if ($count_total == 1) {
} elsif ($count_total) {
print "All $count_total tests OK:";
print " $count_ascii ascii" if $count_ascii;
+ print " $count_tag tag" if $count_tag;
print " $count_man man" if $count_man;
print " $count_utf8 utf8" if $count_utf8;
print " $count_html html" if $count_html;
diff --git a/regress/regress.pl.1 b/regress/regress.pl.1
index 3777ec49..66d5369b 100644
--- a/regress/regress.pl.1
+++ b/regress/regress.pl.1
@@ -1,6 +1,6 @@
.\" $Id$
.\"
-.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2017, 2019, 2020 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
@@ -78,6 +78,8 @@ output mode.
Run subtests for
.Fl T Cm markdown
output mode.
+.It Cm tag
+Run subtests for automatic and manual tagging.
.It Cm utf8
Run subtests for
.Fl T Cm utf8
@@ -146,15 +148,6 @@ subdirectory of the regression suite is not included.
It uses a Makefile structure that differs vastly from the
rest of the suite.
.Sh BUGS
-On Oracle Solaris 11,
-.Xr diff 1
-does not support the
-.Fl a
-option.
-Delete that option from the following line in this script:
-.Pp
-.Dl my @diff = qw(diff -au);
-.Pp
The C library function
.Xr wcwidth 3
is known to be buggy on Solaris, which may cause failures in the