summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-03-20 15:45:12 +0000
committerrillig <rillig@pkgsrc.org>2020-03-20 15:45:12 +0000
commitec45aa178a227dc1449335958909d95c1b67c839 (patch)
tree735fc60f243df027b2ead704776b3fc2723451a3 /regress
parentd45dffb586e79449a255fd2a9df3b730f38d4fdc (diff)
downloadpkgsrc-ec45aa178a227dc1449335958909d95c1b67c839.tar.gz
regress/show-all: demonstrate wrong output of show-all
A real-life example of this pattern is EXTRACT_CMD_DEFAULT, which refers to DOWNLOADED_DISTFILE, which is defined as "$${extract_file}". Until mk/extract/extract.mk r1.40, that argument was discarded from the output completely. With the surrounding quotes at least the quotes are visible in the output of "bmake show-all-extract".
Diffstat (limited to 'regress')
-rw-r--r--regress/show-all/Makefile11
-rw-r--r--regress/show-all/spec21
2 files changed, 30 insertions, 2 deletions
diff --git a/regress/show-all/Makefile b/regress/show-all/Makefile
index 48f3774ced7..8c0de140348 100644
--- a/regress/show-all/Makefile
+++ b/regress/show-all/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/11/30 19:15:49 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2020/03/20 15:45:12 rillig Exp $
DISTNAME= show-all-1.0
CATEGORIES= regress
@@ -33,4 +33,13 @@ _PKG_VARS.regress+= * **
_SORTED_VARS.regress= *_ENV.*
_LISTED_VARS.regress= *_ARGS.*
+SHELLVAR_PLAIN= "$$var $${var} $$other"
+SHELLVAR_ENV= "$$var $${var} $$other"
+SHELLVAR_ARGS= "$$var $${var} $$other"
+
+_VARGROUPS+= shellvar
+_PKG_VARS.shellvar= SHELLVAR_PLAIN SHELLVAR_ENV SHELLVAR_ARGS
+_SORTED_VARS.shellvar= *_ENV
+_LISTED_VARS.shellvar= *_ARGS
+
.include "../../mk/bsd.pkg.mk"
diff --git a/regress/show-all/spec b/regress/show-all/spec
index 4161468a50f..0c2795580ca 100644
--- a/regress/show-all/spec
+++ b/regress/show-all/spec
@@ -1,4 +1,4 @@
-# $NetBSD: spec,v 1.2 2018/11/11 19:07:12 rillig Exp $
+# $NetBSD: spec,v 1.3 2020/03/20 15:45:12 rillig Exp $
tmpdir=${TMPDIR:-/tmp}/pkgsrc-show-all
rm -rf "$tmpdir"
@@ -16,6 +16,7 @@ require_file() {
do_test() {
$TEST_MAKE show-all-regress > "$tmpdir/show-all-regress.out"
+ $TEST_MAKE show-all-shellvar > "$tmpdir/show-all-shellvar.out"
}
check_result() {
@@ -68,4 +69,22 @@ EOF
# parsing shell commands, and that would be just too much.
require_file "$tmpdir/show-all-regress.out" --equals "$tmpdir/expected"
+
+
+ # TODO: What the heck is going on here?
+ # The output of the ENV and ARGS cases should be the same as in PLAIN.
+ #
+ cat <<'EOF' > "$tmpdir/expected"
+shellvar:
+ pkg SHELLVAR_PLAIN= "$var ${var} $other"
+ pkg SHELLVAR_ENV= \
+ ".MAKE.LEVEL.ENVar ther" \
+ # end of SHELLVAR_ENV (sorted)
+ pkg SHELLVAR_ARGS= \
+ ".MAKE.LEVEL.ENVar ther" \
+ # end of SHELLVAR_ARGS
+
+EOF
+
+ require_file "$tmpdir/show-all-shellvar.out" --equals "$tmpdir/expected"
}