summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2020-04-01 20:10:19 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2020-04-01 20:10:19 +0000
commit3dbe53d4f4e2f0d2f86d8085a6f7f55e057e27ca (patch)
tree405647d916e7ade4d09514b9042bfec05f85b2ca /regress/usr.bin/mandoc
parentd4191e243bbc9c5892b41db8acfc90c038e9b58b (diff)
Just like we are already doing it in HTML output, automatically tag
section and subsection headers in terminal output, too. Even though admittedly, commands like "/SEE" and "/ Subsec" work, too, there is no downside, and besides, with the recent improvements in the tagging framework, implementation cost is negligible.
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r--regress/usr.bin/mandoc/mdoc/Cm/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Dv/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Em/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Er/tag.out_tag3
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ev/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fl/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Fo/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ic/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Li/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ms/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/No/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sh/Makefile5
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sh/tag.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sh/tag.out_ascii11
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sh/tag.out_html14
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sh/tag.out_lint3
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sh/tag.out_markdown14
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sh/tag.out_tag7
-rw-r--r--regress/usr.bin/mandoc/mdoc/Sy/tag.out_tag2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tg/warn.out_tag2
20 files changed, 85 insertions, 6 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Cm/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Cm/tag.out_tag
index 0b97edbcf0f..3a3a6b138f6 100644
--- a/regress/usr.bin/mandoc/mdoc/Cm/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Cm/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Dv/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Dv/tag.out_tag
index 94f0cfb2c0d..848d769fae7 100644
--- a/regress/usr.bin/mandoc/mdoc/Dv/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Dv/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Em/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Em/tag.out_tag
index c2fbaf59646..dd032f4f1f0 100644
--- a/regress/usr.bin/mandoc/mdoc/Em/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Em/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Er/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Er/tag.out_tag
index b00a67187e0..c074e6cdadf 100644
--- a/regress/usr.bin/mandoc/mdoc/Er/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Er/tag.out_tag
@@ -1,2 +1,5 @@
+NAME 3
+DESCRIPTION 6
two 10
+ERRORS 12
ENOENT 13
diff --git a/regress/usr.bin/mandoc/mdoc/Ev/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Ev/tag.out_tag
index 94f0cfb2c0d..848d769fae7 100644
--- a/regress/usr.bin/mandoc/mdoc/Ev/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Ev/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Fl/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Fl/tag.out_tag
index 89a94151c0d..a3710cac4a1 100644
--- a/regress/usr.bin/mandoc/mdoc/Fl/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Fl/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
a 9
b 9
c 12
diff --git a/regress/usr.bin/mandoc/mdoc/Fo/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Fo/tag.out_tag
index 2387023c8f4..901861d18d4 100644
--- a/regress/usr.bin/mandoc/mdoc/Fo/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Fo/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
first 9
second 11
e3 13
diff --git a/regress/usr.bin/mandoc/mdoc/Ic/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Ic/tag.out_tag
index 94f0cfb2c0d..848d769fae7 100644
--- a/regress/usr.bin/mandoc/mdoc/Ic/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Ic/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Li/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Li/tag.out_tag
index 94f0cfb2c0d..848d769fae7 100644
--- a/regress/usr.bin/mandoc/mdoc/Li/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Li/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Ms/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Ms/tag.out_tag
index 94f0cfb2c0d..848d769fae7 100644
--- a/regress/usr.bin/mandoc/mdoc/Ms/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Ms/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/No/tag.out_tag b/regress/usr.bin/mandoc/mdoc/No/tag.out_tag
index 94f0cfb2c0d..848d769fae7 100644
--- a/regress/usr.bin/mandoc/mdoc/No/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/No/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Sh/Makefile b/regress/usr.bin/mandoc/mdoc/Sh/Makefile
index 4b37bb2abe0..ea21e5025fd 100644
--- a/regress/usr.bin/mandoc/mdoc/Sh/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Sh/Makefile
@@ -1,11 +1,12 @@
-# $OpenBSD: Makefile,v 1.13 2020/02/27 21:38:27 schwarze Exp $
+# $OpenBSD: Makefile,v 1.14 2020/04/01 20:10:18 schwarze Exp $
REGRESS_TARGETS = badNAME before empty emptyNAME first nohead order
REGRESS_TARGETS += orderNAME paragraph parbefore parborder punctNAME
REGRESS_TARGETS += subbefore tag transp
LINT_TARGETS = badNAME before empty emptyNAME first nohead order
-LINT_TARGETS += orderNAME parbefore parborder punctNAME subbefore
+LINT_TARGETS += orderNAME parbefore parborder punctNAME subbefore tag
HTML_TARGETS = paragraph tag
+TAG_TARGETS = tag
# groff-1.22.3 defects:
# - .Pp before .Sh NAME causes a blank line before the header line
diff --git a/regress/usr.bin/mandoc/mdoc/Sh/tag.in b/regress/usr.bin/mandoc/mdoc/Sh/tag.in
index 0e0e5fef16e..da8a884a200 100644
--- a/regress/usr.bin/mandoc/mdoc/Sh/tag.in
+++ b/regress/usr.bin/mandoc/mdoc/Sh/tag.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: tag.in,v 1.1 2020/02/27 21:38:27 schwarze Exp $
-.Dd $Mdocdate: February 27 2020 $
+.\" $OpenBSD: tag.in,v 1.2 2020/04/01 20:10:18 schwarze Exp $
+.Dd $Mdocdate: April 1 2020 $
.Dt SH-TAG 1
.Os
.Sh NAME
@@ -11,11 +11,17 @@ Text in the description.
BEGINTEST
.Pp
Text in the subsection.
+.Sh DESCRIPTION
+Text in duplicate description section.
.Tg examples
.Sh EXAMPLES
Text introducing examples.
.Tg example
.Ss Subsection
Example text.
+.Sh "\& WEIRD SECTION "
+Text in weird section.
+.Sh \ \&
+Text in section with empty header.
.Pp
ENDTEST
diff --git a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_ascii b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_ascii
index df0ab050a1e..309cb5597bf 100644
--- a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_ascii
+++ b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_ascii
@@ -11,12 +11,21 @@ DDEESSCCRRIIPPTTIIOONN
Text in the subsection.
+DDEESSCCRRIIPPTTIIOONN
+ Text in duplicate description section.
+
EEXXAAMMPPLLEESS
Text introducing examples.
SSuubbsseeccttiioonn
Example text.
+ WWEEIIRRDD SSEECCTTIIOONN
+ Text in weird section.
+
+
+ Text in section with empty header.
+
ENDTEST
-OpenBSD February 27, 2020 OpenBSD
+OpenBSD April 1, 2020 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_html b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_html
index 9722aa8c3c5..49c45fdb18e 100644
--- a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_html
+++ b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_html
@@ -2,8 +2,22 @@
</section>
</section>
<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION_2"><a class="permalink" href="#DESCRIPTION_2">DESCRIPTION</a></h1>
+<p class="Pp">Text in duplicate description section.</p>
+</section>
+<section class="Sh">
<h1 class="Sh" id="examples"><a class="permalink" href="#examples">EXAMPLES</a></h1>
<p class="Pp">Text introducing examples.</p>
<section class="Ss">
<h2 class="Ss" id="example"><a class="permalink" href="#example">Subsection</a></h2>
<p class="Pp">Example text.</p>
+</section>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="WEIRD_SECTION"><a class="permalink" href="#WEIRD_SECTION">
+ WEIRD SECTION </a></h1>
+<p class="Pp">Text in weird section.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh">&#x00A0;</h1>
+<p class="Pp">Text in section with empty header.</p>
diff --git a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_lint b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_lint
new file mode 100644
index 00000000000..cfb1dfad13e
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_lint
@@ -0,0 +1,3 @@
+mandoc: tag.in:14:2: WARNING: duplicate section title: Sh DESCRIPTION
+mandoc: tag.in:22:7: WARNING: tab in filled text
+mandoc: tag.in:22:22: WARNING: tab in filled text
diff --git a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_markdown b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_markdown
index 2813f8f0d28..75a1e58e437 100644
--- a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_markdown
+++ b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_markdown
@@ -14,6 +14,10 @@ BEGINTEST
Text in the subsection.
+# DESCRIPTION
+
+Text in duplicate description section.
+
# EXAMPLES
Text introducing examples.
@@ -22,6 +26,14 @@ Text introducing examples.
Example text.
+# WEIRD SECTION
+
+Text in weird section.
+
+# &#160;
+
+Text in section with empty header.
+
ENDTEST
-OpenBSD - February 27, 2020
+OpenBSD - April 1, 2020
diff --git a/regress/usr.bin/mandoc/mdoc/Sh/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_tag
new file mode 100644
index 00000000000..04b11882b7d
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Sh/tag.out_tag
@@ -0,0 +1,7 @@
+NAME 3
+DESCRIPTION 6
+Subsection 9
+DESCRIPTION 14
+examples 17
+example 20
+WEIRD_SECTION 23
diff --git a/regress/usr.bin/mandoc/mdoc/Sy/tag.out_tag b/regress/usr.bin/mandoc/mdoc/Sy/tag.out_tag
index c2fbaf59646..dd032f4f1f0 100644
--- a/regress/usr.bin/mandoc/mdoc/Sy/tag.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Sy/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/usr.bin/mandoc/mdoc/Tg/warn.out_tag b/regress/usr.bin/mandoc/mdoc/Tg/warn.out_tag
index e1fc141c346..6426c3b57e3 100644
--- a/regress/usr.bin/mandoc/mdoc/Tg/warn.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Tg/warn.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
start 9
macro 9
sub 9