blob: 041072da194a99cef984cbae1ec282a10d805950 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#! /bin/sh
# This is a rudimentary tests to see if fetchmail can parse a trivial
# configuration and dump it in human-readable and machine-readable form.
set -eu
: "${TMPDIR:=/tmp}"
{
dir=`(umask 077 && mktemp -d "$TMPDIR/t.smoke.XXXXXX")` 2>/dev/null \
&& test -d "$dir"
} || {
dir=$TMPDIR/t.smoke.$$-$RANDOM
(umask 077 && mkdir "$dir")
}
trap 'r=$? ; rm -fr t.rc.$$ $dir ; exit $r' 0
cp "${srcdir}/t.rc" $dir/t.rc.$$
chmod 0400 $dir/t.rc.$$
HOME=$dir
FETCHMAILHOME=$dir
export HOME FETCHMAILHOME
./fetchmail -V -f $dir/t.rc.$$ >/dev/null
./fetchmail --configdump -f $dir/t.rc.$$ >/dev/null
|