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 <[email protected]> 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 <[email protected]>"' \
+            [to][email protected]
+
+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 <[email protected]>
+To: Sender <[email protected]>
+Subject: Re: ${test_subtest_name}
+In-Reply-To: <${gen_msg_id}>
+Fcc: ${MAIL_DIR}/sent
+References: <${gen_msg_id}>
+--text follows this line--
+Sender <[email protected]> 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 <[email protected]>"' \
             '[to]=group:[email protected],[email protected]\;' \
@@ -680,7 +706,7 @@ References: <XXX>
 --text follows this line--
 [email protected] 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

_______________________________________________
notmuch mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to