[PATCH v2 04/14] cli/reply: unify reply format functions
[notmuch-archives.git] / e1 / e59a2822a8435e0b0a4e07afc0b53415fd781d
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 1062C429E33\r
6         for <notmuch@notmuchmail.org>; Wed, 30 Nov 2011 08:50:21 -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 hQEswy20HVbD for <notmuch@notmuchmail.org>;\r
16         Wed, 30 Nov 2011 08:50:20 -0800 (PST)\r
17 X-Greylist: delayed 573 seconds by postgrey-1.32 at olra;\r
18         Wed, 30 Nov 2011 08:50:16 PST\r
19 Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9])\r
20         by olra.theworths.org (Postfix) with ESMTP id 93C3B429E29\r
21         for <notmuch@notmuchmail.org>; Wed, 30 Nov 2011 08:50:16 -0800 (PST)\r
22 Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd5ml2no-ssvc.prod.shaw.ca)\r
23         ([10.0.144.222])\r
24         by pd7mo1no-svcs.prod.shaw.ca with ESMTP; 30 Nov 2011 09:40:42 -0700\r
25 X-Cloudmark-SP-Filtered: true\r
26 X-Cloudmark-SP-Result: v=1.1 cv=1i/nnIW0nMC5uWcUJ59KMVUkrnWI9M+zreV2y9Ww/qI=\r
27         c=1 sm=1\r
28         a=rbG03NJbsYoA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
29         a=bz-zy3QpAAAA:8 a=7343-z1_AAAA:8 a=BhPc4uvcyHYrlrQRSrcA:9\r
30         a=NFWI-YhVVZsA:10 a=0c-eHkXYtrgA:10 a=pIMJlJgVeHwA:10\r
31         a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
32 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
33         by pd5ml2no-dmz.prod.shaw.ca with ESMTP; 30 Nov 2011 09:40:42 -0700\r
34 Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
35         id B7E4E8000661; Wed, 30 Nov 2011 09:40:41 -0700 (MST)\r
36 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
37 To: notmuch@notmuchmail.org,\r
38         awg@xvx.ca\r
39 Subject: [RFC PATCH 1/3] test: replies that quote HTML parts (expected to\r
40  fail)\r
41 Date: Wed, 30 Nov 2011 09:40:39 -0700\r
42 Message-Id: <1322671241-23438-2-git-send-email-awg+notmuch@xvx.ca>\r
43 X-Mailer: git-send-email 1.7.5.4\r
44 In-Reply-To: <1322671241-23438-1-git-send-email-awg+notmuch@xvx.ca>\r
45 References: <1322671241-23438-1-git-send-email-awg+notmuch@xvx.ca>\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, 30 Nov 2011 16:50:21 -0000\r
59 \r
60 Test `notmuch reply` with the new --format=html flag, indicating that HTML parts\r
61 should be quoted in the reply.\r
62 ---\r
63  test/multipart |   24 ++++++++++++++++++++++++\r
64  1 files changed, 24 insertions(+), 0 deletions(-)\r
65 \r
66 diff --git a/test/multipart b/test/multipart\r
67 index f83526b..d5ca7fd 100755\r
68 --- a/test/multipart\r
69 +++ b/test/multipart\r
70 @@ -589,6 +589,30 @@ Non-text part: text/html\r
71  EOF\r
72  test_expect_equal_file OUTPUT EXPECTED\r
73  \r
74 +test_begin_subtest "'notmuch reply' to a multipart message with --format=html"\r
75 +notmuch reply --format=html 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
76 +cat <<EOF >EXPECTED\r
77 +From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
78 +Subject: Re: Multipart message\r
79 +To: Carl Worth <cworth@cworth.org>, cworth@cworth.org\r
80 +In-Reply-To: <87liy5ap00.fsf@yoom.home.cworth.org>\r
81 +References: <87liy5ap00.fsf@yoom.home.cworth.org>\r
82 +\r
83 +On Fri, 05 Jan 2001 15:43:57 +0000, Carl Worth <cworth@cworth.org> wrote:\r
84 +> From: Carl Worth <cworth@cworth.org>\r
85 +> To: cworth@cworth.org\r
86 +> Subject: html message\r
87 +> Date: Fri, 05 Jan 2001 15:42:57 +0000\r
88 +>\r
89 +> <p>This is an embedded message, with a multipart/alternative part.</p>\r
90 +> This is an embedded message, with a multipart/alternative part.\r
91 +> This is a text attachment.\r
92 +> And this message is signed.\r
93 +> \r
94 +> -Carl\r
95 +EOF\r
96 +test_expect_equal_file OUTPUT EXPECTED\r
97 +\r
98  test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"\r
99  notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out\r
100  echo -n -e "\xEF\x0D\x0A" > crlf.expected\r
101 -- \r
102 1.7.5.4\r
103 \r