aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pullimap
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pullimap')
-rw-r--r--tests/pullimap/t11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pullimap/t b/tests/pullimap/t
index 879c5d1..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() {