summaryrefslogtreecommitdiff
path: root/regress/subst
diff options
context:
space:
mode:
authorrillig <rillig>2007-03-07 21:22:20 +0000
committerrillig <rillig>2007-03-07 21:22:20 +0000
commita1abe36aef661992d672cf1c2a9360c153760dfe (patch)
tree156165fb26750ffdde203cb030709d573a39fb21 /regress/subst
parent00c6503dcf45a4ce5e9c0dfec3a02e958697add7 (diff)
downloadpkgsrc-a1abe36aef661992d672cf1c2a9360c153760dfe.tar.gz
Added a regression test for the SUBST framework, especially the newly
introduced SUBST_VARS.
Diffstat (limited to 'regress/subst')
-rw-r--r--regress/subst/Makefile31
-rw-r--r--regress/subst/vars.mk5
2 files changed, 36 insertions, 0 deletions
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