aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-11-10 18:11:05 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-11-13 06:23:57 +0100
commitb7514eeac609a7e99c66031f853f695bb82c990a (patch)
tree0f695db928d7f6aaebf6c44bcb431b4af19f1ed4 /tests
parent78522acced782587b3768f3fb57f2f25cb905754 (diff)
Test suite: don't treat broken symlinks as missing.
`test -f` deferences paths so fails on broken symlinks, yielding an incorrect test environment and perhaps even a false negative.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/run b/tests/run
index bff9c18..2903938 100755
--- a/tests/run
+++ b/tests/run
@@ -73,7 +73,7 @@ environ_set() {
prepare() {
declare -a ENVIRON=()
local src cfg target u home n proto
- if [ -f "$TESTDIR/remotes" ]; then
+ if [ -f "$TESTDIR/remotes" ] || [ -L "$TESTDIR/remotes" ]; then
for cfg in $(seq 1 "$(< "$TESTDIR/remotes")"); do
REMOTES+=( "remote$cfg" )
done
@@ -98,7 +98,7 @@ prepare() {
inbox = yes
}
EOF
- if [ -f "$TESTDIR/$u.conf" ]; then
+ if [ -f "$TESTDIR/$u.conf" ] || [ -L "$TESTDIR/$u.conf" ]; then
cat >>"$home/.dovecot/config" <"$TESTDIR/$u.conf"
fi
cp -aT -- "$BASEDIR/snippets/dovecot" "$home/.dovecot/conf.d"
@@ -157,7 +157,7 @@ prepare() {
database = $u.db
#logfile = $HOME_local/interimap$n.log
EOF
- if [ -f "$TESTDIR/interimap$n.conf" ]; then
+ if [ -f "$TESTDIR/interimap$n.conf" ] || [ -L "$TESTDIR/interimap$n.conf" ]; then
cat <"$TESTDIR/interimap$n.conf" >>"$HOME_local/.config/interimap/config$n"
fi
@@ -168,7 +168,7 @@ prepare() {
command = exec ${HOME_local@Q}/.local/bin/doveadm exec imap
null-stderr = NO
EOF
- if [ -f "$TESTDIR/interimap$n.local" ]; then
+ if [ -f "$TESTDIR/interimap$n.local" ] || [ -L "$TESTDIR/interimap$n.local" ]; then
cat <"$TESTDIR/interimap$n.local" >>"$HOME_local/.config/interimap/config$n"
fi
@@ -185,7 +185,7 @@ prepare() {
null-stderr = NO
EOF
fi >>"$HOME_local/.config/interimap/config$n"
- if [ -f "$TESTDIR/interimap$n.remote" ]; then
+ if [ -f "$TESTDIR/interimap$n.remote" ] || [ -L "$TESTDIR/interimap$n.remote" ]; then
cat <"$TESTDIR/interimap$n.remote" >>"$HOME_local/.config/interimap/config$n"
fi
done