Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6DDDA40DBF0 for ; Wed, 10 Nov 2010 02:28:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XQcNE8GuFVrz for ; Wed, 10 Nov 2010 02:28:07 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 377F540DBF5 for ; Wed, 10 Nov 2010 02:28:07 -0800 (PST) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 8B58219F331D; Wed, 10 Nov 2010 11:28:06 +0100 (CET) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id jLbhJaW-DN6D; Wed, 10 Nov 2010 11:28:05 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 3B7C119F331A; Wed, 10 Nov 2010 11:28:05 +0100 (CET) Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 443AFFA004; Wed, 10 Nov 2010 11:28:05 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1PG7uP-0003xf-0i; Wed, 10 Nov 2010 11:28:05 +0100 From: Michal Sojka To: notmuch@notmuchmail.org Subject: [PATCH] test: More maildir synchronization tests Date: Wed, 10 Nov 2010 11:27:50 +0100 Message-Id: <1289384870-15199-1-git-send-email-sojkam1@fel.cvut.cz> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <874obp325b.fsf@steelpick.2x.cz> References: <874obp325b.fsf@steelpick.2x.cz> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2010 10:28:19 -0000 Add maildir synchronization tests for multiple messages with the same message-id. As this is not yet implemented in notmuch, some of these teste are marked as BROKEN. I use $(< ) operator to avoid fiddling with stripped trailing newlines from test results which happens when output+=$(command) is used. --- test/maildir-sync | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/test/maildir-sync b/test/maildir-sync index 8e216b3..67d04b9 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -188,4 +188,23 @@ ls $MAIL_DIR > actual && test_cmp expected actual ' +test_begin_subtest 'Duplicated message is tagged according to the duplicate' +cp "$MAIL_DIR/cur/msg-003" "$MAIL_DIR/cur/msg-003-dup:2,RS" +increment_mtime $MAIL_DIR/cur +NOTMUCH_NEW > output +notmuch search id:msg-003@notmuch-test-suite | notmuch_search_sanitize >> output +test_expect_equal "$(< output)" "No new mail. +thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test message 3 (inbox replied tmp)" + +test_begin_subtest 'The original message receives the same flags as the duplicate' +ls $MAIL_DIR/cur > actual +test_expect_equal_failure "$(< actual)" "msg-003:2,RS +msg-003-dup:2,RS" + +test_begin_subtest 'Tagging modifies flags of both the original and the duplicate' +notmuch tag -replied id:msg-003@notmuch-test-suite +ls $MAIL_DIR/cur > actual +test_expect_equal_failure "$(< actual)" "msg-003:2,S +msg-003-dup:2,S" + test_done -- 1.7.2.3