aboutsummaryrefslogtreecommitdiff
path: root/tests/expandenv.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/expandenv.at')
-rw-r--r--tests/expandenv.at50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/expandenv.at b/tests/expandenv.at
new file mode 100644
index 0000000..c330c12
--- /dev/null
+++ b/tests/expandenv.at
@@ -0,0 +1,50 @@
1# This file is part of GNU pies testsuite. -*- autotest -*-
2# Copyright (C) 2016-2023 Sergey Poznyakoff
3#
4# GNU pies is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# GNU pies is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with GNU pies. If not, see <http://www.gnu.org/licenses/>.
16
17AT_SETUP([flags expandenv])
18
19AT_CHECK([
20PIES_XFAIL_CHECK
21PIES_CONTROL_INIT
22statefile=$PWD/state
23cat > pies.conf <<EOT
24component test {
25 mode respawn;
26 flags expandenv;
27 command "\$auxdir/respawn \$statefile 3";
28 chdir "$PWD";
29 return-code 1 {
30 action disable;
31 exec "piesctl --config-file=/dev/null --url unix:///$PWD/pies.ctl --no-netrc shutdown";
32 }
33}
34EOT
35
36export auxdir
37export statefile
38
39set -e
40to 5 \
41 pies --no-preprocessor --foreground --stderr \
42 --config-file control.conf --config-file pies.conf --debug 4 2>errlog
43
44cat state
45],
46[0],
47[3
48])
49
50AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.