aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pullimap/t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pullimap/t')
-rw-r--r--tests/pullimap/t13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/pullimap/t b/tests/pullimap/t
index 58a19ca..e508784 100644
--- a/tests/pullimap/t
+++ b/tests/pullimap/t
@@ -13,6 +13,17 @@ if ! st="$(stat -c"%#a" -- "$XDG_DATA_HOME/pullimap/remote")" || [ "$st" != "060
fi
step_done
+step_start "\`pullimap\` locks its statefile"
+pullimap --idle "remote" & PID=$!
+trap "ptree_abort $PID" EXIT INT TERM
+# wait a short while so we have time to lock the database (ugly and racy...)
+sleep .5
+! pullimap "remote" || error
+grep -F "Can't lock $XDG_DATA_HOME/pullimap/remote: Resource temporarily unavailable at " <"$STDERR" || error
+ptree_abort $PID
+trap - EXIT INT TERM
+step_done
+
# compare mailboxes (can't compare the RFC 3501 TEXT as the LMTPd inconditionally
# adds a Return-Path: header -- and also Delivered-To: and Received: to by default)
list_mails_sha256() {
@@ -149,4 +160,4 @@ doveadm -u "remote" search mailbox "$MAILBOX" all >"$TMPDIR/messages"
[ ! -s "$TMPDIR/messages" ] || error "messages left"
step_done
-# vim: set filetype=sh :
+# vim: set filetype=bash :