2 test_description="\"notmuch reply\" in several variations"
5 test_begin_subtest "Basic reply"
6 add_message '[from]="Sender <sender@example.com>"' \
7 [to]=test_suite@notmuchmail.org \
8 [subject]=notmuch-reply-test \
9 '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
10 '[body]="basic reply test"'
12 output=$(notmuch reply id:${gen_msg_id})
13 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
14 Subject: Re: notmuch-reply-test
15 To: Sender <sender@example.com>
16 In-Reply-To: <${gen_msg_id}>
17 References: <${gen_msg_id}>
19 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
22 test_begin_subtest "Multiple recipients"
23 add_message '[from]="Sender <sender@example.com>"' \
24 '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
25 [subject]=notmuch-reply-test \
26 '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
27 '[body]="Multiple recipients"'
29 output=$(notmuch reply id:${gen_msg_id})
30 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
31 Subject: Re: notmuch-reply-test
32 To: Sender <sender@example.com>, Someone Else <someone@example.com>
33 In-Reply-To: <${gen_msg_id}>
34 References: <${gen_msg_id}>
36 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
37 > Multiple recipients"
39 test_begin_subtest "Reply with CC"
40 add_message '[from]="Sender <sender@example.com>"' \
41 [to]=test_suite@notmuchmail.org \
42 '[cc]="Other Parties <cc@example.com>"' \
43 [subject]=notmuch-reply-test \
44 '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
45 '[body]="reply with CC"'
47 output=$(notmuch reply id:${gen_msg_id})
48 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
49 Subject: Re: notmuch-reply-test
50 To: Sender <sender@example.com>
51 Cc: Other Parties <cc@example.com>
52 In-Reply-To: <${gen_msg_id}>
53 References: <${gen_msg_id}>
55 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
58 test_begin_subtest "Reply from alternate address"
59 add_message '[from]="Sender <sender@example.com>"' \
60 [to]=test_suite_other@notmuchmail.org \
61 [subject]=notmuch-reply-test \
62 '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
63 '[body]="reply from alternate address"'
65 output=$(notmuch reply id:${gen_msg_id})
66 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
67 Subject: Re: notmuch-reply-test
68 To: Sender <sender@example.com>
69 In-Reply-To: <${gen_msg_id}>
70 References: <${gen_msg_id}>
72 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
73 > reply from alternate address"
75 test_begin_subtest "Support for Reply-To"
76 add_message '[from]="Sender <sender@example.com>"' \
77 [to]=test_suite@notmuchmail.org \
78 [subject]=notmuch-reply-test \
79 '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
80 '[body]="support for reply-to"' \
81 '[reply-to]="Sender <elsewhere@example.com>"'
83 output=$(notmuch reply id:${gen_msg_id})
84 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
85 Subject: Re: notmuch-reply-test
86 To: Sender <elsewhere@example.com>
87 In-Reply-To: <${gen_msg_id}>
88 References: <${gen_msg_id}>
90 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
91 > support for reply-to"
93 test_begin_subtest "Un-munging Reply-To"
94 add_message '[from]="Sender <sender@example.com>"' \
95 '[to]="Some List <list@example.com>"' \
96 [subject]=notmuch-reply-test \
97 '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
98 '[body]="Un-munging Reply-To"' \
99 '[reply-to]="Evil Munging List <list@example.com>"'
101 output=$(notmuch reply id:${gen_msg_id})
102 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
103 Subject: Re: notmuch-reply-test
104 To: Sender <sender@example.com>, Some List <list@example.com>
105 In-Reply-To: <${gen_msg_id}>
106 References: <${gen_msg_id}>
108 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
109 > Un-munging Reply-To"
111 test_begin_subtest "Message with header of exactly 200 bytes"
112 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"' \
113 '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
114 '[body]="200-byte header"'
115 output=$(notmuch reply id:${gen_msg_id})
116 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
117 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
118 In-Reply-To: <${gen_msg_id}>
119 References: <${gen_msg_id}>
121 On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote: