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 @@ +# This file is part of GNU pies testsuite. -*- autotest -*- +# Copyright (C) 2016-2023 Sergey Poznyakoff +# +# GNU pies is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU pies is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU pies. If not, see <http://www.gnu.org/licenses/>. + +AT_SETUP([flags expandenv]) + +AT_CHECK([ +PIES_XFAIL_CHECK +PIES_CONTROL_INIT +statefile=$PWD/state +cat > pies.conf <<EOT +component test { + mode respawn; + flags expandenv; + command "\$auxdir/respawn \$statefile 3"; + chdir "$PWD"; + return-code 1 { + action disable; + exec "piesctl --config-file=/dev/null --url unix:///$PWD/pies.ctl --no-netrc shutdown"; + } +} +EOT + +export auxdir +export statefile + +set -e +to 5 \ + pies --no-preprocessor --foreground --stderr \ + --config-file control.conf --config-file pies.conf --debug 4 2>errlog + +cat state +], +[0], +[3 +]) + +AT_CLEANUP |