From 300ce4b8f2fa829d017e53431b79fa04eb773f6a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 7 Jan 2015 12:19:18 +0000 Subject: Bugfix: When the invocation of a user-defined macro follows a roff conditional request on the same input line, don't skip the first few bytes of its content. --- regress/usr.bin/mandoc/roff/de/Makefile | 4 ++-- regress/usr.bin/mandoc/roff/de/cond.in | 13 +++++++++++++ regress/usr.bin/mandoc/roff/de/cond.out_ascii | 9 +++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 regress/usr.bin/mandoc/roff/de/cond.in create mode 100644 regress/usr.bin/mandoc/roff/de/cond.out_ascii (limited to 'regress/usr.bin/mandoc/roff') diff --git a/regress/usr.bin/mandoc/roff/de/Makefile b/regress/usr.bin/mandoc/roff/de/Makefile index 9e48a3be0f9..82a43f78885 100644 --- a/regress/usr.bin/mandoc/roff/de/Makefile +++ b/regress/usr.bin/mandoc/roff/de/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.7 2015/01/01 09:06:39 schwarze Exp $ +# $OpenBSD: Makefile,v 1.8 2015/01/07 12:19:17 schwarze Exp $ -REGRESS_TARGETS = append escname factorial indir startde TH Dd +REGRESS_TARGETS = append cond escname factorial indir startde TH Dd LINT_TARGETS = escname indir .include diff --git a/regress/usr.bin/mandoc/roff/de/cond.in b/regress/usr.bin/mandoc/roff/de/cond.in new file mode 100644 index 00000000000..057ad3a090b --- /dev/null +++ b/regress/usr.bin/mandoc/roff/de/cond.in @@ -0,0 +1,13 @@ +.Dd January 7, 2015 +.Dt DE-COND 1 +.Os OpenBSD +.Sh NAME +.Nm de-cond +.Nd conditional execution of a user-defined macro +.Sh DESCRIPTION +.de mym +This is the text printed by the macro. +.. +preceding text +.if n .mym +following text diff --git a/regress/usr.bin/mandoc/roff/de/cond.out_ascii b/regress/usr.bin/mandoc/roff/de/cond.out_ascii new file mode 100644 index 00000000000..2f946407a4c --- /dev/null +++ b/regress/usr.bin/mandoc/roff/de/cond.out_ascii @@ -0,0 +1,9 @@ +DE-COND(1) General Commands Manual DE-COND(1) + +NNAAMMEE + ddee--ccoonndd - conditional execution of a user-defined macro + +DDEESSCCRRIIPPTTIIOONN + preceding text This is the text printed by the macro. following text + +OpenBSD January 7, 2015 OpenBSD -- cgit v1.2.3