diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-04-29 18:32:58 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-04-29 18:32:58 +0000 |
commit | 3a07146843d313216f9d1706c26ba80cc5d4eb1d (patch) | |
tree | 0ced2c3e5a8615710bf33b5c2802ff1fc75528d8 /regress/usr.bin | |
parent | ef9a812009417cf2553569040b1816ffcc23e3da (diff) |
Replace the kludge for the \z escape sequence by an actual
implementation. As a side effect, minus ten lines of code.
As another side effect, this also fixes the assertion failure that
used to be triggered by "\z\o'ab'c" at the beginning of an output
line, found by jsg@ with afl (test case 022/Apr27).
Diffstat (limited to 'regress/usr.bin')
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/Makefile | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/z.in | 6 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/roff/esc/z.out_ascii | 15 |
3 files changed, 13 insertions, 20 deletions
diff --git a/regress/usr.bin/mandoc/roff/esc/Makefile b/regress/usr.bin/mandoc/roff/esc/Makefile index ab2b01a543c..f0860368510 100644 --- a/regress/usr.bin/mandoc/roff/esc/Makefile +++ b/regress/usr.bin/mandoc/roff/esc/Makefile @@ -1,16 +1,6 @@ -# $OpenBSD: Makefile,v 1.10 2015/01/21 20:20:49 schwarze Exp $ +# $OpenBSD: Makefile,v 1.11 2015/04/29 18:32:57 schwarze Exp $ REGRESS_TARGETS = one two multi B c c_man e f h o w z ignore LINT_TARGETS = B h w ignore -# Postprocessing to remove "character backspace" sequences -# unless they are followed by the same character again. -# This removes underlining as well, so we mustn't use it. -# Cannot use /g because matches progress backwards. - -z.out_ascii: z.in - ${NROFF} ${NOPTS} -Tascii ${.ALLSRC} | \ - perl -pe 'while (s/(.)\010(?!\1)//) {}' \ - > ${.TARGET} - .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/roff/esc/z.in b/regress/usr.bin/mandoc/roff/esc/z.in index 7076ebb0bcd..9d3ad1d5f1c 100644 --- a/regress/usr.bin/mandoc/roff/esc/z.in +++ b/regress/usr.bin/mandoc/roff/esc/z.in @@ -1,4 +1,4 @@ -.Dd May 28, 2012 +.Dd April 29, 2015 .Dt ESC-Z 1 .Os OpenBSD .Sh NAME @@ -17,6 +17,8 @@ single z with font escape: >\z\fBxbold\fP< single z with nospace escape: >\z\c new line< .br -single z with undefined escape: >\z\a< +single z with overstrike: >\z\o'ab'c< +.br +single z near the end of the line: >\z< .br double z: >\z\zx< diff --git a/regress/usr.bin/mandoc/roff/esc/z.out_ascii b/regress/usr.bin/mandoc/roff/esc/z.out_ascii index 935ebe6020f..233a4aa5c7b 100644 --- a/regress/usr.bin/mandoc/roff/esc/z.out_ascii +++ b/regress/usr.bin/mandoc/roff/esc/z.out_ascii @@ -4,12 +4,13 @@ NNAAMMEE eesscc--zz - the roff escape z sequence DDEESSCCRRIIPPTTIIOONN - single z with ASCII char: >< - single z with escape char: >< - single z with defined string (mytext): >ytext< - single z with font escape: >bboolldd< + single z with ASCII char: >x< + single z with escape char: >O< + single z with defined string (mytext): >mytext< + single z with font escape: >xxbboolldd< single z with nospace escape: > new line< - single z with undefined escape: >< - double z: >< + single z with overstrike: >abc< + single z near the end of the line: >< + double z: >x< -OpenBSD May 28, 2012 OpenBSD +OpenBSD April 29, 2015 OpenBSD |