1 Return-Path: <jani@nikula.org>
\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 6886D4150E3
\r
6 for <notmuch@notmuchmail.org>; Sun, 8 Jan 2012 13:49:15 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id JtnDVStBK4pp for <notmuch@notmuchmail.org>;
\r
17 Sun, 8 Jan 2012 13:49:12 -0800 (PST)
\r
18 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com
\r
19 [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 0D10C4150E1
\r
22 for <notmuch@notmuchmail.org>; Sun, 8 Jan 2012 13:49:05 -0800 (PST)
\r
23 Received: by mail-ey0-f181.google.com with SMTP id i1so2292905eaa.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 08 Jan 2012 13:49:05 -0800 (PST)
\r
25 Received: by 10.213.10.135 with SMTP id p7mr2665393ebp.117.1326059345606;
\r
26 Sun, 08 Jan 2012 13:49:05 -0800 (PST)
\r
27 Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.
\r
29 by mx.google.com with ESMTPS id s16sm282293175eef.2.2012.01.08.13.49.03
\r
30 (version=SSLv3 cipher=OTHER); Sun, 08 Jan 2012 13:49:04 -0800 (PST)
\r
31 From: Jani Nikula <jani@nikula.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH v2 6/6] test: add tests for "notmuch reply" --reply-to=sender
\r
34 Date: Sun, 8 Jan 2012 23:48:35 +0200
\r
36 <19bc123ce1e75ac1d5ba6bfa6e2daf8e99b8e471.1326058946.git.jani@nikula.org>
\r
37 X-Mailer: git-send-email 1.7.5.4
\r
38 In-Reply-To: <cover.1326058946.git.jani@nikula.org>
\r
39 References: <cover.1326058946.git.jani@nikula.org>
\r
40 In-Reply-To: <cover.1326058946.git.jani@nikula.org>
\r
41 References: <cover.1325794371.git.jani@nikula.org>
\r
42 <cover.1326058946.git.jani@nikula.org>
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Sun, 08 Jan 2012 21:49:15 -0000
\r
57 From: Mark Walters <markwalters1009@gmail.com>
\r
61 This is Mark's work; just a one line change by Jani to take into account a
\r
62 minor change in replying to one's own message.
\r
64 test/notmuch-test | 1 +
\r
65 test/reply-to-sender | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++
\r
66 2 files changed, 210 insertions(+), 0 deletions(-)
\r
67 create mode 100755 test/reply-to-sender
\r
69 diff --git a/test/notmuch-test b/test/notmuch-test
\r
70 index e40ef86..6a99ae3 100755
\r
71 --- a/test/notmuch-test
\r
72 +++ b/test/notmuch-test
\r
73 @@ -33,6 +33,7 @@ TESTS="
\r
81 diff --git a/test/reply-to-sender b/test/reply-to-sender
\r
82 new file mode 100755
\r
83 index 0000000..caceeb2
\r
85 +++ b/test/reply-to-sender
\r
87 +#!/usr/bin/env bash
\r
88 +test_description="\"notmuch reply --reply-to=sender\" in several variations"
\r
91 +test_begin_subtest "Basic reply-to-sender"
\r
92 +add_message '[from]="Sender <sender@example.com>"' \
\r
93 + [to]=test_suite@notmuchmail.org \
\r
94 + [subject]=notmuch-reply-test \
\r
95 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
96 + '[body]="basic reply-to-sender test"'
\r
98 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
99 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
100 +Subject: Re: notmuch-reply-test
\r
101 +To: Sender <sender@example.com>
\r
102 +In-Reply-To: <${gen_msg_id}>
\r
103 +References: <${gen_msg_id}>
\r
105 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
106 +> basic reply-to-sender test"
\r
108 +test_begin_subtest "From Us, Basic reply to message"
\r
109 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
110 + '[to]="Recipient <recipient@example.com>"' \
\r
111 + [subject]=notmuch-reply-test \
\r
112 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
113 + '[body]="basic reply-to-from-us test"'
\r
115 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
116 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
117 +Subject: Re: notmuch-reply-test
\r
118 +To: Recipient <recipient@example.com>
\r
119 +In-Reply-To: <${gen_msg_id}>
\r
120 +References: <${gen_msg_id}>
\r
122 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
123 +> basic reply-to-from-us test"
\r
125 +test_begin_subtest "Multiple recipients"
\r
126 +add_message '[from]="Sender <sender@example.com>"' \
\r
127 + '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
\r
128 + [subject]=notmuch-reply-test \
\r
129 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
130 + '[body]="Multiple recipients"'
\r
132 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
133 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
134 +Subject: Re: notmuch-reply-test
\r
135 +To: Sender <sender@example.com>
\r
136 +In-Reply-To: <${gen_msg_id}>
\r
137 +References: <${gen_msg_id}>
\r
139 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
140 +> Multiple recipients"
\r
142 +test_begin_subtest "From Us, Multiple TO recipients"
\r
143 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
144 + '[to]="Recipient <recipient@example.com>, Someone Else <someone@example.com>"' \
\r
145 + [subject]=notmuch-reply-test \
\r
146 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
147 + '[body]="From Us, Multiple TO recipients"'
\r
149 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
150 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
151 +Subject: Re: notmuch-reply-test
\r
152 +To: Recipient <recipient@example.com>, Someone Else <someone@example.com>
\r
153 +In-Reply-To: <${gen_msg_id}>
\r
154 +References: <${gen_msg_id}>
\r
156 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
157 +> From Us, Multiple TO recipients"
\r
159 +test_begin_subtest "Reply with CC"
\r
160 +add_message '[from]="Sender <sender@example.com>"' \
\r
161 + [to]=test_suite@notmuchmail.org \
\r
162 + '[cc]="Other Parties <cc@example.com>"' \
\r
163 + [subject]=notmuch-reply-test \
\r
164 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
165 + '[body]="reply with CC"'
\r
167 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
168 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
169 +Subject: Re: notmuch-reply-test
\r
170 +To: Sender <sender@example.com>
\r
171 +In-Reply-To: <${gen_msg_id}>
\r
172 +References: <${gen_msg_id}>
\r
174 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
177 +test_begin_subtest "From Us, Reply with CC"
\r
178 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
179 + '[to]="Recipient <recipient@example.com>"' \
\r
180 + '[cc]="Other Parties <cc@example.com>"' \
\r
181 + [subject]=notmuch-reply-test \
\r
182 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
183 + '[body]="reply with CC"'
\r
185 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
186 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
187 +Subject: Re: notmuch-reply-test
\r
188 +To: Recipient <recipient@example.com>
\r
189 +In-Reply-To: <${gen_msg_id}>
\r
190 +References: <${gen_msg_id}>
\r
192 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
195 +test_begin_subtest "From Us, Reply no TO but with CC"
\r
196 +add_message '[from]="Notmuch Test Suite <test_suite@notmuchmail.org>"' \
\r
197 + '[cc]="Other Parties <cc@example.com>"' \
\r
198 + [subject]=notmuch-reply-test \
\r
199 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
200 + '[body]="reply with CC"'
\r
202 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
203 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
204 +Subject: Re: notmuch-reply-test
\r
205 +To: Other Parties <cc@example.com>
\r
206 +In-Reply-To: <${gen_msg_id}>
\r
207 +References: <${gen_msg_id}>
\r
209 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
212 +test_begin_subtest "Reply from alternate address"
\r
213 +add_message '[from]="Sender <sender@example.com>"' \
\r
214 + [to]=test_suite_other@notmuchmail.org \
\r
215 + [subject]=notmuch-reply-test \
\r
216 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
217 + '[body]="reply from alternate address"'
\r
219 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
220 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
\r
221 +Subject: Re: notmuch-reply-test
\r
222 +To: Sender <sender@example.com>
\r
223 +In-Reply-To: <${gen_msg_id}>
\r
224 +References: <${gen_msg_id}>
\r
226 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
227 +> reply from alternate address"
\r
229 +test_begin_subtest "Support for Reply-To"
\r
230 +add_message '[from]="Sender <sender@example.com>"' \
\r
231 + [to]=test_suite@notmuchmail.org \
\r
232 + [subject]=notmuch-reply-test \
\r
233 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
234 + '[body]="support for reply-to"' \
\r
235 + '[reply-to]="Sender <elsewhere@example.com>"'
\r
237 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
238 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
239 +Subject: Re: notmuch-reply-test
\r
240 +To: Sender <elsewhere@example.com>
\r
241 +In-Reply-To: <${gen_msg_id}>
\r
242 +References: <${gen_msg_id}>
\r
244 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
245 +> support for reply-to"
\r
247 +test_begin_subtest "Support for Reply-To with multiple recipients"
\r
248 +add_message '[from]="Sender <sender@example.com>"' \
\r
249 + '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
\r
250 + [subject]=notmuch-reply-test \
\r
251 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
252 + '[body]="support for reply-to with multiple recipients"' \
\r
253 + '[reply-to]="Sender <elsewhere@example.com>"'
\r
255 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
256 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
257 +Subject: Re: notmuch-reply-test
\r
258 +To: Sender <elsewhere@example.com>
\r
259 +In-Reply-To: <${gen_msg_id}>
\r
260 +References: <${gen_msg_id}>
\r
262 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
263 +> support for reply-to with multiple recipients"
\r
265 +test_begin_subtest "Un-munging Reply-To"
\r
266 +add_message '[from]="Sender <sender@example.com>"' \
\r
267 + '[to]="Some List <list@example.com>"' \
\r
268 + [subject]=notmuch-reply-test \
\r
269 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
270 + '[body]="Un-munging Reply-To"' \
\r
271 + '[reply-to]="Evil Munging List <list@example.com>"'
\r
273 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
274 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
275 +Subject: Re: notmuch-reply-test
\r
276 +To: Sender <sender@example.com>
\r
277 +In-Reply-To: <${gen_msg_id}>
\r
278 +References: <${gen_msg_id}>
\r
280 +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
\r
281 +> Un-munging Reply-To"
\r
283 +test_begin_subtest "Message with header of exactly 200 bytes"
\r
284 +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
285 + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
\r
286 + '[body]="200-byte header"'
\r
287 +output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
\r
288 +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
289 +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
290 +In-Reply-To: <${gen_msg_id}>
\r
291 +References: <${gen_msg_id}>
\r
293 +On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
\r
294 +> 200-byte header"
\r