]> git.notmuchmail.org Git - notmuch/blob - test/t0005-reply.sh
test: Remove basic testing of broken, fixed, and skipped tests.
[notmuch] / test / t0005-reply.sh
1 #!/bin/bash
2 test_description="\"notmuch reply\" in several variations"
3 . ./test-lib.sh
4
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"'
11
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 Bcc: test_suite@notmuchmail.org
17 In-Reply-To: <${gen_msg_id}>
18 References: <${gen_msg_id}>
19
20 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
21 > basic reply test"
22
23 test_begin_subtest "Multiple recipients"
24 add_message '[from]="Sender <sender@example.com>"' \
25             '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
26              [subject]=notmuch-reply-test \
27             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
28             '[body]="Multiple recipients"'
29
30 output=$($NOTMUCH reply id:${gen_msg_id})
31 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
32 Subject: Re: notmuch-reply-test
33 To: Sender <sender@example.com>, Someone Else <someone@example.com>
34 Bcc: test_suite@notmuchmail.org
35 In-Reply-To: <${gen_msg_id}>
36 References: <${gen_msg_id}>
37
38 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
39 > Multiple recipients"
40
41 test_begin_subtest "Reply with CC"
42 add_message '[from]="Sender <sender@example.com>"' \
43              [to]=test_suite@notmuchmail.org \
44             '[cc]="Other Parties <cc@example.com>"' \
45              [subject]=notmuch-reply-test \
46             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
47             '[body]="reply with CC"'
48
49 output=$($NOTMUCH reply id:${gen_msg_id})
50 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
51 Subject: Re: notmuch-reply-test
52 To: Sender <sender@example.com>
53 Cc: Other Parties <cc@example.com>
54 Bcc: test_suite@notmuchmail.org
55 In-Reply-To: <${gen_msg_id}>
56 References: <${gen_msg_id}>
57
58 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
59 > reply with CC"
60
61 test_begin_subtest "Reply from alternate address"
62 add_message '[from]="Sender <sender@example.com>"' \
63              [to]=test_suite_other@notmuchmail.org \
64              [subject]=notmuch-reply-test \
65             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
66             '[body]="reply from alternate address"'
67
68 output=$($NOTMUCH reply id:${gen_msg_id})
69 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
70 Subject: Re: notmuch-reply-test
71 To: Sender <sender@example.com>
72 Bcc: test_suite@notmuchmail.org
73 In-Reply-To: <${gen_msg_id}>
74 References: <${gen_msg_id}>
75
76 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
77 > reply from alternate address"
78
79 test_begin_subtest "Support for Reply-To"
80 add_message '[from]="Sender <sender@example.com>"' \
81              [to]=test_suite@notmuchmail.org \
82              [subject]=notmuch-reply-test \
83             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
84             '[body]="support for reply-to"' \
85             '[reply-to]="Sender <elsewhere@example.com>"'
86
87 output=$($NOTMUCH reply id:${gen_msg_id})
88 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
89 Subject: Re: notmuch-reply-test
90 To: Sender <elsewhere@example.com>
91 Bcc: test_suite@notmuchmail.org
92 In-Reply-To: <${gen_msg_id}>
93 References: <${gen_msg_id}>
94
95 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
96 > support for reply-to"
97
98 test_begin_subtest "Un-munging Reply-To"
99 add_message '[from]="Sender <sender@example.com>"' \
100             '[to]="Some List <list@example.com>"' \
101              [subject]=notmuch-reply-test \
102             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
103             '[body]="Un-munging Reply-To"' \
104             '[reply-to]="Evil Munging List <list@example.com>"'
105
106 output=$($NOTMUCH reply id:${gen_msg_id})
107 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
108 Subject: Re: notmuch-reply-test
109 To: Sender <sender@example.com>, Some List <list@example.com>
110 Bcc: test_suite@notmuchmail.org
111 In-Reply-To: <${gen_msg_id}>
112 References: <${gen_msg_id}>
113
114 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
115 > Un-munging Reply-To"
116
117 test_begin_subtest "Message with header of exactly 200 bytes"
118 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"' \
119             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
120             '[body]="200-byte header"'
121 output=$($NOTMUCH reply id:${gen_msg_id})
122 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
123 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
124 Bcc: test_suite@notmuchmail.org
125 In-Reply-To: <${gen_msg_id}>
126 References: <${gen_msg_id}>
127
128 On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
129 > 200-byte header"
130 test_done