summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2022-04-26 11:28:36 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2022-04-26 11:28:36 +0000
commitb77668bae395acdd312e71014582db3b7a444698 (patch)
tree9accb92338bb97ce4f9881d8ee7664f29fedb536 /regress
parent396c1e868a2c1642f0c7bc6fc9c19b581e9193a2 (diff)
If a node is tagged explicitly, skip implicit tagging for that node.
Apart from making sense in the first place, this fixes an assertion failure that happened when the calculated implicit tag did not match the string value of the first child of the node, Bug found by tb@ using afl(1).
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tg/Makefile8
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tg/implicit.in14
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tg/implicit.out_ascii13
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tg/implicit.out_html2
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tg/implicit.out_markdown15
-rw-r--r--regress/usr.bin/mandoc/mdoc/Tg/implicit.out_tag3
6 files changed, 51 insertions, 4 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Tg/Makefile b/regress/usr.bin/mandoc/mdoc/Tg/Makefile
index d67ec5affa8..83ae4160f6c 100644
--- a/regress/usr.bin/mandoc/mdoc/Tg/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Tg/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.2 2020/04/06 09:55:50 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2022/04/26 11:28:35 schwarze Exp $
-REGRESS_TARGETS = column list warn
-TAG_TARGETS = column list warn
+REGRESS_TARGETS = column implicit list warn
+TAG_TARGETS = column implicit list warn
LINT_TARGETS = warn
-HTML_TARGETS = column list warn
+HTML_TARGETS = column implicit list warn
SKIP_TMAN = column
diff --git a/regress/usr.bin/mandoc/mdoc/Tg/implicit.in b/regress/usr.bin/mandoc/mdoc/Tg/implicit.in
new file mode 100644
index 00000000000..9abd23c9231
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Tg/implicit.in
@@ -0,0 +1,14 @@
+.\" $OpenBSD: implicit.in,v 1.1 2022/04/26 11:28:35 schwarze Exp $
+.Dd $Mdocdate: April 26 2022 $
+.Dt TG-IMPLICIT 1
+.Os
+.Sh NAME
+.Nm Tg-implicit
+.Nd overriding implicit tagging
+.Sh DESCRIPTION
+BEGINTEST
+.Pp
+.Tg explicit
+.Sy implicit is unsused
+.Pp
+ENDTEST
diff --git a/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_ascii b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_ascii
new file mode 100644
index 00000000000..e3618686b86
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_ascii
@@ -0,0 +1,13 @@
+TG-IMPLICIT(1) General Commands Manual TG-IMPLICIT(1)
+
+NNAAMMEE
+ TTgg--iimmpplliicciitt - overriding implicit tagging
+
+DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
+ iimmpplliicciitt iiss uunnssuusseedd
+
+ ENDTEST
+
+OpenBSD April 26, 2022 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_html b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_html
new file mode 100644
index 00000000000..93df918de1b
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_html
@@ -0,0 +1,2 @@
+<p class="Pp" id="explicit"><a class="permalink" href="#explicit"><b class="Sy">implicit
+ is unsused</b></a></p>
diff --git a/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_markdown b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_markdown
new file mode 100644
index 00000000000..6511e44173e
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_markdown
@@ -0,0 +1,15 @@
+TG-IMPLICIT(1) - General Commands Manual
+
+# NAME
+
+**Tg-implicit** - overriding implicit tagging
+
+# DESCRIPTION
+
+BEGINTEST
+
+**implicit is unsused**
+
+ENDTEST
+
+OpenBSD - April 26, 2022
diff --git a/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_tag b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_tag
new file mode 100644
index 00000000000..b7b9a92768e
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Tg/implicit.out_tag
@@ -0,0 +1,3 @@
+NAME implicit.mandoc_ascii 3
+DESCRIPTION implicit.mandoc_ascii 6
+explicit implicit.mandoc_ascii 9