summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-12-24 23:29:45 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-12-24 23:29:45 +0000
commitb1bb18f88548ee622f0a38664f1e67028715389f (patch)
tree2e1b2fe16cd0c328817e77e4bb212521ad7df397
parent1063ce53a70da05ce5dd7edf755f2ddd3fbf9ae4 (diff)
Regression test for .Bl -column;
mandoc 1.9.14 still fails this one, patch being sent to kristaps@. The groff .Bl -column spacing we are trying to follow is weird: with less than 5 columns, groff puts 4 blanks between columns; with exactly 5 columns, groff puts 3 blanks between columns; with more than 5 columns, and also with more than 78 characters per line, groff usually falls over and bites the dust - though the exact failures look rather different in various cases, and a few cases even work... No use trying to test anything for more than 5 columns, though.
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bl/Makefile6
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bl/column.in55
2 files changed, 58 insertions, 3 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/Makefile b/regress/usr.bin/mandoc/mdoc/Bl/Makefile
index 9e8722722a0..852d9bfe336 100644
--- a/regress/usr.bin/mandoc/mdoc/Bl/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Bl/Makefile
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile,v 1.1 2009/10/28 03:20:42 schwarze Exp $
+# $OpenBSD: Makefile,v 1.2 2009/12/24 23:29:44 schwarze Exp $
-REGRESS_TARGETS=tag inset hang diag
-GROFF_TARGETS=tag inset hang diag
+REGRESS_TARGETS=tag inset hang diag column
+GROFF_TARGETS=tag inset hang diag column
REGRESS_TARGETS+=EMULTILIST ENOTYPE
REGRESS_SLOW_TARGETS=EMULTILIST
diff --git a/regress/usr.bin/mandoc/mdoc/Bl/column.in b/regress/usr.bin/mandoc/mdoc/Bl/column.in
new file mode 100644
index 00000000000..83daeb670cf
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Bl/column.in
@@ -0,0 +1,55 @@
+.Dd $Mdocdate: December 24 2009 $
+.Dt BL-COLUMN 1
+.Os
+.Sh NAME
+.Nm Bl-column
+.Nd lists with multiple columns
+.Sh DESCRIPTION
+.Bl -column "a"
+.It a
+.El
+.Bl -column "a" "b"
+.It a Ta b
+.El
+.\" avoid "c" which means "cm"
+.Bl -column "a" "b" "cc"
+.It a Ta b Ta cc
+.El
+.Bl -column "a" "b" "cc" "d"
+.It a Ta b Ta cc Ta d
+.El
+.Bl -column "a" "b" "cc" "d" "e"
+.It a Ta b Ta cc Ta d Ta e
+.El
+.\" Probing up to the utter limits of groff.
+.\" With more than 5 columns or more than 78 characters per line,
+.\" groff .Bl -column turns completely mad.
+.\" mandoc can do more, but it's no use testing that.
+.Bd -literal
+5 + 35 + 4 + 34 = 78:
+.Ed
+.Bl -column "x35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "x34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+.It x35xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ta x34xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+.It a Ta b
+.El
+.Bd -literal
+5 + (22+4)*2 + 21 = 78:
+.Ed
+.Bl -column "x22xxxxxxxxxxxxxxxxxxx" "x22xxxxxxxxxxxxxxxxxxx" "x21xxxxxxxxxxxxxxxxxx"
+.It x22xxxxxxxxxxxxxxxxxxx Ta x22xxxxxxxxxxxxxxxxxxx Ta x21xxxxxxxxxxxxxxxxxx
+.It a Ta b Ta c
+.El
+.Bd -literal
+5 + 16 + (4+15)*3 = 78:
+.Ed
+.Bl -column "x16xxxxxxxxxxxxx" "x15xxxxxxxxxxxx" "x15xxxxxxxxxxxx" "x15xxxxxxxxxxxx"
+.It x16xxxxxxxxxxxxx Ta x15xxxxxxxxxxxx Ta x15xxxxxxxxxxxx Ta x15xxxxxxxxxxxx
+.It a Ta b Ta c Ta d
+.El
+.Bd -literal
+5 + 13 + (3+12)*4 = 78:
+.Ed
+.Bl -column "x13xxxxxxxxxx" "x12xxxxxxxxx" "x12xxxxxxxxx" "x12xxxxxxxxx" "x12xxxxxxxxx"
+.It x13xxxxxxxxxx Ta x12xxxxxxxxx Ta x12xxxxxxxxx Ta x12xxxxxxxxx Ta x12xxxxxxxxx
+.It a Ta b Ta c Ta d Ta e
+.El