From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH] test/emacs: known broken test for reply with extra headers set.
Date: Tue, 18 Jan 2022 21:14:51 -0400 [thread overview]
Message-ID: <20220119011451.3079127-1-david@tethera.net> (raw)
Although it makes sense for the extra headers to be added to the copy
of the message headers included in the sexp/json, it is a bit
surprising for them to show in the new message constructed for the
reply, especially when, as here, they are always missing/empty.
---
test/T310-emacs.sh | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index 1b6660f0..831df1cc 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -485,6 +485,32 @@ Sender <sender@example.com> writes:
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "Reply with show.extra_headers set"
+test_subtest_known_broken
+notmuch config set show.extra_headers Received
+add_message '[from]="Sender <sender@example.com>"' \
+ [to]=test_suite_other@notmuchmail.org
+
+test_emacs "(let ((message-hidden-headers '()))
+ (notmuch-search \"id:\\\"${gen_msg_id}\\\"\")
+ (notmuch-test-wait)
+ (notmuch-search-reply-to-thread)
+ (test-output))"
+cat <<EOF >EXPECTED
+From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
+To: Sender <sender@example.com>
+Subject: Re: ${test_subtest_name}
+In-Reply-To: <${gen_msg_id}>
+Fcc: ${MAIL_DIR}/sent
+References: <${gen_msg_id}>
+--text follows this line--
+Sender <sender@example.com> writes:
+
+> This is just a test message (#${gen_msg_cnt})
+EOF
+notmuch config set show.extra_headers
+test_expect_equal_file EXPECTED OUTPUT
+
test_begin_subtest "Reply from address in named group list within emacs"
add_message '[from]="Sender <sender@example.com>"' \
'[to]=group:test_suite@notmuchmail.org,someone@example.com\;' \
@@ -680,7 +706,7 @@ References: <XXX>
--text follows this line--
test_suite@notmuchmail.org writes:
-> This is just a test message (#7)
+> This is just a test message (#${gen_msg_cnt})
EOF
test_expect_equal_file EXPECTED OUTPUT
--
2.34.1
next reply other threads:[~2022-01-19 1:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 1:14 David Bremner [this message]
2022-01-19 1:34 ` [PATCH] CLI: print extra headers only for non-replies David Bremner
2022-01-19 20:47 ` Tomi Ollila
2022-01-20 0:00 ` 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=20220119011451.3079127-1-david@tethera.net \
--to=david@tethera.net \
--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).