aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-04-01 20:21:08 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-04-01 20:21:08 +0000
commitbc6d8c884c63e49aafa7894399d3d7060108b4ec (patch)
tree221c86f83f95f27ccb490ae5bc0a9b4811809d0b /regress
parente5d39b82294bd2fb1536527e0f27b2902943f299 (diff)
downloadmandoc-bc6d8c884c63e49aafa7894399d3d7060108b4ec.tar.gz
mandoc-bc6d8c884c63e49aafa7894399d3d7060108b4ec.tar.zst
mandoc-bc6d8c884c63e49aafa7894399d3d7060108b4ec.zip
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')
-rw-r--r--regress/mdoc/Cm/tag.out_tag2
-rw-r--r--regress/mdoc/Dv/tag.out_tag2
-rw-r--r--regress/mdoc/Em/tag.out_tag2
-rw-r--r--regress/mdoc/Er/tag.out_tag3
-rw-r--r--regress/mdoc/Ev/tag.out_tag2
-rw-r--r--regress/mdoc/Fl/tag.out_tag2
-rw-r--r--regress/mdoc/Fo/tag.out_tag2
-rw-r--r--regress/mdoc/Ic/tag.out_tag2
-rw-r--r--regress/mdoc/Li/tag.out_tag2
-rw-r--r--regress/mdoc/Ms/tag.out_tag2
-rw-r--r--regress/mdoc/No/tag.out_tag2
-rw-r--r--regress/mdoc/Sh/Makefile5
-rw-r--r--regress/mdoc/Sh/tag.in10
-rw-r--r--regress/mdoc/Sh/tag.out_ascii11
-rw-r--r--regress/mdoc/Sh/tag.out_html14
-rw-r--r--regress/mdoc/Sh/tag.out_lint3
-rw-r--r--regress/mdoc/Sh/tag.out_markdown14
-rw-r--r--regress/mdoc/Sh/tag.out_tag7
-rw-r--r--regress/mdoc/Sy/tag.out_tag2
-rw-r--r--regress/mdoc/Tg/warn.out_tag2
20 files changed, 85 insertions, 6 deletions
diff --git a/regress/mdoc/Cm/tag.out_tag b/regress/mdoc/Cm/tag.out_tag
index 0b97edbc..3a3a6b13 100644
--- a/regress/mdoc/Cm/tag.out_tag
+++ b/regress/mdoc/Cm/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Dv/tag.out_tag b/regress/mdoc/Dv/tag.out_tag
index 94f0cfb2..848d769f 100644
--- a/regress/mdoc/Dv/tag.out_tag
+++ b/regress/mdoc/Dv/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Em/tag.out_tag b/regress/mdoc/Em/tag.out_tag
index c2fbaf59..dd032f4f 100644
--- a/regress/mdoc/Em/tag.out_tag
+++ b/regress/mdoc/Em/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Er/tag.out_tag b/regress/mdoc/Er/tag.out_tag
index b00a6718..c074e6cd 100644
--- a/regress/mdoc/Er/tag.out_tag
+++ b/regress/mdoc/Er/tag.out_tag
@@ -1,2 +1,5 @@
+NAME 3
+DESCRIPTION 6
two 10
+ERRORS 12
ENOENT 13
diff --git a/regress/mdoc/Ev/tag.out_tag b/regress/mdoc/Ev/tag.out_tag
index 94f0cfb2..848d769f 100644
--- a/regress/mdoc/Ev/tag.out_tag
+++ b/regress/mdoc/Ev/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Fl/tag.out_tag b/regress/mdoc/Fl/tag.out_tag
index 89a94151..a3710cac 100644
--- a/regress/mdoc/Fl/tag.out_tag
+++ b/regress/mdoc/Fl/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
a 9
b 9
c 12
diff --git a/regress/mdoc/Fo/tag.out_tag b/regress/mdoc/Fo/tag.out_tag
index 2387023c..901861d1 100644
--- a/regress/mdoc/Fo/tag.out_tag
+++ b/regress/mdoc/Fo/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
first 9
second 11
e3 13
diff --git a/regress/mdoc/Ic/tag.out_tag b/regress/mdoc/Ic/tag.out_tag
index 94f0cfb2..848d769f 100644
--- a/regress/mdoc/Ic/tag.out_tag
+++ b/regress/mdoc/Ic/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Li/tag.out_tag b/regress/mdoc/Li/tag.out_tag
index 94f0cfb2..848d769f 100644
--- a/regress/mdoc/Li/tag.out_tag
+++ b/regress/mdoc/Li/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Ms/tag.out_tag b/regress/mdoc/Ms/tag.out_tag
index 94f0cfb2..848d769f 100644
--- a/regress/mdoc/Ms/tag.out_tag
+++ b/regress/mdoc/Ms/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/No/tag.out_tag b/regress/mdoc/No/tag.out_tag
index 94f0cfb2..848d769f 100644
--- a/regress/mdoc/No/tag.out_tag
+++ b/regress/mdoc/No/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Sh/Makefile b/regress/mdoc/Sh/Makefile
index 4b37bb2a..ea21e502 100644
--- a/regress/mdoc/Sh/Makefile
+++ b/regress/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/mdoc/Sh/tag.in b/regress/mdoc/Sh/tag.in
index 0e0e5fef..da8a884a 100644
--- a/regress/mdoc/Sh/tag.in
+++ b/regress/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/mdoc/Sh/tag.out_ascii b/regress/mdoc/Sh/tag.out_ascii
index df0ab050..309cb559 100644
--- a/regress/mdoc/Sh/tag.out_ascii
+++ b/regress/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/mdoc/Sh/tag.out_html b/regress/mdoc/Sh/tag.out_html
index 9722aa8c..49c45fdb 100644
--- a/regress/mdoc/Sh/tag.out_html
+++ b/regress/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/mdoc/Sh/tag.out_lint b/regress/mdoc/Sh/tag.out_lint
new file mode 100644
index 00000000..cfb1dfad
--- /dev/null
+++ b/regress/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/mdoc/Sh/tag.out_markdown b/regress/mdoc/Sh/tag.out_markdown
index 2813f8f0..75a1e58e 100644
--- a/regress/mdoc/Sh/tag.out_markdown
+++ b/regress/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/mdoc/Sh/tag.out_tag b/regress/mdoc/Sh/tag.out_tag
new file mode 100644
index 00000000..04b11882
--- /dev/null
+++ b/regress/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/mdoc/Sy/tag.out_tag b/regress/mdoc/Sy/tag.out_tag
index c2fbaf59..dd032f4f 100644
--- a/regress/mdoc/Sy/tag.out_tag
+++ b/regress/mdoc/Sy/tag.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
one 9
two 9
three 12
diff --git a/regress/mdoc/Tg/warn.out_tag b/regress/mdoc/Tg/warn.out_tag
index e1fc141c..6426c3b5 100644
--- a/regress/mdoc/Tg/warn.out_tag
+++ b/regress/mdoc/Tg/warn.out_tag
@@ -1,3 +1,5 @@
+NAME 3
+DESCRIPTION 6
start 9
macro 9
sub 9