Re: exim pipe transport, notmuch insert and mbox-style messages
[notmuch-archives.git] / 02 / 6d86eee55674e91ff696381eba68e4f6c1eb37
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 19256431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 26 May 2014 07:06:26 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\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 e6NDeOsjDYPB for <notmuch@notmuchmail.org>;\r
16         Mon, 26 May 2014 07:06:18 -0700 (PDT)\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 6705A431FC0\r
19         for <notmuch@notmuchmail.org>; Mon, 26 May 2014 07:06:13 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.7])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id E302519F362E\r
22         for <notmuch@notmuchmail.org>; Mon, 26 May 2014 16:06:05 +0200 (CEST)\r
23 X-Virus-Scanned: IMAP STYX AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new,\r
26         port 10044) with ESMTP id HXTsqpTafj8f for <notmuch@notmuchmail.org>;\r
27         Mon, 26 May 2014 16:06:02 +0200 (CEST)\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 F091B19F3634\r
30         for <notmuch@notmuchmail.org>; Mon, 26 May 2014 16:06:01 +0200 (CEST)\r
31 Received: from wsh by steelpick.2x.cz with local (Exim 4.82)\r
32         (envelope-from <sojkam1@fel.cvut.cz>)\r
33         id 1WovXM-0008S9-10; Mon, 26 May 2014 16:06:00 +0200\r
34 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH 1/2] Add test for incorrect threading of messages\r
37 Date: Mon, 26 May 2014 16:05:56 +0200\r
38 Message-Id: <1401113157-32454-2-git-send-email-sojkam1@fel.cvut.cz>\r
39 X-Mailer: git-send-email 2.0.0.rc2\r
40 In-Reply-To: <1401113157-32454-1-git-send-email-sojkam1@fel.cvut.cz>\r
41 References: <1401113157-32454-1-git-send-email-sojkam1@fel.cvut.cz>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\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: Mon, 26 May 2014 14:06:26 -0000\r
55 \r
56 This happens when there is some garbage after the last Message-ID in\r
57 the References header. See for example\r
58 https://lkml.org/lkml/headers/2014/5/19/864.\r
59 ---\r
60  test/T510-thread-replies.sh | 28 ++++++++++++++++++++++++++++\r
61  1 file changed, 28 insertions(+)\r
62 \r
63 diff --git a/test/T510-thread-replies.sh b/test/T510-thread-replies.sh\r
64 index eeb70d0..d818b89 100755\r
65 --- a/test/T510-thread-replies.sh\r
66 +++ b/test/T510-thread-replies.sh\r
67 @@ -137,5 +137,33 @@ expected='[[[{"id": "foo@four.com", "match": true, "excluded": false,\r
68  expected=`echo "$expected" | notmuch_json_show_sanitize`\r
69  test_expect_equal_json "$output" "$expected"\r
70  \r
71 +test_begin_subtest "Ignore garbage at the end of References"\r
72 +test_subtest_known_broken\r
73 +add_message '[id]="foo@five.com"' \\r
74 +    '[subject]="five"'\r
75 +add_message '[id]="bar@five.com"' \\r
76 +    '[references]="<foo@five.com> (garbage)"' \\r
77 +    '[subject]="not-five"'\r
78 +output=$(notmuch show --format=json 'subject:five' | notmuch_json_show_sanitize)\r
79 +expected='[[[{"id": "XXXXX", "match": true, "excluded": false,\r
80 + "filename": "YYYYY", "timestamp": 42, "date_relative": "2001-01-05",\r
81 + "tags": ["inbox", "unread"], "headers": {"Subject": "five",\r
82 + "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
83 + "To": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
84 + "Date": "GENERATED_DATE"}, "body": [{"id": 1,\r
85 + "content-type": "text/plain",\r
86 + "content": "This is just a test message (#10)\n"}]},\r
87 + [[{"id": "XXXXX", "match": true, "excluded": false,\r
88 + "filename": "YYYYY", "timestamp": 42, "date_relative": "2001-01-05",\r
89 + "tags": ["inbox", "unread"],\r
90 + "headers": {"Subject": "not-five",\r
91 + "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
92 + "To": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
93 + "Date": "GENERATED_DATE"},\r
94 + "body": [{"id": 1, "content-type": "text/plain",\r
95 + "content": "This is just a test message (#11)\n"}]}, []]]]]]'\r
96 +expected=`echo "$expected" | notmuch_json_show_sanitize`\r
97 +test_expect_equal_json "$output" "$expected"\r
98 +\r
99  \r
100  test_done\r
101 -- \r
102 2.0.0.rc2\r
103 \r