From 934cb486d6abf7176409d043cafceb25549df281 Mon Sep 17 00:00:00 2001 From: rillig Date: Wed, 7 Mar 2007 21:22:20 +0000 Subject: Added a regression test for the SUBST framework, especially the newly introduced SUBST_VARS. --- regress/subst/Makefile | 31 +++++++++++++++++++++++++++++++ regress/subst/vars.mk | 5 +++++ 2 files changed, 36 insertions(+) create mode 100644 regress/subst/Makefile create mode 100644 regress/subst/vars.mk (limited to 'regress/subst') diff --git a/regress/subst/Makefile b/regress/subst/Makefile new file mode 100644 index 00000000000..5fdc24e9ebd --- /dev/null +++ b/regress/subst/Makefile @@ -0,0 +1,31 @@ +# $NetBSD: Makefile,v 1.1 2007/03/07 21:22:20 rillig Exp $ +# + +DISTNAME= subst-1.0 +CATEGORIES= regress +DISTFILES= # none + +MAINTAINER= rillig@NetBSD.org +COMMENT= Test the SUBST framework + +NO_CHECKSUM= yes +WRKSRC= ${WRKDIR} +USE_TOOLS+= diff + +SUBST_CLASSES+= vars +SUBST_STAGE.vars= do-build +SUBST_FILES.vars= vars +SUBST_VARS.vars= PLAIN DQUOT SQUOT DELIM EVIL1 + +.include "${.PARSEDIR}/vars.mk" + +pre-build: + for v in ${SUBST_VARS.vars}; do echo "$$v=@$$v@"; done > ${WRKSRC}/vars + +do-build: + @${DO_NADA} + +post-build: + diff vars.mk ${WRKSRC}/vars + +.include "../../mk/bsd.pkg.mk" diff --git a/regress/subst/vars.mk b/regress/subst/vars.mk new file mode 100644 index 00000000000..739e6d7ce0a --- /dev/null +++ b/regress/subst/vars.mk @@ -0,0 +1,5 @@ +PLAIN=hello_world +DQUOT="hello world" +SQUOT='hello world' +DELIM=hello, world +EVIL1=h\ello \0\0\0 \\\"\' foo && bar -- cgit v1.2.3