diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-29 15:22:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-29 15:22:17 +0000 |
commit | 16ab65c3e3a699cbb2591d1d913f77b9ee7e25ef (patch) | |
tree | 6f1418434fcac4f2d96c367c6d84443f2d226ed5 /regress/mdoc/Bl | |
parent | 6ada7b83e842fe7b40ac2db5443c847045455474 (diff) | |
download | mandoc-16ab65c3e3a699cbb2591d1d913f77b9ee7e25ef.tar.gz |
warn about some non-portable idioms in .Bl -column;
triggered by a question from Yuri Pankov (illumos)
Diffstat (limited to 'regress/mdoc/Bl')
-rw-r--r-- | regress/mdoc/Bl/Makefile | 11 | ||||
-rw-r--r-- | regress/mdoc/Bl/column.in | 3 | ||||
-rw-r--r-- | regress/mdoc/Bl/column.out_lint | 11 | ||||
-rw-r--r-- | regress/mdoc/Bl/column_nogroff.in | 19 | ||||
-rw-r--r-- | regress/mdoc/Bl/column_nogroff.out_ascii | 15 | ||||
-rw-r--r-- | regress/mdoc/Bl/column_nogroff.out_lint | 5 | ||||
-rw-r--r-- | regress/mdoc/Bl/column_nogroff.out_markdown | 18 |
7 files changed, 74 insertions, 8 deletions
diff --git a/regress/mdoc/Bl/Makefile b/regress/mdoc/Bl/Makefile index 01c45ed1..7ac8d729 100644 --- a/regress/mdoc/Bl/Makefile +++ b/regress/mdoc/Bl/Makefile @@ -1,7 +1,8 @@ # $OpenBSD: Makefile,v 1.31 2016/10/17 19:00:16 schwarze Exp $ REGRESS_TARGETS = item inset diag ohang bullet dash enum hang tag -REGRESS_TARGETS += column colNoIt extend nested offset secstart +REGRESS_TARGETS += column column_nogroff colNoIt +REGRESS_TARGETS += extend nested offset secstart REGRESS_TARGETS += notype multitype badargs REGRESS_TARGETS += empty noIt emptyhead emptytag emptyitem multitag @@ -9,7 +10,7 @@ REGRESS_TARGETS += bareIt bareTa unclosed break breakingIt breakingTa broken UTF8_TARGETS = dash -LINT_TARGETS = column notype badargs tag +LINT_TARGETS = column column_nogroff notype badargs tag LINT_TARGETS += empty noIt emptyhead emptytag emptyitem LINT_TARGETS += bareIt bareTa break breakingIt broken @@ -19,6 +20,8 @@ LINT_TARGETS += bareIt bareTa break breakingIt broken SKIP_GROFF ?= breakingTa # groff-1.22.3 defects: +# - column list items with no args but multiple lines cause bogus breaks +# - in column lists, the tab macro cannot be a line macro # - lists with missing or late type ruin indentation # - empty lists ruin indentation and sometimes cause empty lines # - breaking lists continue indefinitely @@ -26,7 +29,7 @@ SKIP_GROFF ?= breakingTa # - breaking a list aborts processing # - empty -tag item heads lose the blank line and the indentation -SKIP_GROFF += notype empty break breakingIt broken emptytag +SKIP_GROFF += column_nogroff notype empty emptytag break breakingIt broken SKIP_TMAN ?= column colNoIt multitype multitag bareTa break breakingTa broken @@ -38,7 +41,7 @@ SKIP_TMAN += tag # Empty heads are still mishandled by -Tman. -SKIP_TMAN += emptyhead emptytag +SKIP_TMAN += column_nogroff emptyhead emptytag # mandoc -T markdown still has issues with badly nested lists diff --git a/regress/mdoc/Bl/column.in b/regress/mdoc/Bl/column.in index be6ccdca..5f059a8c 100644 --- a/regress/mdoc/Bl/column.in +++ b/regress/mdoc/Bl/column.in @@ -68,11 +68,14 @@ .El .\" Wrong number of columns. .Bl -column "a" "b" +.It .It "a" .It "a" Ta "b" +.It .It "a" Ta "b" Ta "c" .It "a" Ta "b" Ta "c" Ta "d" .It "a" Ta "b" Ta "c" Ta "d" Ta "e" +.It .El .\" Mixed tab and Ta .Bl -column a b c d diff --git a/regress/mdoc/Bl/column.out_lint b/regress/mdoc/Bl/column.out_lint index d335550c..dea3ec79 100644 --- a/regress/mdoc/Bl/column.out_lint +++ b/regress/mdoc/Bl/column.out_lint @@ -1,7 +1,10 @@ mandoc: column.in:3:5: BASE: operating system explicitly specified: Os OpenBSD (OpenBSD) mandoc: column.in:1:5: BASE: Mdocdate missing: Dd October (OpenBSD) -mandoc: column.in:71:2: WARNING: wrong number of cells: 2 columns, 1 cells -mandoc: column.in:74:2: WARNING: wrong number of cells: 2 columns, 4 cells -mandoc: column.in:75:2: WARNING: wrong number of cells: 2 columns, 5 cells -mandoc: column.in:103:18: WARNING: skipping -width argument: Bl -column +mandoc: column.in:71:2: WARNING: skipping empty macro: It +mandoc: column.in:72:2: WARNING: wrong number of cells: 2 columns, 1 cells +mandoc: column.in:74:2: WARNING: skipping empty macro: It +mandoc: column.in:76:2: WARNING: wrong number of cells: 2 columns, 4 cells +mandoc: column.in:77:2: WARNING: wrong number of cells: 2 columns, 5 cells +mandoc: column.in:78:2: WARNING: skipping empty macro: It +mandoc: column.in:106:18: WARNING: skipping -width argument: Bl -column mandoc: column.in: BASE: RCS id missing: (OpenBSD) diff --git a/regress/mdoc/Bl/column_nogroff.in b/regress/mdoc/Bl/column_nogroff.in new file mode 100644 index 00000000..43f332fa --- /dev/null +++ b/regress/mdoc/Bl/column_nogroff.in @@ -0,0 +1,19 @@ +.Dd June 29, 2017 +.Dt BL-COLUMN_NOGROFF 1 +.Os OpenBSD +.Sh NAME +.Nm Bl-column_nogroff +.Nd column lists mishandled by groff +.Sh DESCRIPTION +Item macro without arguments: +.Bl -column "first column" "second column" +.It +text +.No macro Ta after tab +.El +.Pp +Tab macro at the beginning of a line: +.Bl -column "aa" "bb" +.It aa +.Ta bb +.El diff --git a/regress/mdoc/Bl/column_nogroff.out_ascii b/regress/mdoc/Bl/column_nogroff.out_ascii new file mode 100644 index 00000000..f86d4d4f --- /dev/null +++ b/regress/mdoc/Bl/column_nogroff.out_ascii @@ -0,0 +1,15 @@ +BL-COLUMN_NOGROFF(1) General Commands Manual BL-COLUMN_NOGROFF(1) + +NNAAMMEE + BBll--ccoolluummnn__nnooggrrooffff - column lists mishandled by groff + +DDEESSCCRRIIPPTTIIOONN + Item macro without arguments: + + text macro after tab + + Tab macro at the beginning of a line: + + aa bb + +OpenBSD June 29, 2017 OpenBSD diff --git a/regress/mdoc/Bl/column_nogroff.out_lint b/regress/mdoc/Bl/column_nogroff.out_lint new file mode 100644 index 00000000..df15cf1b --- /dev/null +++ b/regress/mdoc/Bl/column_nogroff.out_lint @@ -0,0 +1,5 @@ +mandoc: column_nogroff.in:3:5: BASE: operating system explicitly specified: Os OpenBSD (OpenBSD) +mandoc: column_nogroff.in:1:5: BASE: Mdocdate missing: Dd June (OpenBSD) +mandoc: column_nogroff.in:10:2: WARNING: missing argument, using next line: Bl -column It +mandoc: column_nogroff.in:18:2: WARNING: first macro on line: Ta +mandoc: column_nogroff.in: BASE: RCS id missing: (OpenBSD) diff --git a/regress/mdoc/Bl/column_nogroff.out_markdown b/regress/mdoc/Bl/column_nogroff.out_markdown new file mode 100644 index 00000000..595236fb --- /dev/null +++ b/regress/mdoc/Bl/column_nogroff.out_markdown @@ -0,0 +1,18 @@ +BL-COLUMN\_NOGROFF(1) - General Commands Manual + +# NAME + +**Bl-column\_nogroff** - column lists mishandled by groff + +# DESCRIPTION + +Item macro without arguments: + + text + macro after tab + +Tab macro at the beginning of a line: + + aa bb + +OpenBSD - June 29, 2017 |