[PATCH v4 1/4] test: Add broken test for the new JSON reply format.
[notmuch-archives.git] / 54 / 51f3c6c38e5cce3d458735fddef759636d7770
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 3AD60429E39\r
6         for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 16:22:24 -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: 0\r
10 X-Spam-Level: \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 EGP-K6kU0Ahh for <notmuch@notmuchmail.org>;\r
16         Wed,  8 Feb 2012 16:22:22 -0800 (PST)\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 5459F429E3C\r
19         for <notmuch@notmuchmail.org>; Wed,  8 Feb 2012 16:22:15 -0800 (PST)\r
20 Received: from pd4ml3so-ssvc.prod.shaw.ca ([10.0.141.150])\r
21         by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 08 Feb 2012 17:22:14 -0700\r
22 X-Cloudmark-SP-Filtered: true\r
23 X-Cloudmark-SP-Result: v=1.1 cv=b/gStvK98Bs6YfhBwCpxRApoLO2qoBYaarCtclPE+68=\r
24         c=1 sm=1\r
25         a=ZH2yvAItHrsA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
26         a=bz-zy3QpAAAA:8 a=7343-z1_AAAA:8 a=zdyeZAWpJ2uQdTp3UlkA:9\r
27         a=NFWI-YhVVZsA:10 a=GjjSzUO_F3QA:10 a=0c-eHkXYtrgA:10 a=pIMJlJgVeHwA:10\r
28         a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
29 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
30         by pd4ml3so-dmz.prod.shaw.ca with ESMTP; 08 Feb 2012 17:22:07 -0700\r
31 Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
32         id 586B980267BD; Wed,  8 Feb 2012 17:22:07 -0700 (MST)\r
33 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: [PATCH v4 1/4] test: Add broken test for the new JSON reply format.\r
36 Date: Wed,  8 Feb 2012 17:21:53 -0700\r
37 Message-Id: <1328746916-25447-2-git-send-email-awg+notmuch@xvx.ca>\r
38 X-Mailer: git-send-email 1.7.5.4\r
39 In-Reply-To: <1328746916-25447-1-git-send-email-awg+notmuch@xvx.ca>\r
40 References: <1326995217-27423-1-git-send-email-awg+notmuch@xvx.ca>\r
41         <1328746916-25447-1-git-send-email-awg+notmuch@xvx.ca>\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: Thu, 09 Feb 2012 00:22:24 -0000\r
55 \r
56 ---\r
57  test/multipart |    7 +++++++\r
58  1 files changed, 7 insertions(+), 0 deletions(-)\r
59 \r
60 diff --git a/test/multipart b/test/multipart\r
61 index 2dd73f5..7cff74a 100755\r
62 --- a/test/multipart\r
63 +++ b/test/multipart\r
64 @@ -589,6 +589,13 @@ Non-text part: text/html\r
65  EOF\r
66  test_expect_equal_file OUTPUT EXPECTED\r
67  \r
68 +test_begin_subtest "'notmuch reply' to a multipart message with json format"\r
69 +notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
70 +cat <<EOF >EXPECTED\r
71 +{ "reply": { "from": "Notmuch Test Suite <test_suite@notmuchmail.org>", "to": "Carl Worth <cworth@cworth.org>, cworth@cworth.org", "subject": "Re: Multipart message", "in-reply-to": "<87liy5ap00.fsf@yoom.home.cworth.org>", "references": " <87liy5ap00.fsf@yoom.home.cworth.org>" }, "original": { "from": "Carl Worth <cworth@cworth.org>", "to": "cworth@cworth.org", "cc": "", "subject": "Multipart message", "date": "Fri, 05 Jan 2001 15:43:57 +0000", "in-reply-to": "", "references": "", "message-id": "87liy5ap00.fsf@yoom.home.cworth.org" } }\r
72 +EOF\r
73 +test_expect_equal_file OUTPUT EXPECTED\r
74 +\r
75  test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"\r
76  notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out\r
77  echo -n -e "\xEF\x0D\x0A" > crlf.expected\r
78 -- \r
79 1.7.5.4\r
80 \r