Add tests for picking up user's From address from fallback headers
Envelope-To, X-Original-To, and Delivered-To.

Signed-off-by: Jani Nikula <[email protected]>
---
 test/reply |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/test/reply b/test/reply
index 00f4bea..ee5d361 100755
--- a/test/reply
+++ b/test/reply
@@ -138,4 +138,59 @@ References: <${gen_msg_id}>
 
 On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite 
<[email protected]> wrote:
 > 200-byte header"
+
+test_begin_subtest "From guessing: Envelope-To"
+add_message '[from]="Sender <[email protected]>"' \
+           '[to]="Recipient <[email protected]>"' \
+           '[subject]="From guessing"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="From guessing"' \
+           '[header]="Envelope-To: [email protected]"'
+
+output=$(notmuch reply id:${gen_msg_id})
+test_expect_equal "$output" "From: Notmuch Test Suite 
<[email protected]>
+Subject: Re: From guessing
+To: Sender <[email protected]>, Recipient <[email protected]>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <[email protected]> wrote:
+> From guessing"
+
+test_begin_subtest "From guessing: X-Original-To"
+add_message '[from]="Sender <[email protected]>"' \
+           '[to]="Recipient <[email protected]>"' \
+           '[subject]="From guessing"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="From guessing"' \
+           '[header]="X-Original-To: [email protected]"'
+
+output=$(notmuch reply id:${gen_msg_id})
+test_expect_equal "$output" "From: Notmuch Test Suite 
<[email protected]>
+Subject: Re: From guessing
+To: Sender <[email protected]>, Recipient <[email protected]>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <[email protected]> wrote:
+> From guessing"
+
+test_begin_subtest "From guessing: Delivered-To"
+add_message '[from]="Sender <[email protected]>"' \
+           '[to]="Recipient <[email protected]>"' \
+           '[subject]="From guessing"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="From guessing"' \
+           '[header]="Delivered-To: [email protected]"'
+
+output=$(notmuch reply id:${gen_msg_id})
+test_expect_equal "$output" "From: Notmuch Test Suite 
<[email protected]>
+Subject: Re: From guessing
+To: Sender <[email protected]>, Recipient <[email protected]>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <[email protected]> wrote:
+> From guessing"
+
 test_done
-- 
1.7.9.5

_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to