summaryrefslogtreecommitdiffabout
path: root/tests/env.at
Side-by-side diff
Diffstat (limited to 'tests/env.at') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/env.at72
1 files changed, 70 insertions, 2 deletions
diff --git a/tests/env.at b/tests/env.at
index 18b0e52..430bf10 100644
--- a/tests/env.at
+++ b/tests/env.at
@@ -15,7 +15,7 @@ component envtest {
stdout file "$PWD/log";
return-code 0 {
action disable;
- exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
+ exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
}
}
_EOT
@@ -23,7 +23,7 @@ _EOT
to 5 \
envtest -exec \
$abs_top_builddir/src/pies --foreground --stderr \
- --config-file control.conf --config-file envtest.conf 2>errlog
+ --config-file control.conf --config-file envtest.conf --debug 1 2>errlog
cat log
],
[0],
@@ -68,3 +68,71 @@ USER="user"
])
m4_popdef([ENVTEST])
+
+# ##############################
+# Legacy syntax
+# ##############################
+
+AT_BANNER([env: legacy syntax])
+
+m4_pushdef([ENVTEST],
+[AT_SETUP([$1])
+AT_KEYWORDS([env $2])
+AT_CHECK([
+PIES_XFAIL_CHECK
+PIES_CONTROL_INIT
+cat > envtest.conf <<_EOT
+component envtest {
+ env $3;
+ command "$abs_builddir/envtest -clone";
+ chdir $PWD;
+ stdout file "$PWD/log";
+ return-code 0 {
+ action disable;
+ exec "$abs_top_builddir/src/piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown";
+ }
+}
+_EOT
+
+to 5 \
+ envtest -exec \
+ $abs_top_builddir/src/pies --foreground --stderr \
+ --config-file control.conf --config-file envtest.conf --debug 1 2>errlog
+cat log
+],
+[0],
+[$4])
+AT_CLEANUP])
+
+ENVTEST([clear],[clear],[-],[])
+ENVTEST([keep],[keep],[- USER LOGIN],
+[LOGIN="user"
+USER="user"
+])
+
+ENVTEST([set],[set],["FOO=bar" "BAR=bar"],
+[BAR="bar"
+FOO="bar"
+HOME="/home/user"
+LC_ALL="C"
+LC_CTYPE="C"
+LC_MESSAGES="C"
+LC_NUMERIC="C"
+LOGIN="user"
+PATH="/usr/local/bin:/usr/bin:/bin"
+PIES_INSTANCE="pies"
+PWD="/home"
+USER="user"
+])
+
+ENVTEST([unset],[unset],["-LC_NUMERIC" "-LC_CTYPE" "-LC_MESSAGES"],
+[HOME="/home/user"
+LC_ALL="C"
+LOGIN="user"
+PATH="/usr/local/bin:/usr/bin:/bin"
+PIES_INSTANCE="pies"
+PWD="/home"
+USER="user"
+])
+
+

Return to:

Send suggestions and report system problems to the System administrator.