test: add emacs reply test for subjects with TAB
authorJani Nikula <jani@nikula.org>
Tue, 26 Sep 2017 18:26:07 +0000 (21:26 +0300)
committerDavid Bremner <david@tethera.net>
Wed, 27 Sep 2017 11:10:31 +0000 (08:10 -0300)
Expect TABs to be sanitized from the subject line. Known broken.

test/T310-emacs.sh

index fde11790a600ae3591803a3f820bcb42516e798f..2ef566bac490ecc04d74068b960f54bca258d24b 100755 (executable)
@@ -401,6 +401,29 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest "Reply within emacs to a message with TAB in subject"
+test_subtest_known_broken
+test_emacs '(let ((message-hidden-headers ''()))
+           (notmuch-search "id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net")
+           (notmuch-test-wait)
+           (notmuch-search-show-thread)
+           (notmuch-test-wait)
+           (notmuch-show-reply-sender)
+           (test-output))'
+sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' OUTPUT
+sed -i -e 's/^References: <.*>$/References: <XXX>/' OUTPUT
+sed -i -e '/^--text follows this line--$/q' OUTPUT
+cat <<EOF >EXPECTED
+From: Notmuch Test Suite <test_suite@notmuchmail.org>
+To: Mikhail Gusarov <dottedmag@dottedmag.net>
+Subject: Re: [notmuch] [PATCH 1/2] Close message file after parsing message headers
+In-Reply-To: <XXX>
+Fcc: ${MAIL_DIR}/sent
+References: <XXX>
+--text follows this line--
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_begin_subtest "Reply from alternate address within emacs"
 add_message '[from]="Sender <sender@example.com>"' \
             [to]=test_suite_other@notmuchmail.org