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.
---
 test/T220-reply.sh | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

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 
<sen...@example.com> wrote:
 > From guessing
 OK"
 
+test_begin_subtest "From guessing: multiple Delivered-To"
+test_subtest_known_broken
+add_message '[from]="Sender <sen...@example.com>"' \
+           '[to]="Recipient <recipi...@example.com>"' \
+           '[subject]="From guessing"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="From guessing"' \
+           '[header]="Delivered-To: test_suite_ot...@notmuchmail.org
+Delivered-To: test_su...@notmuchmail.org"'
+
+output=$(notmuch reply id:${gen_msg_id} 2>&1 && echo OK)
+test_expect_equal "$output" "From: Notmuch Test Suite 
<test_su...@notmuchmail.org>
+Subject: Re: From guessing
+To: Sender <sen...@example.com>, Recipient <recipi...@example.com>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sen...@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?= <snow...@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 <snow...@example.com>",
-- 
2.32.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to