summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-03-08 15:50:22 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-03-08 15:50:22 +0000
commit66f6cfa03b3b2ba7d54dff07150b9dce7e2777d0 (patch)
tree1fa1ee4fcf77dcc17eeaaeaac7197b2b0e6b4b76 /regress/usr.bin
parent39a1b516887e24b84f5b5062e03f73d1deb81c89 (diff)
To find out whether .TP head arguments are same-line or next-line arguments,
use the MAN_LINE flag instead of the man_node line member. This is required such that user-defined macros wrapping .TP work correctly. Issue found by Havard Eidnes in Tcl_NewStringObj(3), reported via the NetBSD bug tracking system and Thomas Klausner <wiz at NetBSD>.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/mandoc/man/TP/Makefile4
-rw-r--r--regress/usr.bin/mandoc/man/TP/sameline.in30
-rw-r--r--regress/usr.bin/mandoc/man/TP/sameline.out_ascii29
3 files changed, 61 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/man/TP/Makefile b/regress/usr.bin/mandoc/man/TP/Makefile
index 7e392520af9..fd42111dbf7 100644
--- a/regress/usr.bin/mandoc/man/TP/Makefile
+++ b/regress/usr.bin/mandoc/man/TP/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.5 2013/07/13 10:29:50 schwarze Exp $
+# $OpenBSD: Makefile,v 1.6 2014/03/08 15:50:21 schwarze Exp $
-REGRESS_TARGETS = literal width manyargs badarg macrotag double
+REGRESS_TARGETS = literal width manyargs badarg macrotag double sameline
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/man/TP/sameline.in b/regress/usr.bin/mandoc/man/TP/sameline.in
new file mode 100644
index 00000000000..8857b2311a1
--- /dev/null
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/man/TP/sameline.out_ascii b/regress/usr.bin/mandoc/man/TP/sameline.out_ascii
new file mode 100644
index 00000000000..42d14652649
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/TP/sameline.out_ascii
@@ -0,0 +1,29 @@
+TP-SAMELINE(1) OpenBSD Reference 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)