From 8df710b01207a4ee6c9e416b01e63ef5125e7a5a Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 12 Jun 2017 22:50:02 +0000 Subject: [PATCH] test the new allbox and wrapping features --- regress/usr.bin/mandoc/tbl/data/Makefile | 4 +-- regress/usr.bin/mandoc/tbl/data/block_wrap.in | 31 +++++++++++++++++++ .../mandoc/tbl/data/block_wrap.out_ascii | 27 ++++++++++++++++ regress/usr.bin/mandoc/tbl/opt/box.in | 19 ++++++++++++ regress/usr.bin/mandoc/tbl/opt/box.out_ascii | 17 ++++++++++ 5 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 regress/usr.bin/mandoc/tbl/data/block_wrap.in create mode 100644 regress/usr.bin/mandoc/tbl/data/block_wrap.out_ascii diff --git a/regress/usr.bin/mandoc/tbl/data/Makefile b/regress/usr.bin/mandoc/tbl/data/Makefile index cdb97f362a8..ad2a28e915d 100644 --- a/regress/usr.bin/mandoc/tbl/data/Makefile +++ b/regress/usr.bin/mandoc/tbl/data/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2015/01/29 23:24:24 schwarze Exp $ +# $OpenBSD: Makefile,v 1.2 2017/06/12 22:50:02 schwarze Exp $ -REGRESS_TARGETS = blankline block_unclosed empty +REGRESS_TARGETS = blankline block_unclosed block_wrap empty LINT_TARGETS = block_unclosed empty # groff-1.22.3 defect: diff --git a/regress/usr.bin/mandoc/tbl/data/block_wrap.in b/regress/usr.bin/mandoc/tbl/data/block_wrap.in new file mode 100644 index 00000000000..dd1837ee259 --- /dev/null +++ b/regress/usr.bin/mandoc/tbl/data/block_wrap.in @@ -0,0 +1,31 @@ +.Dd June 12, 2017 +.Dt TBL-DATA-BLOCK_WRAP 1 +.Os OpenBSD +.Sh NAME +.Nm tbl-data-block_wrap +.Nd line wrapping in text blocks +.Sh DESCRIPTION +initial text +.TS +allbox tab(:); +l l. +T{ +This is a very long sentence. +T}:short +short:T{ +This is an even longer sentence. +T} +.TE +.Pp +.TS +allbox tab(:); +lw10 lw10. +T{ +This is a very long sentence. +T}:short +short:T{ +This is an even longer sentence. +T} +.TE +.Pp +final text diff --git a/regress/usr.bin/mandoc/tbl/data/block_wrap.out_ascii b/regress/usr.bin/mandoc/tbl/data/block_wrap.out_ascii new file mode 100644 index 00000000000..c4dcecd65ad --- /dev/null +++ b/regress/usr.bin/mandoc/tbl/data/block_wrap.out_ascii @@ -0,0 +1,27 @@ +TBL-DATA-BLOCK_WRAP(1) General Commands Manual TBL-DATA-BLOCK_WRAP(1) + +NNAAMMEE + ttbbll--ddaattaa--bblloocckk__wwrraapp - line wrapping in text blocks + +DDEESSCCRRIIPPTTIIOONN + initial text + +--------------------+------------------------+ + |This is a very long | short | + |sentence. | | + +--------------------+------------------------+ + |short | This is an even longer | + | | sentence. | + +--------------------+------------------------+ + +-----------+------------+ + |This is a | short | + |very long | | + |sentence. | | + +-----------+------------+ + |short | This is an | + | | even | + | | longer | + | | sentence. | + +-----------+------------+ + final text + +OpenBSD June 12, 2017 OpenBSD diff --git a/regress/usr.bin/mandoc/tbl/opt/box.in b/regress/usr.bin/mandoc/tbl/opt/box.in index c892401c88e..47b1bf87d17 100644 --- a/regress/usr.bin/mandoc/tbl/opt/box.in +++ b/regress/usr.bin/mandoc/tbl/opt/box.in @@ -18,6 +18,14 @@ a:b c:d .TE .sp +allbox: +.TS +tab(:) allbox; +l l. +a:b +c:d +.TE +.sp manual boxing: .TS tab(:); @@ -36,4 +44,15 @@ tab(:) box; a:b _ c:d +_ +.TE +.sp +allbox and manual boxing: +.TS +tab(:) allbox; +||l||l||. +a:b +_ +c:d +_ .TE diff --git a/regress/usr.bin/mandoc/tbl/opt/box.out_ascii b/regress/usr.bin/mandoc/tbl/opt/box.out_ascii index 87ff5cf8003..d1051379b3c 100644 --- a/regress/usr.bin/mandoc/tbl/opt/box.out_ascii +++ b/regress/usr.bin/mandoc/tbl/opt/box.out_ascii @@ -17,6 +17,13 @@ DDEESSCCRRIIPPTTIIOONN |a b | |c d | +------+ + allbox: + + +--+---+ + |a | b | + +--+---+ + |c | d | + +--+---+ manual boxing: +--++--+ @@ -31,6 +38,16 @@ DDEESSCCRRIIPPTTIIOONN |a ||b | +--++--+ |c ||d | + +--++--+ + +--++--+ + allbox and manual boxing: + + +--++--+ + |a ||b | + +--++--+ + +--++--+ + |c ||d | + +--++--+ +--++--+ -- 2.20.1