diff options
Diffstat (limited to 'tests/expandenv.at')
-rw-r--r-- | tests/expandenv.at | 50 |
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 | |||
17 | AT_SETUP([flags expandenv]) | ||
18 | |||
19 | AT_CHECK([ | ||
20 | PIES_XFAIL_CHECK | ||
21 | PIES_CONTROL_INIT | ||
22 | statefile=$PWD/state | ||
23 | cat > pies.conf <<EOT | ||
24 | component 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 | } | ||
34 | EOT | ||
35 | |||
36 | export auxdir | ||
37 | export statefile | ||
38 | |||
39 | set -e | ||
40 | to 5 \ | ||
41 | pies --no-preprocessor --foreground --stderr \ | ||
42 | --config-file control.conf --config-file pies.conf --debug 4 2>errlog | ||
43 | |||
44 | cat state | ||
45 | ], | ||
46 | [0], | ||
47 | [3 | ||
48 | ]) | ||
49 | |||
50 | AT_CLEANUP | ||