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 5A136431FBF for ; Wed, 19 Dec 2012 13:32:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled 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 odY-gTWb+pR4 for ; Wed, 19 Dec 2012 13:32:55 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 24972431FAE for ; Wed, 19 Dec 2012 13:32:55 -0800 (PST) Received: from localhost (unknown [192.168.200.7]) by max.feld.cvut.cz (Postfix) with ESMTP id 50E923CFE80; Wed, 19 Dec 2012 22:32:54 +0100 (CET) X-Virus-Scanned: IMAP STYX AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) with ESMTP id rGrElH-B0fUy; Wed, 19 Dec 2012 22:32:53 +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 3C6E73CFE85; Wed, 19 Dec 2012 22:32:52 +0100 (CET) Received: from steelpick.2x.cz (unknown [213.29.198.144]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 29067660969; Wed, 19 Dec 2012 22:32:52 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.80) (envelope-from ) id 1TlRFu-00077r-RR; Wed, 19 Dec 2012 22:32:46 +0100 From: Michal Sojka To: notmuch@notmuchmail.org Subject: [PATCH 2/3] test: Add some missing maildir synchronization tests Date: Wed, 19 Dec 2012 22:32:26 +0100 Message-Id: <1355952747-27350-3-git-send-email-sojkam1@fel.cvut.cz> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355952747-27350-1-git-send-email-sojkam1@fel.cvut.cz> References: <1355952747-27350-1-git-send-email-sojkam1@fel.cvut.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, 19 Dec 2012 21:32:56 -0000 As mentioned by Jani Nikula in id:87vcccp4y3.fsf@nikula.org, some cases of maildir synchronization are not covered by our tests. Let's add the missing tests. --- test/maildir-sync | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/maildir-sync b/test/maildir-sync index 6165782..b2ac89f 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -92,6 +92,18 @@ notmuch tag +donotmove subject:"Message to stay in new" output=$(cd "$MAIL_DIR"; ls */message-to-stay-in-new*) test_expect_equal "$output" "new/message-to-stay-in-new" +test_begin_subtest "Message in cur lacking maildir info gets one on any tag change" +add_message [filename]='message-to-get-maildir-info' [dir]=cur +notmuch tag +anytag id:$gen_msg_id +output=$(cd "$MAIL_DIR"; ls */message-to-get-maildir-info*) +test_expect_equal "$output" "cur/message-to-get-maildir-info:2," + +test_begin_subtest "Message in new with maildir info is moved to cur on any tag change" +add_message [filename]='message-with-info-to-be-moved-to-cur:2,' [dir]=new +notmuch tag +anytag id:$gen_msg_id +output=$(cd "$MAIL_DIR"; ls */message-with-info-to-be-moved-to-cur*) +test_expect_equal "$output" "cur/message-with-info-to-be-moved-to-cur:2," + test_begin_subtest "Removing 'S' flag from existing filename adds 'unread' tag" add_message [subject]='"Removing S flag"' [filename]='removing-s-flag:2,S' [dir]=cur output=$(notmuch search subject:"Removing S flag" | notmuch_search_sanitize) -- 1.7.10.4