diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-01-05 22:19:01 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2013-01-05 22:19:01 +0000 |
commit | eb4cf5a527ef077db0bb51008f3fc3ec99d3ff7b (patch) | |
tree | fcdf88d094c0eaef7f389ab1668713ebac15789a /regress | |
parent | a7211c4243c56b8dea7b8355eb743fd1b42fa5ae (diff) |
In literal mode (.nf), each input line must be kept together
on the same output line, even if it is longer than the output width.
This commit fixes a bug allowing an overly long last line of an
indented block (.RS) to be broken even in literal mode.
The bug was found using the sudo_plugin(4) manual provided by millert@.
I introduced the bug in rev. 1.84 during the g2k12 Budapest hackathon.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.bin/mandoc/man/RS/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/man/RS/literal.in | 18 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/man/RS/literal.out_ascii | 20 |
3 files changed, 40 insertions, 2 deletions
diff --git a/regress/usr.bin/mandoc/man/RS/Makefile b/regress/usr.bin/mandoc/man/RS/Makefile index ac5c2ff35d4..bca9d9e9017 100644 --- a/regress/usr.bin/mandoc/man/RS/Makefile +++ b/regress/usr.bin/mandoc/man/RS/Makefile @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile,v 1.3 2012/11/18 17:59:03 schwarze Exp $ +# $OpenBSD: Makefile,v 1.4 2013/01/05 22:18:59 schwarze Exp $ -REGRESS_TARGETS = breaking empty nested +REGRESS_TARGETS = breaking empty literal nested .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/man/RS/literal.in b/regress/usr.bin/mandoc/man/RS/literal.in new file mode 100644 index 00000000000..bd57c610b6e --- /dev/null +++ b/regress/usr.bin/mandoc/man/RS/literal.in @@ -0,0 +1,18 @@ +.TH RS-LITERAL 1 "January 5, 2013" OpenBSD +.SH NAME +RS-literal \- indented literal text +.SH DESCRIPTION +regular +text +.nf +literal +text +.RS +This is a short line. +This is a very long line that would wrap if it weren't in literal context. +.RE +.PP +literal text +.fi +regular +text diff --git a/regress/usr.bin/mandoc/man/RS/literal.out_ascii b/regress/usr.bin/mandoc/man/RS/literal.out_ascii new file mode 100644 index 00000000000..c8d527ecc0b --- /dev/null +++ b/regress/usr.bin/mandoc/man/RS/literal.out_ascii @@ -0,0 +1,20 @@ +RS-LITERAL(1) OpenBSD Reference Manual RS-LITERAL(1) + + + +NNAAMMEE + RS-literal - indented literal text + +DDEESSCCRRIIPPTTIIOONN + regular text + literal + text + This is a short line. + This is a very long line that would wrap if it weren't in literal context. + + literal text + regular text + + + +OpenBSD January 5, 2013 RS-LITERAL(1) |