Re: notmuch-mutt: support for duplicate message removal
[notmuch-archives.git] / b8 / 86aaf23c40e6880d2583ffc678c3d92bd381dd
1 Return-Path: <sojkam1@fel.cvut.cz>\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 6DDDA40DBF0\r
6         for <notmuch@notmuchmail.org>; Wed, 10 Nov 2010 02:28:19 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\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 XQcNE8GuFVrz for <notmuch@notmuchmail.org>;\r
16         Wed, 10 Nov 2010 02:28:07 -0800 (PST)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id 377F540DBF5\r
19         for <notmuch@notmuchmail.org>; Wed, 10 Nov 2010 02:28:07 -0800 (PST)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 8B58219F331D;\r
22         Wed, 10 Nov 2010 11:28:06 +0100 (CET)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id jLbhJaW-DN6D; Wed, 10 Nov 2010 11:28:05 +0100 (CET)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id 3B7C119F331A;\r
30         Wed, 10 Nov 2010 11:28:05 +0100 (CET)\r
31 Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id 443AFFA004;\r
34         Wed, 10 Nov 2010 11:28:05 +0100 (CET)\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.72)\r
36         (envelope-from <sojkam1@fel.cvut.cz>)\r
37         id 1PG7uP-0003xf-0i; Wed, 10 Nov 2010 11:28:05 +0100\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH] test: More maildir synchronization tests\r
41 Date: Wed, 10 Nov 2010 11:27:50 +0100\r
42 Message-Id: <1289384870-15199-1-git-send-email-sojkam1@fel.cvut.cz>\r
43 X-Mailer: git-send-email 1.7.2.3\r
44 In-Reply-To: <874obp325b.fsf@steelpick.2x.cz>\r
45 References: <874obp325b.fsf@steelpick.2x.cz>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Wed, 10 Nov 2010 10:28:19 -0000\r
59 \r
60 Add maildir synchronization tests for multiple messages with the same\r
61 message-id. As this is not yet implemented in notmuch, some of these\r
62 teste are marked as BROKEN.\r
63 \r
64 I use $(< ) operator to avoid fiddling with stripped trailing newlines\r
65 from test results which happens when output+=$(command) is used.\r
66 ---\r
67  test/maildir-sync |   19 +++++++++++++++++++\r
68  1 files changed, 19 insertions(+), 0 deletions(-)\r
69 \r
70 diff --git a/test/maildir-sync b/test/maildir-sync\r
71 index 8e216b3..67d04b9 100755\r
72 --- a/test/maildir-sync\r
73 +++ b/test/maildir-sync\r
74 @@ -188,4 +188,23 @@ ls $MAIL_DIR > actual &&\r
75  test_cmp expected actual\r
76  '\r
77  \r
78 +test_begin_subtest 'Duplicated message is tagged according to the duplicate'\r
79 +cp "$MAIL_DIR/cur/msg-003" "$MAIL_DIR/cur/msg-003-dup:2,RS" \r
80 +increment_mtime $MAIL_DIR/cur \r
81 +NOTMUCH_NEW > output\r
82 +notmuch search id:msg-003@notmuch-test-suite | notmuch_search_sanitize >> output\r
83 +test_expect_equal "$(< output)" "No new mail.\r
84 +thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; test message 3 (inbox replied tmp)"\r
85 +\r
86 +test_begin_subtest 'The original message receives the same flags as the duplicate'\r
87 +ls $MAIL_DIR/cur > actual\r
88 +test_expect_equal_failure "$(< actual)" "msg-003:2,RS\r
89 +msg-003-dup:2,RS"\r
90 +\r
91 +test_begin_subtest 'Tagging modifies flags of both the original and the duplicate'\r
92 +notmuch tag -replied id:msg-003@notmuch-test-suite\r
93 +ls $MAIL_DIR/cur > actual\r
94 +test_expect_equal_failure "$(< actual)"  "msg-003:2,S\r
95 +msg-003-dup:2,S"\r
96 +\r
97  test_done\r
98 -- \r
99 1.7.2.3\r
100 \r