[PATCH 1/3] test: Adding non-maildir tags does not move message from new to cur
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 19 Dec 2012 21:32:25 +0000 (22:32 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:52:32 +0000 (09:52 -0800)
56/e64b43728ccaefb7365b14bb0709b4203a4b4b [new file with mode: 0644]

diff --git a/56/e64b43728ccaefb7365b14bb0709b4203a4b4b b/56/e64b43728ccaefb7365b14bb0709b4203a4b4b
new file mode 100644 (file)
index 0000000..9dd99b8
--- /dev/null
@@ -0,0 +1,105 @@
+Return-Path: <sojkam1@fel.cvut.cz>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 0A624431FBF\r
+       for <notmuch@notmuchmail.org>; Wed, 19 Dec 2012 13:32:57 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id YTNicOV5l2hu for <notmuch@notmuchmail.org>;\r
+       Wed, 19 Dec 2012 13:32:56 -0800 (PST)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8148C431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 19 Dec 2012 13:32:55 -0800 (PST)\r
+Received: from localhost (unknown [192.168.200.7])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id DD5503CFE86;\r
+       Wed, 19 Dec 2012 22:32:54 +0100 (CET)\r
+X-Virus-Scanned: IMAP STYX AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+       by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new,\r
+       port 10044)\r
+       with ESMTP id 5AUc_gcCBAD7; Wed, 19 Dec 2012 22:32:53 +0100 (CET)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 9E43B3CFE88;\r
+       Wed, 19 Dec 2012 22:32:52 +0100 (CET)\r
+Received: from steelpick.2x.cz (unknown [213.29.198.144])\r
+       (Authenticated sender: sojkam1)\r
+       by imap.feld.cvut.cz (Postfix) with ESMTPSA id 272F4660968;\r
+       Wed, 19 Dec 2012 22:32:52 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.80)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1TlRFu-00077n-QU; Wed, 19 Dec 2012 22:32:46 +0100\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] test: Adding non-maildir tags does not move message from\r
+       new to cur\r
+Date: Wed, 19 Dec 2012 22:32:25 +0100\r
+Message-Id: <1355952747-27350-2-git-send-email-sojkam1@fel.cvut.cz>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1355952747-27350-1-git-send-email-sojkam1@fel.cvut.cz>\r
+References: <1355952747-27350-1-git-send-email-sojkam1@fel.cvut.cz>\r
+Cc: Michal Sojka <sojka@os.inf.tu-dresden.de>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 19 Dec 2012 21:32:57 -0000\r
+\r
+From: Michal Sojka <sojka@os.inf.tu-dresden.de>\r
+\r
+Some MUA's like mutt show the difference between "new" emails living in maildir\r
+directory new/, and "old" emails living in maildir directory cur/. However\r
+notmuch tag unconditionally moves selected messages from new/ to cur/, even if\r
+no maildir synchronized tag is changed.\r
+\r
+While maildir specification forbids messages with tags living in new/, there is\r
+no need to move messages to cur/ when no maildir synchronized tag is changed.\r
+Thus notmuch can remain transparent with respect to other MUA's.\r
+\r
+[ Edited commit log to better describe the intended changes, and tag the\r
+  test as broken until the actual changes are implemented -- Louis Rilling ]\r
+\r
+Signed-off-by: Louis Rilling <l.rilling@av7.net>\r
+\r
+[ Converted to use test_subtest_known_broken, David Bremner ]\r
+---\r
+ test/maildir-sync |    9 +++++++++\r
+ 1 file changed, 9 insertions(+)\r
+\r
+diff --git a/test/maildir-sync b/test/maildir-sync\r
+index 0fc742a..6165782 100755\r
+--- a/test/maildir-sync\r
++++ b/test/maildir-sync\r
+@@ -83,6 +83,15 @@ test_expect_equal "$output" "No new mail."\r
+ # creating new directories in the mail store, then it should be\r
+ # creating all necessary database state for those directories.\r
\r
++test_begin_subtest "Adding non-maildir tags does not move message from new to cur"\r
++test_subtest_known_broken\r
++add_message [subject]='"Message to stay in new"' \\r
++    [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' \\r
++    [filename]='message-to-stay-in-new' [dir]=new\r
++notmuch tag +donotmove subject:"Message to stay in new"\r
++output=$(cd "$MAIL_DIR"; ls */message-to-stay-in-new*)\r
++test_expect_equal "$output" "new/message-to-stay-in-new"\r
++\r
+ test_begin_subtest "Removing 'S' flag from existing filename adds 'unread' tag"\r
+ add_message [subject]='"Removing S flag"' [filename]='removing-s-flag:2,S' [dir]=cur\r
+ output=$(notmuch search subject:"Removing S flag" | notmuch_search_sanitize)\r
+-- \r
+1.7.10.4\r
+\r