summaryrefslogtreecommitdiff
path: root/regress/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-04-25 17:35:32 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-04-25 17:35:32 +0000
commit083209be9a6b6859f96522362fd5cee27e5b10aa (patch)
treecf2cbafcc0f6621d38a2d14c2ecb37a5923bb9fd /regress/usr.bin/mandoc
parent772075b6d0a6fc8c040b015cfa21eaaaa49ef5c5 (diff)
Test handling of roff conditional instructions;
committing the desired results, too, because groff is doing page-layout formatting for man(7) even in ASCII output mode and we do not imitate that in mandoc.
Diffstat (limited to 'regress/usr.bin/mandoc')
-rw-r--r--regress/usr.bin/mandoc/Makefile4
-rw-r--r--regress/usr.bin/mandoc/roff/Makefile7
-rw-r--r--regress/usr.bin/mandoc/roff/Makefile.inc3
-rw-r--r--regress/usr.bin/mandoc/roff/cond/Makefile5
-rw-r--r--regress/usr.bin/mandoc/roff/cond/ie.in18
-rw-r--r--regress/usr.bin/mandoc/roff/cond/ie.out_ascii11
-rw-r--r--regress/usr.bin/mandoc/roff/cond/if.in44
-rw-r--r--regress/usr.bin/mandoc/roff/cond/if.out_ascii15
8 files changed, 105 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/Makefile b/regress/usr.bin/mandoc/Makefile
index 3904e8360fd..3849ac66793 100644
--- a/regress/usr.bin/mandoc/Makefile
+++ b/regress/usr.bin/mandoc/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.2 2009/12/23 23:40:58 schwarze Exp $
+# $OpenBSD: Makefile,v 1.3 2010/04/25 17:35:31 schwarze Exp $
-SUBDIR+= mdoc char
+SUBDIR+= mdoc char roff
groff groff-clean: _SUBDIRUSE
diff --git a/regress/usr.bin/mandoc/roff/Makefile b/regress/usr.bin/mandoc/roff/Makefile
new file mode 100644
index 00000000000..f332351a5af
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/Makefile
@@ -0,0 +1,7 @@
+# $OpenBSD: Makefile,v 1.1 2010/04/25 17:35:31 schwarze Exp $
+
+SUBDIR+= cond
+
+groff groff-clean: _SUBDIRUSE
+
+.include <bsd.subdir.mk>
diff --git a/regress/usr.bin/mandoc/roff/Makefile.inc b/regress/usr.bin/mandoc/roff/Makefile.inc
new file mode 100644
index 00000000000..c829b503ecc
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/Makefile.inc
@@ -0,0 +1,3 @@
+# $OpenBSD: Makefile.inc,v 1.1 2010/04/25 17:35:31 schwarze Exp $
+
+.include "../Makefile.inc"
diff --git a/regress/usr.bin/mandoc/roff/cond/Makefile b/regress/usr.bin/mandoc/roff/cond/Makefile
new file mode 100644
index 00000000000..2a778f4ab17
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/Makefile
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile,v 1.1 2010/04/25 17:35:31 schwarze Exp $
+
+REGRESS_TARGETS=if ie
+
+.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/roff/cond/ie.in b/regress/usr.bin/mandoc/roff/cond/ie.in
new file mode 100644
index 00000000000..18bddf31e77
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/ie.in
@@ -0,0 +1,18 @@
+.TH IE 1
+.SH NAME
+if \- the roff conditional instruction with else-clause
+.SH DESCRIPTION
+.el Initially, else is ignored.
+.ie n One-line true condition.
+.br
+Text following the true condition.
+.el One-line else after true.
+.el Another else after true.
+.br
+.ie t One-line false condition.
+Text following the false condition.
+.br
+.el \{Two-line else
+after false.\}
+.br
+.el Another else after false.
diff --git a/regress/usr.bin/mandoc/roff/cond/ie.out_ascii b/regress/usr.bin/mandoc/roff/cond/ie.out_ascii
new file mode 100644
index 00000000000..1e67390e7d9
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/ie.out_ascii
@@ -0,0 +1,11 @@
+IE(1) IE(1)
+
+NNAAMMEE
+ if - the roff conditional instruction with else-clause
+
+DDEESSCCRRIIPPTTIIOONN
+ One-line true condition.
+ Text following the true condition.
+ Text following the false condition.
+ Two-line else after false.
+
diff --git a/regress/usr.bin/mandoc/roff/cond/if.in b/regress/usr.bin/mandoc/roff/cond/if.in
new file mode 100644
index 00000000000..9ee1bdbcd99
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/if.in
@@ -0,0 +1,44 @@
+.TH IF 1
+.SH NAME
+if \- the roff conditional instruction
+.SH DESCRIPTION
+.if n One-line true condition.
+.if t One-line false condition.
+.br
+.if n \{Two-line true condition
+without continuation and macros.\}
+.if t \{Two-line false condition
+without continuation and macros.\}
+.br
+.if n \{\
+Two-line true condition
+with continuation and macros.
+.\}
+.if t \{\
+Two-line false condition
+with continuation and macros.
+.\}
+.br
+.if n \{Outer true condition.
+.br
+.if n Inner one-line true condition.
+.if t Inner one-line false condition.
+.br
+.if n \{Inner two-line true condition
+without continuation and macros.\}
+.if t \{Inner two-line false condition
+without continuation and macros.\}
+.br
+Back to the outer true condition.\}
+.br
+.if t \{Outer false condition.
+.br
+.if n Inner one-line true condition.
+.if t Inner one-line false condition.
+.br
+.if n \{Inner two-line true condition
+without continuation and macros.\}
+.if t \{Inner two-line false condition
+without continuation and macros.\}
+.br
+Back to the outer false condition.\}
diff --git a/regress/usr.bin/mandoc/roff/cond/if.out_ascii b/regress/usr.bin/mandoc/roff/cond/if.out_ascii
new file mode 100644
index 00000000000..638d0da1511
--- /dev/null
+++ b/regress/usr.bin/mandoc/roff/cond/if.out_ascii
@@ -0,0 +1,15 @@
+IF(1) IF(1)
+
+NNAAMMEE
+ if - the roff conditional instruction
+
+DDEESSCCRRIIPPTTIIOONN
+ One-line true condition.
+ Two-line true condition without continuation and macros.
+ Two-line true condition with continuation and macros.
+ Outer true condition.
+ Inner one-line true condition.
+ Inner two-line true condition without continuation and
+ macros.
+ Back to the outer true condition.
+