summaryrefslogtreecommitdiff
path: root/yarn.tests
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-07-31 18:37:33 +0100
committerLars Wirzenius <liw@liw.fi>2013-07-31 18:37:33 +0100
commit8443dc250bb58091c435db2b29e2029c434d1750 (patch)
tree14f16c6ebf75b383c771f791e9fed0667315eb02 /yarn.tests
parent3fb60d86c01ef3bc615d39e69ee0011aef906685 (diff)
downloadcmdtest-8443dc250bb58091c435db2b29e2029c434d1750.tar.gz
Set SRCDIR and clean environment
Diffstat (limited to 'yarn.tests')
-rwxr-xr-xyarn.tests/env.script18
1 files changed, 18 insertions, 0 deletions
diff --git a/yarn.tests/env.script b/yarn.tests/env.script
new file mode 100755
index 0000000..2ef35c6
--- /dev/null
+++ b/yarn.tests/env.script
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -eu
+
+cat << 'EOF' > "$DATADIR/env.yarn"
+ SCENARIO check environment
+ THEN DATADIR is set
+ AND SRCDIR is set
+ AND NOTSET is not set
+
+ IMPLEMENTS THEN (\S+) is set
+ env | grep "^$MATCH_1="
+
+ IMPLEMENTS THEN (\S+) is not set
+ ! env | grep "^$MATCH_1="
+EOF
+
+NOTSET=foo ./run-yarn "$DATADIR/env.yarn"