From 1507128fcca36093ea9f544e8a44adca5d514605 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 1 Jul 2020 21:26:23 +0200 Subject: pullimap: Also compare RFC 5322 date and envelope information in mailbox comparison tests. --- tests/pullimap/t | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/pullimap/t b/tests/pullimap/t index 115432d..0dfe634 100644 --- a/tests/pullimap/t +++ b/tests/pullimap/t @@ -6,15 +6,13 @@ step_start "\`pullimap --idle\` refuses to create the state file" ! pullimap --idle "remote" || error step_done -# compare mailboxes; can't compare the RFC 3501 TEXT as LMTP adds a -# Received: header. -# TODO unset lmtp_add_received_header once available in sid: -# https://doc.dovecot.org/settings/dovecot_core_settings/#lmtp-add-received-header +# 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() { local u="$1" guid uid + local fields="body date.sent imap.bodystructure imap.envelope" while read guid uid; do - doveadm -u "$u" -f "flow" fetch body mailbox-guid "$guid" uid "$uid" \ - | sed "1s/body=//" | sha256sum + doveadm -u "$u" -f "flow" fetch "$fields" mailbox-guid "$guid" uid "$uid" | sha256sum done < <(doveadm -u "$u" search mailbox "$MAILBOX") | sort -f } check() { -- cgit v1.2.3 From a1c089b997ebf705a9023b4f0f97327e5bd2814e Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 1 Jul 2020 22:41:28 +0200 Subject: Makefile: Major refactoring, add install and uninstall targets. Honor BUILD_DOCDIR and DESTDIR variables. Also, remove the `use lib` statement from our executables. --- tests/db-exclusive-lock/t | 4 ++-- tests/db-no-create--watch/t | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/db-exclusive-lock/t b/tests/db-exclusive-lock/t index 88172c9..c2df4b5 100644 --- a/tests/db-exclusive-lock/t +++ b/tests/db-exclusive-lock/t @@ -10,7 +10,7 @@ sleep .5 # subsequent runs fail as we can't acquire the exclusive lock ! interimap || error -grep -Fx "DBD::SQLite::db do failed: database is locked at ./interimap line 177." <"$STDERR" \ - || error "Is \$DBH->do(\"PRAGMA locking_mode = EXCLUSIVE\"); at line 177?" +grep -Fx "DBD::SQLite::db do failed: database is locked at ./interimap line 176." <"$STDERR" \ + || error "Is \$DBH->do(\"PRAGMA locking_mode = EXCLUSIVE\"); at line 176?" # vim: set filetype=sh : diff --git a/tests/db-no-create--watch/t b/tests/db-no-create--watch/t index 89f1e3e..a8ea07e 100644 --- a/tests/db-no-create--watch/t +++ b/tests/db-no-create--watch/t @@ -1,6 +1,6 @@ ! interimap --watch=60 || error -grep -Ex "DBI connect\(.*\) failed: unable to open database file at \./interimap line 173\." <"$STDERR" || error +grep -Ex "DBI connect\(.*\) failed: unable to open database file at \./interimap line 172\." <"$STDERR" || error test \! -e "$XDG_DATA_HOME/interimap/remote.db" || error # vim: set filetype=sh : -- cgit v1.2.3