From: Michal Sojka Date: Wed, 19 Dec 2012 21:32:25 +0000 (+0100) Subject: [PATCH 1/3] test: Adding non-maildir tags does not move message from new to cur X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;ds=sidebyside;h=d0d3c3db245cc288f3e4f211646b13ac881f8734;p=notmuch-archives.git [PATCH 1/3] test: Adding non-maildir tags does not move message from new to cur --- diff --git a/56/e64b43728ccaefb7365b14bb0709b4203a4b4b b/56/e64b43728ccaefb7365b14bb0709b4203a4b4b new file mode 100644 index 000000000..9dd99b882 --- /dev/null +++ b/56/e64b43728ccaefb7365b14bb0709b4203a4b4b @@ -0,0 +1,105 @@ +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 0A624431FBF + for ; Wed, 19 Dec 2012 13:32:57 -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 YTNicOV5l2hu for ; + Wed, 19 Dec 2012 13:32:56 -0800 (PST) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id 8148C431FB6 + 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 DD5503CFE86; + 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 5AUc_gcCBAD7; 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 9E43B3CFE88; + 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 272F4660968; + 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-00077n-QU; Wed, 19 Dec 2012 22:32:46 +0100 +From: Michal Sojka +To: notmuch@notmuchmail.org +Subject: [PATCH 1/3] test: Adding non-maildir tags does not move message from + new to cur +Date: Wed, 19 Dec 2012 22:32:25 +0100 +Message-Id: <1355952747-27350-2-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> +Cc: Michal Sojka +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:57 -0000 + +From: Michal Sojka + +Some MUA's like mutt show the difference between "new" emails living in maildir +directory new/, and "old" emails living in maildir directory cur/. However +notmuch tag unconditionally moves selected messages from new/ to cur/, even if +no maildir synchronized tag is changed. + +While maildir specification forbids messages with tags living in new/, there is +no need to move messages to cur/ when no maildir synchronized tag is changed. +Thus notmuch can remain transparent with respect to other MUA's. + +[ Edited commit log to better describe the intended changes, and tag the + test as broken until the actual changes are implemented -- Louis Rilling ] + +Signed-off-by: Louis Rilling + +[ Converted to use test_subtest_known_broken, David Bremner ] +--- + test/maildir-sync | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/test/maildir-sync b/test/maildir-sync +index 0fc742a..6165782 100755 +--- a/test/maildir-sync ++++ b/test/maildir-sync +@@ -83,6 +83,15 @@ test_expect_equal "$output" "No new mail." + # creating new directories in the mail store, then it should be + # creating all necessary database state for those directories. + ++test_begin_subtest "Adding non-maildir tags does not move message from new to cur" ++test_subtest_known_broken ++add_message [subject]='"Message to stay in new"' \ ++ [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' \ ++ [filename]='message-to-stay-in-new' [dir]=new ++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 "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 +