1 Return-Path: <markwalters1009@gmail.com>
\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 EE8064044F5
\r
6 for <notmuch@notmuchmail.org>; Fri, 6 Jan 2012 05:34:31 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id Rl3dR9yAy40B for <notmuch@notmuchmail.org>;
\r
18 Fri, 6 Jan 2012 05:34:31 -0800 (PST)
\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
20 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
21 (No client certificate requested)
\r
22 by olra.theworths.org (Postfix) with ESMTPS id CB5614044C1
\r
23 for <notmuch@notmuchmail.org>; Fri, 6 Jan 2012 05:34:30 -0800 (PST)
\r
24 Received: by mail-we0-f181.google.com with SMTP id m12so1311441wer.26
\r
25 for <notmuch@notmuchmail.org>; Fri, 06 Jan 2012 05:34:30 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=jqbSuEvjySA7cF4c5lA8iSYAfiaMDYCljiXMWH7oMxI=;
\r
29 b=CEvGEpWjRi2vMVgnzsaFzL6Vdax7RapFp60yBjCsBnMBwuGx2/3WmDZfzp6hYi6ACi
\r
30 QGVokEDkQtpfhzt5BIrWHb9mS11BuXgFMeRrbJI3xiLKs5zLtZkbqyBl9xjd075ybVoG
\r
31 MRkmqAsnPj/Y3T5D1h2BlVnC6oXRflA5pfZKc=
\r
32 Received: by 10.216.135.75 with SMTP id t53mr2973856wei.2.1325856870474;
\r
33 Fri, 06 Jan 2012 05:34:30 -0800 (PST)
\r
34 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.
\r
35 [94.192.233.223]) by mx.google.com with ESMTPS id
\r
36 q5sm19561842wbo.8.2012.01.06.05.34.28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Fri, 06 Jan 2012 05:34:29 -0800 (PST)
\r
38 From: Mark Walters <markwalters1009@gmail.com>
\r
39 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org, david@tethera.net
\r
40 Subject: [PATCH 4/4] add tests for reply-to-sender
\r
41 Date: Fri, 6 Jan 2012 13:34:17 +0000
\r
42 Message-Id: <1325856857-15969-4-git-send-email-markwalters1009@gmail.com>
\r
43 X-Mailer: git-send-email 1.7.2.3
\r
44 In-Reply-To: <8739btdkir.fsf@qmul.ac.uk>
\r
45 References: <8739btdkir.fsf@qmul.ac.uk>
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\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: Fri, 06 Jan 2012 13:34:32 -0000
\r
61 test/notmuch-test | 1 +
\r
62 test/reply-to-sender | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++
\r
63 2 files changed, 210 insertions(+), 0 deletions(-)
\r
64 create mode 100755 test/reply-to-sender
\r
66 diff --git a/test/notmuch-test b/test/notmuch-test
\r
67 index e40ef86..6a99ae3 100755
\r
68 --- a/test/notmuch-test
\r
69 +++ b/test/notmuch-test
\r
70 @@ -33,6 +33,7 @@ TESTS="
\r
78 diff --git a/test/reply-to-sender b/test/reply-to-sender
\r
79 new file mode 100755
\r
80 index 0000000..c7d15bb
\r
82 +++ b/test/reply-to-sender
\r
84 +#!/usr/bin/env bash
\r
85 +test_description="\"notmuch reply --reply-to=sender\" in several variations"
\r
88 +test_begin_subtest "Basic reply-to-sender"
\r
89 +add_message '[from]="Sender <sender@example.com>"' \
\r
90 + [to]=test_suite@notmuchmail.org \
\r
91 + [subject]=notmuch-reply-test \
\r
92 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
93 + '[body]="basic reply-to-sender test"'
\r
95 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
96 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
97 +Subject: Re: notmuch-reply-test
\r
98 +To: Sender <sender@example.com>
\r
99 +In-Reply-To: <${gen_msg_id}>
\r
100 +References: <${gen_msg_id}>
\r
102 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
103 +> basic reply-to-sender test"
\r
105 +test_begin_subtest "From Us, Basic reply to message"
\r
106 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
107 + '[to]="Recipient <recipient@example.com>"' \
\r
108 + [subject]=notmuch-reply-test \
\r
109 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
110 + '[body]="basic reply-to-from-us test"'
\r
112 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
113 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
114 +Subject: Re: notmuch-reply-test
\r
115 +To: Recipient <recipient@example.com>
\r
116 +In-Reply-To: <${gen_msg_id}>
\r
117 +References: <${gen_msg_id}>
\r
119 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
120 +> basic reply-to-from-us test"
\r
122 +test_begin_subtest "Multiple recipients"
\r
123 +add_message '[from]="Sender <sender@example.com>"' \
\r
124 + '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
\r
125 + [subject]=notmuch-reply-test \
\r
126 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
127 + '[body]="Multiple recipients"'
\r
129 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
130 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
131 +Subject: Re: notmuch-reply-test
\r
132 +To: Sender <sender@example.com>
\r
133 +In-Reply-To: <${gen_msg_id}>
\r
134 +References: <${gen_msg_id}>
\r
136 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
137 +> Multiple recipients"
\r
139 +test_begin_subtest "From Us, Multiple TO recipients"
\r
140 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
141 + '[to]="Recipient <recipient@example.com>, Someone Else <someone@example.com>"' \
\r
142 + [subject]=notmuch-reply-test \
\r
143 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
144 + '[body]="From Us, Multiple TO recipients"'
\r
146 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
147 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
148 +Subject: Re: notmuch-reply-test
\r
149 +To: Recipient <recipient@example.com>, Someone Else <someone@example.com>
\r
150 +In-Reply-To: <${gen_msg_id}>
\r
151 +References: <${gen_msg_id}>
\r
153 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
154 +> From Us, Multiple TO recipients"
\r
156 +test_begin_subtest "Reply with CC"
\r
157 +add_message '[from]="Sender <sender@example.com>"' \
\r
158 + [to]=test_suite@notmuchmail.org \
\r
159 + '[cc]="Other Parties <cc@example.com>"' \
\r
160 + [subject]=notmuch-reply-test \
\r
161 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
162 + '[body]="reply with CC"'
\r
164 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
165 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
166 +Subject: Re: notmuch-reply-test
\r
167 +To: Sender <sender@example.com>
\r
168 +In-Reply-To: <${gen_msg_id}>
\r
169 +References: <${gen_msg_id}>
\r
171 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
174 +test_begin_subtest "From Us, Reply with CC"
\r
175 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
176 + '[to]="Recipient <recipient@example.com>"' \
\r
177 + '[cc]="Other Parties <cc@example.com>"' \
\r
178 + [subject]=notmuch-reply-test \
\r
179 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
180 + '[body]="reply with CC"'
\r
182 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
183 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
184 +Subject: Re: notmuch-reply-test
\r
185 +To: Recipient <recipient@example.com>
\r
186 +In-Reply-To: <${gen_msg_id}>
\r
187 +References: <${gen_msg_id}>
\r
189 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
192 +test_begin_subtest "From Us, Reply no TO but with CC"
\r
193 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
194 + '[cc]="Other Parties <cc@example.com>"' \
\r
195 + [subject]=notmuch-reply-test \
\r
196 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
197 + '[body]="reply with CC"'
\r
199 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
200 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
201 +Subject: Re: notmuch-reply-test
\r
202 +Cc: Other Parties <cc@example.com>
\r
203 +In-Reply-To: <${gen_msg_id}>
\r
204 +References: <${gen_msg_id}>
\r
206 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
209 +test_begin_subtest "Reply from alternate address"
\r
210 +add_message '[from]="Sender <sender@example.com>"' \
\r
211 + [to]=test_suite_other@notmuchmail.org \
\r
212 + [subject]=notmuch-reply-test \
\r
213 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
214 + '[body]="reply from alternate address"'
\r
216 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
217 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
\r
218 +Subject: Re: notmuch-reply-test
\r
219 +To: Sender <sender@example.com>
\r
220 +In-Reply-To: <${gen_msg_id}>
\r
221 +References: <${gen_msg_id}>
\r
223 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
224 +> reply from alternate address"
\r
226 +test_begin_subtest "Support for Reply-To"
\r
227 +add_message '[from]="Sender <sender@example.com>"' \
\r
228 + [to]=test_suite@notmuchmail.org \
\r
229 + [subject]=notmuch-reply-test \
\r
230 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
231 + '[body]="support for reply-to"' \
\r
232 + '[reply-to]="Sender <elsewhere@example.com>"'
\r
234 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
235 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
236 +Subject: Re: notmuch-reply-test
\r
237 +To: Sender <elsewhere@example.com>
\r
238 +In-Reply-To: <${gen_msg_id}>
\r
239 +References: <${gen_msg_id}>
\r
241 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
242 +> support for reply-to"
\r
244 +test_begin_subtest "Support for Reply-To with multiple recipients"
\r
245 +add_message '[from]="Sender <sender@example.com>"' \
\r
246 + '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
\r
247 + [subject]=notmuch-reply-test \
\r
248 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
249 + '[body]="support for reply-to with multiple recipients"' \
\r
250 + '[reply-to]="Sender <elsewhere@example.com>"'
\r
252 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
253 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
254 +Subject: Re: notmuch-reply-test
\r
255 +To: Sender <elsewhere@example.com>
\r
256 +In-Reply-To: <${gen_msg_id}>
\r
257 +References: <${gen_msg_id}>
\r
259 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
260 +> support for reply-to with multiple recipients"
\r
262 +test_begin_subtest "Un-munging Reply-To"
\r
263 +add_message '[from]="Sender <sender@example.com>"' \
\r
264 + '[to]="Some List <list@example.com>"' \
\r
265 + [subject]=notmuch-reply-test \
\r
266 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
267 + '[body]="Un-munging Reply-To"' \
\r
268 + '[reply-to]="Evil Munging List <list@example.com>"'
\r
270 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
271 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
272 +Subject: Re: notmuch-reply-test
\r
273 +To: Sender <sender@example.com>
\r
274 +In-Reply-To: <${gen_msg_id}>
\r
275 +References: <${gen_msg_id}>
\r
277 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
278 +> Un-munging Reply-To"
\r
280 +test_begin_subtest "Message with header of exactly 200 bytes"
\r
281 +add_message '[subject]="This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces"' \
\r
282 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
283 + '[body]="200-byte header"'
\r
284 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
285 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
286 +Subject: Re: This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces
\r
287 +In-Reply-To: <${gen_msg_id}>
\r
288 +References: <${gen_msg_id}>
\r
290 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
291 +> 200-byte header"
\r