summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2011-01-04 01:15:40 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2011-01-04 01:15:40 +0000
commit09035d9f388e684722419f284284bd0dc6125481 (patch)
tree363bba5541151252d69ed4088893ae053c33d62f /regress/usr.bin/mandoc
parent16cb3f3755ad38847f98c31f447e46392ac712fa (diff)
Multiple man(7) .IP and .TP fixes started during p2k10:
Affecting both -Tascii and -Thtml: * The .IP HEAD uses the second argument as the width, not the last one. * Only print the first .IP HEAD argument, not all but the last. Affecting only -Tascii: * The .IP and .TP HEADs must be printed without literal mode, but literal mode must be restored afterwards. * After the .IP and .TP bodies, we only want term_newln(), not term_flushln(), or we would get two blank lines in literal mode. * The .TP HEAD does not use TWOSPACE, just like .IP doesn't either. * In literal mode, clear NOLPAD after each line, or subsequent lines would get no indentation whatsoever. Affecting only -Thtml: * Only print next-line .TP children, instead of all but the first. OK kristaps@ on the -Tascii part; and: "Can you work this into man_html.c, too?"
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r--regress/usr.bin/mandoc/Makefile4
-rw-r--r--regress/usr.bin/mandoc/man/IP/Makefile6
-rw-r--r--regress/usr.bin/mandoc/man/IP/literal.in26
-rw-r--r--regress/usr.bin/mandoc/man/IP/literal.out_ascii25
-rw-r--r--regress/usr.bin/mandoc/man/IP/manyargs.in45
-rw-r--r--regress/usr.bin/mandoc/man/IP/manyargs.out_ascii39
-rw-r--r--regress/usr.bin/mandoc/man/IP/width.in53
-rw-r--r--regress/usr.bin/mandoc/man/IP/width.out_ascii50
-rw-r--r--regress/usr.bin/mandoc/man/Makefile7
-rw-r--r--regress/usr.bin/mandoc/man/Makefile.inc3
-rw-r--r--regress/usr.bin/mandoc/man/nf/Makefile6
-rw-r--r--regress/usr.bin/mandoc/man/nf/indent.in17
-rw-r--r--regress/usr.bin/mandoc/man/nf/indent.out_ascii20
13 files changed, 299 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/Makefile b/regress/usr.bin/mandoc/Makefile
index ac1a1af100b..335a639eda1 100644
--- a/regress/usr.bin/mandoc/Makefile
+++ b/regress/usr.bin/mandoc/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2010/06/27 19:56:11 phessler Exp $
+# $OpenBSD: Makefile,v 1.5 2011/01/04 01:15:39 schwarze Exp $
-SUBDIR+= mdoc char roff
+SUBDIR+= roff char mdoc man
groff groff-clean: _SUBDIRUSE
depend: groff
diff --git a/regress/usr.bin/mandoc/man/IP/Makefile b/regress/usr.bin/mandoc/man/IP/Makefile
new file mode 100644
index 00000000000..1388679c2fd
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/IP/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.2 2011/01/04 01:15:39 schwarze Exp $
+
+REGRESS_TARGETS=literal width manyargs
+GROFF_TARGETS=literal width manyargs
+
+.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/man/IP/literal.in b/regress/usr.bin/mandoc/man/IP/literal.in
new file mode 100644
index 00000000000..1774c7098eb
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/IP/literal.in
@@ -0,0 +1,26 @@
+.TH TP-LITERAL 1
+.SH NAME
+TP-literal \- indented paragraphs in literal context
+.SH DESCRIPTION
+regular
+text
+.TP 10n
+tag
+indented
+text
+.PP
+regular
+text
+.nf
+literal
+text
+.TP 10n
+tag
+indented
+text
+.PP
+literal
+text
+.fi
+regular
+text
diff --git a/regress/usr.bin/mandoc/man/IP/literal.out_ascii b/regress/usr.bin/mandoc/man/IP/literal.out_ascii
new file mode 100644
index 00000000000..29c09bf0d51
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/IP/literal.out_ascii
@@ -0,0 +1,25 @@
+TP-LITERAL(1) TP-LITERAL(1)
+
+
+
+NNAAMMEE
+ TP-literal - indented paragraphs in literal context
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag indented text
+
+ regular text
+ literal
+ text
+
+ tag indented
+ text
+
+ literal
+ text
+ regular text
+
+
+
diff --git a/regress/usr.bin/mandoc/man/IP/manyargs.in b/regress/usr.bin/mandoc/man/IP/manyargs.in
new file mode 100644
index 00000000000..6b6055c97f8
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/IP/manyargs.in
@@ -0,0 +1,45 @@
+.TH TP-MANYARGS 1
+.SH NAME
+TP-manyargs \- too many header args for indented blocks
+.SH DESCRIPTION
+regular
+text
+.TP 10n
+tag1
+indented
+text
+.PP
+regular
+text
+.TP 10n tag1
+tag2
+indented
+text
+.PP
+regular
+text
+.TP 10n tag2 tag1
+tag3
+indented
+text
+.nf
+literal
+text
+.TP 10n
+tag1
+indented
+text
+.PP
+literal
+text
+.TP 10n tag1
+tag2
+indented
+text
+.PP
+literal
+text
+.TP 10n tag2 tag1
+tag3
+indented
+text
diff --git a/regress/usr.bin/mandoc/man/IP/manyargs.out_ascii b/regress/usr.bin/mandoc/man/IP/manyargs.out_ascii
new file mode 100644
index 00000000000..658f29340b4
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/IP/manyargs.out_ascii
@@ -0,0 +1,39 @@
+TP-MANYARGS(1) TP-MANYARGS(1)
+
+
+
+NNAAMMEE
+ TP-manyargs - too many header args for indented blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ regular text
+
+ tag1 indented text
+
+ regular text
+
+ tag2 indented text
+
+ regular text
+
+ tag3 indented text
+ literal
+ text
+
+ tag1 indented
+ text
+
+ literal
+ text
+
+ tag2 indented
+ text
+
+ literal
+ text
+
+ tag3 indented
+ text
+
+
+
diff --git a/regress/usr.bin/mandoc/man/IP/width.in b/regress/usr.bin/mandoc/man/IP/width.in
new file mode 100644
index 00000000000..47683a351d5
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/IP/width.in
@@ -0,0 +1,53 @@
+.TH TP-WIDTH 1
+.SH NAME
+TP-width \- indentation width of indented paragraphs
+.SH DESCRIPTION
+Regular mode:
+.TP 1n
+tag
+indented
+.br
+text
+.TP 2n
+tag
+indented
+.br
+text
+.TP 3n
+tag
+indented
+.br
+text
+.TP 4n
+tag
+indented
+.br
+text
+.TP 5n
+tag
+indented
+.br
+text
+.PP
+Literal mode:
+.nf
+.TP 1n
+tag
+indented
+text
+.TP 2n
+tag
+indented
+text
+.TP 3n
+tag
+indented
+text
+.TP 4n
+tag
+indented
+text
+.TP 5n
+tag
+indented
+text
diff --git a/regress/usr.bin/mandoc/man/IP/width.out_ascii b/regress/usr.bin/mandoc/man/IP/width.out_ascii
new file mode 100644
index 00000000000..1b611d2866d
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/IP/width.out_ascii
@@ -0,0 +1,50 @@
+TP-WIDTH(1) TP-WIDTH(1)
+
+
+
+NNAAMMEE
+ TP-width - indentation width of indented paragraphs
+
+DDEESSCCRRIIPPTTIIOONN
+ Regular mode:
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+ Literal mode:
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag
+ indented
+ text
+
+ tag indented
+ text
+
+ tag indented
+ text
+
+
+
diff --git a/regress/usr.bin/mandoc/man/Makefile b/regress/usr.bin/mandoc/man/Makefile
new file mode 100644
index 00000000000..c4588c6b5bf
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.1 2011/01/04 01:15:39 schwarze Exp $
+
+SUBDIR= nf IP TP
+
+groff groff-clean: _SUBDIRUSE
+
+.include <bsd.subdir.mk>
diff --git a/regress/usr.bin/mandoc/man/Makefile.inc b/regress/usr.bin/mandoc/man/Makefile.inc
new file mode 100644
index 00000000000..cdd21ca1743
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/Makefile.inc
@@ -0,0 +1,3 @@
+# $OpenBSD: Makefile.inc,v 1.1 2011/01/04 01:15:39 schwarze Exp $
+
+.include "../Makefile.inc"
diff --git a/regress/usr.bin/mandoc/man/nf/Makefile b/regress/usr.bin/mandoc/man/nf/Makefile
new file mode 100644
index 00000000000..225c2b7b5dc
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/nf/Makefile
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile,v 1.1 2011/01/04 01:15:39 schwarze Exp $
+
+REGRESS_TARGETS=indent
+GROFF_TARGETS=indent
+
+.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/man/nf/indent.in b/regress/usr.bin/mandoc/man/nf/indent.in
new file mode 100644
index 00000000000..885b391dece
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/nf/indent.in
@@ -0,0 +1,17 @@
+.TH NF-INDENT 1
+.SH NAME
+nf-indent \- indentation of literal blocks
+.SH DESCRIPTION
+Here comes
+an indented block:
+.nf
+oneword
+two words
+and three words
+This is a very long line; because it is indented, it is a bit too long to fit.
+blank line:
+
+end of literal
+.fi
+He is some more
+regular text.
diff --git a/regress/usr.bin/mandoc/man/nf/indent.out_ascii b/regress/usr.bin/mandoc/man/nf/indent.out_ascii
new file mode 100644
index 00000000000..72c05c72758
--- /dev/null
+++ b/regress/usr.bin/mandoc/man/nf/indent.out_ascii
@@ -0,0 +1,20 @@
+NF-INDENT(1) NF-INDENT(1)
+
+
+
+NNAAMMEE
+ nf-indent - indentation of literal blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ Here comes an indented block:
+ oneword
+ two words
+ and three words
+ This is a very long line; because it is indented, it is a bit too long to fit.
+ blank line:
+
+ end of literal
+ He is some more regular text.
+
+
+