unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Hannu Hartikainen <hannu@hrtk.in>
To: notmuch@notmuchmail.org
Cc: Hannu Hartikainen <hannu@hrtk.in>
Subject: [PATCH v2 1/2] reply: add test for multiple Delivered-To headers
Date: Fri,  2 Jul 2021 12:13:08 +0300	[thread overview]
Message-ID: <20210702091309.26970-1-hannu@hrtk.in> (raw)
In-Reply-To: <874kdkzfxk.fsf@tethera.net>

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 <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>",
-- 
2.32.0

  parent reply	other threads:[~2021-07-02  9:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 10:29 [PATCH] lib: consider all instances of Delivered-To header Hannu Hartikainen
2021-06-23 10:58 ` Michael J Gruber
2021-06-23 12:15   ` Hannu Hartikainen
2021-06-26 17:36 ` David Bremner
2021-06-28  7:11   ` Hannu Hartikainen
2021-07-02  9:13   ` Hannu Hartikainen [this message]
2021-07-02  9:13     ` [PATCH v2 2/2] " Hannu Hartikainen
2021-08-30  1:13     ` [PATCH v2 1/2] reply: add test for multiple Delivered-To headers David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210702091309.26970-1-hannu@hrtk.in \
    --to=hannu@hrtk.in \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).