1 Return-Path: <awg@lagos.xvx.ca>
\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 E2B4A431FDC
\r
6 for <notmuch@notmuchmail.org>; Sun, 18 Mar 2012 09:33:01 -0700 (PDT)
\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
\r
12 tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 DqMGO-5jynTy for <notmuch@notmuchmail.org>;
\r
16 Sun, 18 Mar 2012 09:33:00 -0700 (PDT)
\r
17 Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10])
\r
18 by olra.theworths.org (Postfix) with ESMTP id A6F51431FB6
\r
19 for <notmuch@notmuchmail.org>; Sun, 18 Mar 2012 09:33:00 -0700 (PDT)
\r
20 Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139])
\r
21 by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 18 Mar 2012 10:33:00 -0600
\r
22 X-Cloudmark-SP-Filtered: true
\r
23 X-Cloudmark-SP-Result: v=1.1 cv=2TvZ7eE48NdEYeaL5Xf58dNzJU178UzT+2lxUZ5Mhss=
\r
25 a=CDJwr1Cx8JkA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17
\r
26 a=bz-zy3QpAAAA:8 a=7343-z1_AAAA:8 a=k6VnKhIuyadO14Jm798A:9
\r
27 a=s2o6Fy0JUDKob3p5bcsA:7 a=NFWI-YhVVZsA:10 a=0c-eHkXYtrgA:10
\r
28 a=pIMJlJgVeHwA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
\r
29 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])
\r
30 by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 18 Mar 2012 10:32:59 -0600
\r
31 Received: by lagos.xvx.ca (Postfix, from userid 1000)
\r
32 id D35178004204; Sun, 18 Mar 2012 10:32:59 -0600 (MDT)
\r
33 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>
\r
34 To: notmuch@notmuchmail.org
\r
35 Subject: [PATCH v8 01/11] test: Add broken test for the new JSON reply format.
\r
36 Date: Sun, 18 Mar 2012 10:32:33 -0600
\r
37 Message-Id: <1332088363-22476-2-git-send-email-awg+notmuch@xvx.ca>
\r
38 X-Mailer: git-send-email 1.7.5.4
\r
39 In-Reply-To: <1332088363-22476-1-git-send-email-awg+notmuch@xvx.ca>
\r
40 References: <87fwd6kqtv.fsf@zancas.localnet>
\r
41 <1332088363-22476-1-git-send-email-awg+notmuch@xvx.ca>
\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: Sun, 18 Mar 2012 16:33:02 -0000
\r
57 test/multipart | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
\r
58 1 files changed, 53 insertions(+), 0 deletions(-)
\r
60 diff --git a/test/multipart b/test/multipart
\r
61 index afc4fc8..e5de5d3 100755
\r
62 --- a/test/multipart
\r
63 +++ b/test/multipart
\r
64 @@ -612,6 +612,59 @@ Non-text part: text/html
\r
66 test_expect_equal_file OUTPUT EXPECTED
\r
68 +test_begin_subtest "'notmuch reply' to a multipart message with json format"
\r
69 +test_subtest_known_broken
\r
70 +notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT
\r
71 +cat <<EOF >EXPECTED
\r
72 +{"reply-headers": {"Subject": "Re: Multipart message",
\r
73 + "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
\r
74 + "To": "Carl Worth <cworth@cworth.org>,
\r
75 + cworth@cworth.org",
\r
76 + "In-reply-to": "<87liy5ap00.fsf@yoom.home.cworth.org>",
\r
77 + "References": " <87liy5ap00.fsf@yoom.home.cworth.org>"},
\r
78 + "original": {"id": "XXXXX",
\r
80 + "excluded": false,
\r
81 + "filename": "YYYYY",
\r
82 + "timestamp": 978709437,
\r
83 + "date_relative": "2001-01-05",
\r
84 + "tags": ["attachment","inbox","signed","unread"],
\r
85 + "headers": {"Subject": "Multipart message",
\r
86 + "From": "Carl Worth <cworth@cworth.org>",
\r
87 + "To": "cworth@cworth.org",
\r
89 + 05 Jan 2001 15:43:57 +0000"},
\r
90 + "body": [{"id": 1,
\r
91 + "content-type": "multipart/signed",
\r
92 + "content": [{"id": 2,
\r
93 + "content-type": "multipart/mixed",
\r
94 + "content": [{"id": 3,
\r
95 + "content-type": "message/rfc822",
\r
96 + "content": [{"headers": {"Subject": "html message",
\r
97 + "From": "Carl Worth <cworth@cworth.org>",
\r
98 + "To": "cworth@cworth.org",
\r
100 + 05 Jan 2001 15:42:57 +0000"},
\r
101 + "body": [{"id": 4,
\r
102 + "content-type": "multipart/alternative",
\r
103 + "content": [{"id": 5,
\r
104 + "content-type": "text/html"},
\r
106 + "content-type": "text/plain",
\r
107 + "content": "This is an embedded message,
\r
108 + with a multipart/alternative part.\n"}]}]}]},
\r
110 + "content-type": "text/plain",
\r
111 + "filename": "YYYYY",
\r
112 + "content": "This is a text attachment.\n"},
\r
114 + "content-type": "text/plain",
\r
115 + "content": "And this message is signed.\n\n-Carl\n"}]},
\r
117 + "content-type": "application/pgp-signature"}]}]}}
\r
119 +test_expect_equal_file OUTPUT EXPECTED
\r
121 test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"
\r
122 notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out
\r
123 echo -n -e "\xEF\x0D\x0A" > crlf.expected
\r