summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-28 17:30:38 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-28 17:30:38 +0000
commit08ea58d70d3ecfac3019ba438a9feb8ed51a2fda (patch)
tree21b9d24eafa6de1091ebe06887e2274d9adb1d8b /regress
parentea0b68b3e7b142842ab6697c59f4c5fcd69a8ded (diff)
* Polish tbl(7) error reporting.
* Do not print out macro names in tbl(7) data blocks. * Like with GNU tbl, let empty tables cause a blank line. * Avoid producing empty tables in -Tman.
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/mandoc/tbl/Makefile13
-rw-r--r--regress/usr.bin/mandoc/tbl/block_unclosed.in28
-rw-r--r--regress/usr.bin/mandoc/tbl/block_unclosed.out_ascii25
-rw-r--r--regress/usr.bin/mandoc/tbl/block_unclosed.out_lint2
-rw-r--r--regress/usr.bin/mandoc/tbl/empty.in9
-rw-r--r--regress/usr.bin/mandoc/tbl/empty.out_ascii15
-rw-r--r--regress/usr.bin/mandoc/tbl/empty.out_lint1
-rw-r--r--regress/usr.bin/mandoc/tbl/layout.out_lint4
-rw-r--r--regress/usr.bin/mandoc/tbl/macro.in6
-rw-r--r--regress/usr.bin/mandoc/tbl/macro.out_lint3
-rw-r--r--regress/usr.bin/mandoc/tbl/opt.out_lint2
11 files changed, 97 insertions, 11 deletions
diff --git a/regress/usr.bin/mandoc/tbl/Makefile b/regress/usr.bin/mandoc/tbl/Makefile
index af6f4361f88..55f910d4738 100644
--- a/regress/usr.bin/mandoc/tbl/Makefile
+++ b/regress/usr.bin/mandoc/tbl/Makefile
@@ -1,10 +1,13 @@
-# $OpenBSD: Makefile,v 1.11 2015/01/28 04:18:31 schwarze Exp $
+# $OpenBSD: Makefile,v 1.12 2015/01/28 17:30:37 schwarze Exp $
-REGRESS_TARGETS = blankline center expand fonts layout layout_center
+REGRESS_TARGETS = blankline block_unclosed center
+REGRESS_TARGETS += empty expand fonts layout layout_center
REGRESS_TARGETS += macro misalign nested numbers opt span vert
-LINT_TARGETS = layout macro nested opt
+LINT_TARGETS = block_unclosed empty layout macro nested opt
-# groff-1.22.3 defect:
+# groff-1.22.3 defects:
+# - When a table ends in the middle of a block,
+# GNU eqn produces no output whatsoever for the whole table.
# - When space is insufficient (on either side) for properly aligning
# a number, GNU tbl(1) moves the number too much to the right,
# overflowing the column, even if space would be sufficient without
@@ -13,7 +16,7 @@ LINT_TARGETS = layout macro nested opt
# trivial difference to groff-1.22.3:
# .TS in a table causes a blank table line in GNU tbl(1), but not in mandoc.
-SKIP_GROFF = misalign nested
+SKIP_GROFF = block_unclosed misalign nested
SKIP_TMAN ?= ALL SILENT
TBL = /usr/local/bin/tbl
diff --git a/regress/usr.bin/mandoc/tbl/block_unclosed.in b/regress/usr.bin/mandoc/tbl/block_unclosed.in
new file mode 100644
index 00000000000..9d535a64a8d
--- /dev/null
+++ b/regress/usr.bin/mandoc/tbl/block_unclosed.in
@@ -0,0 +1,28 @@
+.TH TBL-BLOCK_UNCLOSED 1 "January 28, 2015" OpenBSD
+.SH NAME
+tbl-block_unclosed \- unclosed text block
+.SH DESCRIPTION
+normal text
+.TS
+box tab(:);
+lll.
+begin:T{
+middle
+T}:end
+incomplete:T{
+block
+.TE
+normal text
+.TS
+box tab(:);
+lll.
+begin:T{
+middle
+T}:end
+incomplete:T{
+block
+.T&
+rrr.
+reset:still:works
+.TE
+normal text
diff --git a/regress/usr.bin/mandoc/tbl/block_unclosed.out_ascii b/regress/usr.bin/mandoc/tbl/block_unclosed.out_ascii
new file mode 100644
index 00000000000..d0ac26b8fa6
--- /dev/null
+++ b/regress/usr.bin/mandoc/tbl/block_unclosed.out_ascii
@@ -0,0 +1,25 @@
+TBL-BLOCK_UNCLOSED(1) General Commands Manual TBL-BLOCK_UNCLOSED(1)
+
+
+
+NNAAMMEE
+ tbl-block_unclosed - unclosed text block
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ +--------------------------+
+ |begin middle end |
+ |incomplete block |
+ +--------------------------+
+ normal text
+
+ +----------------------------+
+ |begin middle end |
+ |incomplete block |
+ | reset still works |
+ +----------------------------+
+ normal text
+
+
+OpenBSD January 28, 2015 TBL-BLOCK_UNCLOSED(1)
diff --git a/regress/usr.bin/mandoc/tbl/block_unclosed.out_lint b/regress/usr.bin/mandoc/tbl/block_unclosed.out_lint
new file mode 100644
index 00000000000..452cde4d05c
--- /dev/null
+++ b/regress/usr.bin/mandoc/tbl/block_unclosed.out_lint
@@ -0,0 +1,2 @@
+mandoc: block_unclosed.in:6:1: ERROR: data block open at end of tbl: TE
+mandoc: block_unclosed.in: ERROR: data block open at end of tbl: T&
diff --git a/regress/usr.bin/mandoc/tbl/empty.in b/regress/usr.bin/mandoc/tbl/empty.in
new file mode 100644
index 00000000000..0a9a040ec3e
--- /dev/null
+++ b/regress/usr.bin/mandoc/tbl/empty.in
@@ -0,0 +1,9 @@
+.TH TBL-EMPTY 1 "January 28, 2015" OpenBSD
+.SH NAME
+tbl-empty \- empty table
+.SH DESCRIPTION
+normal text
+.TS
+box; l.
+.TE
+normal text
diff --git a/regress/usr.bin/mandoc/tbl/empty.out_ascii b/regress/usr.bin/mandoc/tbl/empty.out_ascii
new file mode 100644
index 00000000000..5ffe70b2c19
--- /dev/null
+++ b/regress/usr.bin/mandoc/tbl/empty.out_ascii
@@ -0,0 +1,15 @@
+TBL-EMPTY(1) General Commands Manual TBL-EMPTY(1)
+
+
+
+NNAAMMEE
+ tbl-empty - empty table
+
+DDEESSCCRRIIPPTTIIOONN
+ normal text
+
+ normal text
+
+
+
+OpenBSD January 28, 2015 TBL-EMPTY(1)
diff --git a/regress/usr.bin/mandoc/tbl/empty.out_lint b/regress/usr.bin/mandoc/tbl/empty.out_lint
new file mode 100644
index 00000000000..153902d0c53
--- /dev/null
+++ b/regress/usr.bin/mandoc/tbl/empty.out_lint
@@ -0,0 +1 @@
+mandoc: empty.in:6:1: ERROR: tbl without any data cells
diff --git a/regress/usr.bin/mandoc/tbl/layout.out_lint b/regress/usr.bin/mandoc/tbl/layout.out_lint
index 855c2c26968..6f8587cea50 100644
--- a/regress/usr.bin/mandoc/tbl/layout.out_lint
+++ b/regress/usr.bin/mandoc/tbl/layout.out_lint
@@ -1,5 +1,5 @@
mandoc: layout.in:8:14: WARNING: skipping vertical bar in tbl layout
mandoc: layout.in:8:28: WARNING: skipping vertical bar in tbl layout
-mandoc: layout.in:10:7: ERROR: ignore data in cell
+mandoc: layout.in:10:7: ERROR: ignoring data in spanned tbl cell: h
mandoc: layout.in:16:3: WARNING: tbl column starts with span
-mandoc: layout.in:18:3: ERROR: ignore data in cell
+mandoc: layout.in:18:3: ERROR: ignoring data in spanned tbl cell: b
diff --git a/regress/usr.bin/mandoc/tbl/macro.in b/regress/usr.bin/mandoc/tbl/macro.in
index 07ba2456ea3..f941ab93528 100644
--- a/regress/usr.bin/mandoc/tbl/macro.in
+++ b/regress/usr.bin/mandoc/tbl/macro.in
@@ -6,9 +6,11 @@ normal text
.TS
box tab(:);
l | l .
-a:b
+a:b:stray
_
-.R c:d
+c:T{
+.SM d
+T}
.TE
.PP
normal text
diff --git a/regress/usr.bin/mandoc/tbl/macro.out_lint b/regress/usr.bin/mandoc/tbl/macro.out_lint
index b2c7a8b3023..992369f9a1b 100644
--- a/regress/usr.bin/mandoc/tbl/macro.out_lint
+++ b/regress/usr.bin/mandoc/tbl/macro.out_lint
@@ -1 +1,2 @@
-mandoc: macro.in:11:2: UNSUPP: ignoring macro in table: R c:d
+mandoc: macro.in:9:5: ERROR: ignoring extra tbl data cells: stray
+mandoc: macro.in:12:2: UNSUPP: ignoring macro in table: SM d
diff --git a/regress/usr.bin/mandoc/tbl/opt.out_lint b/regress/usr.bin/mandoc/tbl/opt.out_lint
index 1f217d0b82e..1802b2fd78a 100644
--- a/regress/usr.bin/mandoc/tbl/opt.out_lint
+++ b/regress/usr.bin/mandoc/tbl/opt.out_lint
@@ -2,4 +2,4 @@ mandoc: opt.in:7:5: ERROR: missing tbl option argument: tab
mandoc: opt.in:7:19: ERROR: wrong tbl option argument size: decimalpoint want 1 have 2
mandoc: opt.in:7:23: ERROR: non-alphabetic character in tbl options: %
mandoc: opt.in:7:24: ERROR: skipping unknown tbl option: foo
-mandoc: opt.in:15:21: UNSUPP: eqn in tbl
+mandoc: opt.in:15:21: UNSUPP: eqn delim option in tbl: $$