From: schwarze Date: Tue, 30 Dec 2014 10:28:56 +0000 (+0000) Subject: Test the weird construct of a user-defined macro starting (but not X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c8ec74dcb026596dbf799f9528320d2541f56cc7;p=openbsd Test the weird construct of a user-defined macro starting (but not ending!) the definition of another user defined macro. Mandoc already handles this correctly, make sure it won't get broken. --- diff --git a/regress/usr.bin/mandoc/roff/de/Makefile b/regress/usr.bin/mandoc/roff/de/Makefile index 4155d973e77..f186519ce99 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.5 2014/07/07 11:34:41 schwarze Exp $ +# $OpenBSD: Makefile,v 1.6 2014/12/30 10:28:56 schwarze Exp $ -REGRESS_TARGETS = append escname indir TH Dd +REGRESS_TARGETS = append escname indir startde TH Dd LINT_TARGETS = escname indir .include diff --git a/regress/usr.bin/mandoc/roff/de/startde.in b/regress/usr.bin/mandoc/roff/de/startde.in new file mode 100644 index 00000000000..ca9cfac1cd3 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/de/startde.in @@ -0,0 +1,24 @@ +.Dd December 30, 2014 +.Dt DE-STARTDE 1 +.Os OpenBSD +.Sh NAME +.Nm de-startde +.Nd macro starting a macro definition, but not ending it +.Sh DESCRIPTION +define outer macro: +.de outer +outer macro called; define inner macro: +.de inner +inner macro called; end outer scope. +.. +outer scope ended; outer macro now defined. +.Pp +call outer macro: +.outer +returned from call of outer macro; end inner scope. +.. +inner scope ended; inner macro now defined. +.Pp +call inner macro: +.inner +returned from call of inner macro. diff --git a/regress/usr.bin/mandoc/roff/de/startde.out_ascii b/regress/usr.bin/mandoc/roff/de/startde.out_ascii new file mode 100644 index 00000000000..05b58e8c831 --- /dev/null +++ b/regress/usr.bin/mandoc/roff/de/startde.out_ascii @@ -0,0 +1,15 @@ +DE-STARTDE(1) General Commands Manual DE-STARTDE(1) + +NNAAMMEE + ddee--ssttaarrttddee - macro starting a macro definition, but not ending it + +DDEESSCCRRIIPPTTIIOONN + define outer macro: outer scope ended; outer macro now defined. + + call outer macro: outer macro called; define inner macro: inner scope + ended; inner macro now defined. + + call inner macro: inner macro called; end outer scope. returned from + call of outer macro; end inner scope. returned from call of inner macro. + +OpenBSD December 30, 2014 OpenBSD