diff options
author | Hannu Hartikainen <hannu@hrtk.in> | 2021-07-02 12:13:08 +0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2021-08-29 18:07:59 -0700 |
commit | 8c0bebedc5edbff5ddc46b66da1177ec18f48c69 (patch) | |
tree | af1c96d1f748e4e1f7bee65f771ddb1321df2e05 /test/T220-reply.sh | |
parent | dd8c167850f376e46a13b567a8215937f4759c46 (diff) |
reply: add test for multiple Delivered-To headers
Add a known broken subtest for guessing From: correctly when there are
multiple Delivered-To: headers. The address configured as primary_email
should get picked.
Diffstat (limited to 'test/T220-reply.sh')
-rwxr-xr-x | test/T220-reply.sh | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/T220-reply.sh b/test/T220-reply.sh index b6d8f42a..9f711a04 100755 --- a/test/T220-reply.sh +++ b/test/T220-reply.sh @@ -245,6 +245,27 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote: > From guessing OK" +test_begin_subtest "From guessing: multiple Delivered-To" +test_subtest_known_broken +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 +Delivered-To: test_suite@notmuchmail.org"' + +output=$(notmuch reply id:${gen_msg_id} 2>&1 && echo OK) +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@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 +OK" + test_begin_subtest "Reply with RFC 2047-encoded headers" add_message '[subject]="=?iso-8859-1?q?=e0=df=e7?="' \ '[from]="=?utf-8?q?=e2=98=83?= <snowman@example.com>"' \ @@ -281,7 +302,7 @@ test_expect_equal_json "$output" ' "crypto": {}, "date_relative": "2010-01-05", "excluded": false, - "filename": ["'${MAIL_DIR}'/msg-014"], + "filename": ["'${MAIL_DIR}'/msg-015"], "headers": { "Date": "Tue, 05 Jan 2010 15:43:56 +0000", "From": "\u2603 <snowman@example.com>", |