1 Return-Path: <bremner@tethera.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 48DDB431FAF
\r
6 for <notmuch@notmuchmail.org>; Sat, 8 Dec 2012 11:17:05 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id S4HnjhSufBMk for <notmuch@notmuchmail.org>;
\r
16 Sat, 8 Dec 2012 11:17:04 -0800 (PST)
\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])
\r
18 (using TLSv1 with cipher AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 2958C431FAE
\r
21 for <notmuch@notmuchmail.org>; Sat, 8 Dec 2012 11:17:04 -0800 (PST)
\r
22 Received: from fctnnbsc30w-142167090129.dhcp-dynamic.fibreop.nb.bellaliant.net
\r
23 ([142.167.90.129] helo=zancas.localnet)
\r
24 by tesseract.cs.unb.ca with esmtpsa
\r
25 (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)
\r
26 (envelope-from <bremner@tethera.net>)
\r
27 id 1ThPtW-0005uO-Hx; Sat, 08 Dec 2012 15:17:03 -0400
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)
\r
29 (envelope-from <bremner@tethera.net>)
\r
30 id 1ThPtO-0000NI-Ux; Sat, 08 Dec 2012 15:16:54 -0400
\r
31 From: david@tethera.net
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH] test: Adding non-maildir tags does not move message from new
\r
35 Date: Sat, 8 Dec 2012 15:15:32 -0400
\r
36 Message-Id: <1354994132-866-1-git-send-email-david@tethera.net>
\r
37 X-Mailer: git-send-email 1.7.10.4
\r
38 In-Reply-To: <1316039001-32602-5-git-send-email-l.rilling@av7.net>
\r
39 References: <1316039001-32602-5-git-send-email-l.rilling@av7.net>
\r
41 Cc: Michal Sojka <sojka@os.inf.tu-dresden.de>
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Sat, 08 Dec 2012 19:17:05 -0000
\r
56 From: Michal Sojka <sojka@os.inf.tu-dresden.de>
\r
58 Some MUA's like mutt show the difference between "new" emails living in maildir
\r
59 directory new/, and "old" emails living in maildir directory cur/. However
\r
60 notmuch tag unconditionally moves selected messages from new/ to cur/, even if
\r
61 no maildir synchronized tag is changed.
\r
63 While maildir specification forbids messages with tags living in new/, there is
\r
64 no need to move messages to cur/ when no maildir synchronized tag is changed.
\r
65 Thus notmuch can remain transparent with respect to other MUA's.
\r
67 [ Edited commit log to better describe the intended changes, and tag the
\r
68 test as broken until the actual changes are implemented -- Louis Rilling ]
\r
70 Signed-off-by: Louis Rilling <l.rilling@av7.net>
\r
72 [ Converted to use test_subtest_known_broken, David Bremner ]
\r
75 Do we agree that the behaviour of moving messages to ./cur on tagging
\r
76 is broken? If so, maybe it's worth tidying up and applying this. The
\r
77 use of cd and ls strikes me as slightly suspect, but I welcome other
\r
80 test/maildir-sync | 9 +++++++++
\r
81 1 file changed, 9 insertions(+)
\r
83 diff --git a/test/maildir-sync b/test/maildir-sync
\r
84 index 0fc742a..6165782 100755
\r
85 --- a/test/maildir-sync
\r
86 +++ b/test/maildir-sync
\r
87 @@ -83,6 +83,15 @@ test_expect_equal "$output" "No new mail."
\r
88 # creating new directories in the mail store, then it should be
\r
89 # creating all necessary database state for those directories.
\r
91 +test_begin_subtest "Adding non-maildir tags does not move message from new to cur"
\r
92 +test_subtest_known_broken
\r
93 +add_message [subject]='"Message to stay in new"' \
\r
94 + [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' \
\r
95 + [filename]='message-to-stay-in-new' [dir]=new
\r
96 +notmuch tag +donotmove subject:"Message to stay in new"
\r
97 +output=$(cd "$MAIL_DIR"; ls */message-to-stay-in-new*)
\r
98 +test_expect_equal "$output" "new/message-to-stay-in-new"
\r
100 test_begin_subtest "Removing 'S' flag from existing filename adds 'unread' tag"
\r
101 add_message [subject]='"Removing S flag"' [filename]='removing-s-flag:2,S' [dir]=cur
\r
102 output=$(notmuch search subject:"Removing S flag" | notmuch_search_sanitize)
\r