mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
test: add tests for notmuch reply From guessing
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 <jani@nikula.org>
This commit is contained in:
parent
22a18fc921
commit
2f1a11268f
1 changed files with 55 additions and 0 deletions
55
test/reply
55
test/reply
|
@ -138,4 +138,59 @@ References: <${gen_msg_id}>
|
||||||
|
|
||||||
On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
|
On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:
|
||||||
> 200-byte header"
|
> 200-byte header"
|
||||||
|
|
||||||
|
test_begin_subtest "From guessing: Envelope-To"
|
||||||
|
add_message '[from]="Sender <sender@example.com>"' \
|
||||||
|
'[to]="Recipient <recipient@example.com>"' \
|
||||||
|
'[subject]="From guessing"' \
|
||||||
|
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
|
||||||
|
'[body]="From guessing"' \
|
||||||
|
'[header]="Envelope-To: test_suite_other@notmuchmail.org"'
|
||||||
|
|
||||||
|
output=$(notmuch reply id:${gen_msg_id})
|
||||||
|
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
|
||||||
|
Subject: Re: From guessing
|
||||||
|
To: Sender <sender@example.com>, Recipient <recipient@example.com>
|
||||||
|
In-Reply-To: <${gen_msg_id}>
|
||||||
|
References: <${gen_msg_id}>
|
||||||
|
|
||||||
|
On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
|
||||||
|
> From guessing"
|
||||||
|
|
||||||
|
test_begin_subtest "From guessing: X-Original-To"
|
||||||
|
add_message '[from]="Sender <sender@example.com>"' \
|
||||||
|
'[to]="Recipient <recipient@example.com>"' \
|
||||||
|
'[subject]="From guessing"' \
|
||||||
|
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
|
||||||
|
'[body]="From guessing"' \
|
||||||
|
'[header]="X-Original-To: test_suite@otherdomain.org"'
|
||||||
|
|
||||||
|
output=$(notmuch reply id:${gen_msg_id})
|
||||||
|
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@otherdomain.org>
|
||||||
|
Subject: Re: From guessing
|
||||||
|
To: Sender <sender@example.com>, Recipient <recipient@example.com>
|
||||||
|
In-Reply-To: <${gen_msg_id}>
|
||||||
|
References: <${gen_msg_id}>
|
||||||
|
|
||||||
|
On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
|
||||||
|
> From guessing"
|
||||||
|
|
||||||
|
test_begin_subtest "From guessing: Delivered-To"
|
||||||
|
add_message '[from]="Sender <sender@example.com>"' \
|
||||||
|
'[to]="Recipient <recipient@example.com>"' \
|
||||||
|
'[subject]="From guessing"' \
|
||||||
|
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
|
||||||
|
'[body]="From guessing"' \
|
||||||
|
'[header]="Delivered-To: test_suite_other@notmuchmail.org"'
|
||||||
|
|
||||||
|
output=$(notmuch reply id:${gen_msg_id})
|
||||||
|
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
|
||||||
|
Subject: Re: From guessing
|
||||||
|
To: Sender <sender@example.com>, Recipient <recipient@example.com>
|
||||||
|
In-Reply-To: <${gen_msg_id}>
|
||||||
|
References: <${gen_msg_id}>
|
||||||
|
|
||||||
|
On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
|
||||||
|
> From guessing"
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue