1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
| | #!/usr/bin/env bash
test_description="emacs reply"
. $(dirname "$0")/test-lib.sh || exit 1
. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
EXPECTED=$NOTMUCH_SRCDIR/test/emacs-reply.expected-output
test_require_emacs
add_email_corpus attachment
test_begin_subtest "tar not inlined by default"
test_emacs '(notmuch-mua-new-reply "id:874llc2bkp.fsf@curie.anarc.at")
(test-visible-output "OUTPUT.raw")'
cat <<EOF > EXPECTED
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Antoine Beaupré <anarcat@orangeseeds.org>
Subject: Re: bug: "no top level messages" crash on Zen email loops
In-Reply-To: <874llc2bkp.fsf@curie.anarc.at>
Fcc: MAIL_DIR/sent
--text follows this line--
Antoine Beaupré <anarcat@orangeseeds.org> writes:
> And obviously I forget the frigging attachment.
>
>
> PS: don't we have a "you forgot to actually attach the damn file" plugin
> when we detect the word "attachment" and there's no attach? :p
EOF
notmuch_dir_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
add_email_corpus duplicate
ID2=87r2geywh9.fsf@tethera.net
for dup in {1..2}; do
test_begin_subtest "body, duplicate=${dup}"
test_emacs "(notmuch-show \"id:${ID2}\")
(notmuch-test-wait)
(notmuch-show-choose-duplicate $dup)
(notmuch-test-wait)
(notmuch-show-reply)
(test-visible-output \"OUTPUT.raw\")"
output=$(grep '^> # body' OUTPUT.raw)
test_expect_equal "$output" "> # body ${dup}"
done
ID3=87r2ecrr6x.fsf@zephyr.silentflame.com
test_begin_subtest "duplicate=3, subject"
test_emacs "(notmuch-show \"id:${ID3}\")
(notmuch-test-wait)
(notmuch-show-choose-duplicate 3)
(notmuch-test-wait)
(notmuch-show-reply)
(test-visible-output \"OUTPUT\")"
output=$(sed -n 's/^Subject: //p' OUTPUT)
file=$(notmuch search --output=files id:${ID3} | head -n 3 | tail -n 1)
subject=$(sed -n 's/^Subject: //p' $file)
test_expect_equal "$output" "Re: $subject"
test_begin_subtest "duplicate=4"
test_emacs "(notmuch-show \"id:${ID3}\")
(notmuch-show-choose-duplicate 4)
(notmuch-test-wait)
(notmuch-show-reply)
(test-visible-output \"OUTPUT.raw\")"
notmuch_dir_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file_nonempty $EXPECTED/notmuch-reply-duplicate-4 OUTPUT
add_email_corpus default
ID4=1258471718-6781-2-git-send-email-dottedmag@dottedmag.net
test_begin_subtest "if message-cite-reply-position is 'above, position citation below signature"
test_emacs "(let ((message-cite-reply-position 'above)
(message-signature \"EMAIL SIGNATURE\"))
(notmuch-mua-new-reply \"id:${ID4}\")
(test-visible-output \"OUTPUT.raw\"))"
cat <<EOF > EXPECTED
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Mikhail Gusarov <dottedmag@dottedmag.net>
Subject: Re: [notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4
In-Reply-To: <1258471718-6781-2-git-send-email-dottedmag@dottedmag.net>
Fcc: MAIL_DIR/sent
--text follows this line--
--
EMAIL SIGNATURE
"Mikhail Gusarov" <dottedmag@dottedmag.net> writes:
> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
> ---
> lib/message.cc | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/lib/message.cc b/lib/message.cc
> index 72c350f..a4b090b 100644
> --- a/lib/message.cc
> +++ b/lib/message.cc
> @@ -21,6 +21,8 @@
> #include "notmuch-private.h"
> #include "database-private.h"
>
> +#include <stdint.h>
> +
> #include <gmime/gmime.h>
>
> #include <xapian.h>
> --
> 1.6.3.3
EOF
notmuch_dir_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "if message-cite-reply-position is 'traditional, position citation above signature"
test_emacs "(let ((message-cite-reply-position 'traditional)
(message-signature \"EMAIL SIGNATURE\"))
(notmuch-mua-new-reply \"id:${ID4}\")
(test-visible-output \"OUTPUT.raw\"))"
cat <<EOF > EXPECTED
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Mikhail Gusarov <dottedmag@dottedmag.net>
Subject: Re: [notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4
In-Reply-To: <1258471718-6781-2-git-send-email-dottedmag@dottedmag.net>
Fcc: MAIL_DIR/sent
--text follows this line--
"Mikhail Gusarov" <dottedmag@dottedmag.net> writes:
> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
> ---
> lib/message.cc | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/lib/message.cc b/lib/message.cc
> index 72c350f..a4b090b 100644
> --- a/lib/message.cc
> +++ b/lib/message.cc
> @@ -21,6 +21,8 @@
> #include "notmuch-private.h"
> #include "database-private.h"
>
> +#include <stdint.h>
> +
> #include <gmime/gmime.h>
>
> #include <xapian.h>
> --
> 1.6.3.3
>
>
--
EMAIL SIGNATURE
EOF
notmuch_dir_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "if message-cite-reply-position is 'below, position citation above signature"
test_emacs "(let ((message-cite-reply-position 'below)
(message-signature \"EMAIL SIGNATURE\"))
(notmuch-mua-new-reply \"id:${ID4}\")
(test-visible-output \"OUTPUT.raw\"))"
cat <<EOF > EXPECTED
From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Mikhail Gusarov <dottedmag@dottedmag.net>
Subject: Re: [notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4
In-Reply-To: <1258471718-6781-2-git-send-email-dottedmag@dottedmag.net>
Fcc: MAIL_DIR/sent
--text follows this line--
"Mikhail Gusarov" <dottedmag@dottedmag.net> writes:
> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
> ---
> lib/message.cc | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/lib/message.cc b/lib/message.cc
> index 72c350f..a4b090b 100644
> --- a/lib/message.cc
> +++ b/lib/message.cc
> @@ -21,6 +21,8 @@
> #include "notmuch-private.h"
> #include "database-private.h"
>
> +#include <stdint.h>
> +
> #include <gmime/gmime.h>
>
> #include <xapian.h>
> --
> 1.6.3.3
>
>
--
EMAIL SIGNATURE
EOF
notmuch_dir_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file EXPECTED OUTPUT
test_done
|