diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-06-20 22:29:39 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-06-20 22:29:39 +0000 |
commit | 07a861bf4089b3b357a0dfd968099a685d0f25e7 (patch) | |
tree | 6cbdb132228b227730110fef52df58ea399ddbc2 /regress | |
parent | 8f00e4f16cf85c50b2b5d75ef62d64a699603bbe (diff) |
Improve handling of the roff(7) "\t" escape sequence:
* Parsing macro arguments has to be done in copy mode,
which implies replacing "\t" by a literal tab character.
* Otherwise, render "\t" as the empty string, not as a 't' character.
This fixes formatting of the distfile example in the oldrdist(1) manual.
This also shows up in the unzip(1) manual as one of several issues
preventing the removal of USE_GROFF from the archivers/unzip port.
Thanks to espie@ for attracting my attention to the unzip(1) manual.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/mandoc/char/space/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/char/space/esct-man.in | 34 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/char/space/esct-man.out_ascii | 36 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/char/space/esct-mdoc.in | 35 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/char/space/esct-mdoc.out_ascii | 34 |
5 files changed, 141 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/char/space/Makefile b/regress/usr.bin/mandoc/char/space/Makefile index 7ce50af3cb1..578488d78ac 100644 --- a/regress/usr.bin/mandoc/char/space/Makefile +++ b/regress/usr.bin/mandoc/char/space/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.6 2012/07/16 21:14:05 schwarze Exp $ +# $OpenBSD: Makefile,v 1.7 2013/06/20 22:29:38 schwarze Exp $ REGRESS_TARGETS = leading-mdoc leading-man multiple zerowidth -REGRESS_TARGETS += eos nobreak tab tab-man +REGRESS_TARGETS += eos nobreak tab tab-man esct-mdoc esct-man .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/char/space/esct-man.in b/regress/usr.bin/mandoc/char/space/esct-man.in new file mode 100644 index 00000000000..90aed2c7477 --- /dev/null +++ b/regress/usr.bin/mandoc/char/space/esct-man.in @@ -0,0 +1,34 @@ +.TH SPACE-ESCT-MAN 1 2013-06-20 OpenBSD +.SH NAME +SPACE-T-MAN \- the t escape sequence in pages with man macros +.SH DESCRIPTION +In plain text: +.br +single tab +.br +single\tescape-t +.br +double tab +.br +double\t\tescape-t +.br +\tThis line starts with escape-t and comes close to the right margin. +\tThe next line starts with escape-t as well. +.sp +In a literal display: +.nf +single tab +single\tescape-t +double tab +double\t\tescape-t +.fi +.sp +After the IP macro: +.IP single tab 3n +text +.IP single\tescape-t 3n +text +.PP +After font macros: +.br +.B single\ttab diff --git a/regress/usr.bin/mandoc/char/space/esct-man.out_ascii b/regress/usr.bin/mandoc/char/space/esct-man.out_ascii new file mode 100644 index 00000000000..017b3b133d3 --- /dev/null +++ b/regress/usr.bin/mandoc/char/space/esct-man.out_ascii @@ -0,0 +1,36 @@ +SPACE-ESCT-MAN(1) OpenBSD Reference Manual SPACE-ESCT-MAN(1) + + + +NNAAMMEE + SPACE-T-MAN - the t escape sequence in pages with man macros + +DDEESSCCRRIIPPTTIIOONN + In plain text: + single tab + singleescape-t + double tab + doubleescape-t + This line starts with escape-t and comes close to the right margin. + The next line starts with escape-t as well. + + In a literal display: + single tab + singleescape-t + double tab + doubleescape-t + + After the IP macro: + + single tab + text + + single escape-t + text + + After font macros: + ssiinnggllee ttaabb + + + +OpenBSD 2013-06-20 SPACE-ESCT-MAN(1) diff --git a/regress/usr.bin/mandoc/char/space/esct-mdoc.in b/regress/usr.bin/mandoc/char/space/esct-mdoc.in new file mode 100644 index 00000000000..6aa8c3923bc --- /dev/null +++ b/regress/usr.bin/mandoc/char/space/esct-mdoc.in @@ -0,0 +1,35 @@ +.Dd $Mdocdate: June 20 2013 $ +.Dt SPACE-ESCT-MDOC 1 +.Os OpenBSD +.Sh NAME +.Nm space-esct-mdoc +.Nd the t escape sequence in pages with mdoc macros +.Sh DESCRIPTION +In plain text: +.Pp +single tab +.Pp +single\tescape-t +.Pp +double tab +.Pp +double\t\tescape-t +.Pp +\tThis line starts with escape-t and comes close to the right margin. +\tThe next line starts with escape-t as well. +.Pp +In an unfilled display: +.Bd -unfilled -offset 3n +single tab +single\tescape-t +double tab +double\t\tescape-t +.Ed +.Pp +In a literal display: +.Bd -literal -offset 3n +single tab +single\tescape-t +double tab +double\t\tescape-t +.Ed diff --git a/regress/usr.bin/mandoc/char/space/esct-mdoc.out_ascii b/regress/usr.bin/mandoc/char/space/esct-mdoc.out_ascii new file mode 100644 index 00000000000..b448b2a0e19 --- /dev/null +++ b/regress/usr.bin/mandoc/char/space/esct-mdoc.out_ascii @@ -0,0 +1,34 @@ +SPACE-ESCT-MDOC(1) OpenBSD Reference Manual SPACE-ESCT-MDOC(1) + +NNAAMMEE + ssppaaccee--eesscctt--mmddoocc - the t escape sequence in pages with mdoc macros + +DDEESSCCRRIIPPTTIIOONN + In plain text: + + single tab + + singleescape-t + + double tab + + doubleescape-t + + This line starts with escape-t and comes close to the right margin. The + next line starts with escape-t as well. + + In an unfilled display: + + single tab + singleescape-t + double tab + doubleescape-t + + In a literal display: + + single tab + singleescape-t + double tab + doubleescape-t + +OpenBSD June 20, 2013 OpenBSD |