aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2024-05-20 08:58:56 -0300
committerDavid Bremner <david@tethera.net>2024-08-06 07:42:35 -0300
commitbe27c7be1e3d724dbcbdc28ecab1a8fca9f8604b (patch)
treea2eb3c011c4c130dd807f26f7310bf67140e89cb
parenta691d54280b574035d38f3827d5caca9d0a6ae5b (diff)
test/emacs-show: add regression test for subjects with CR/NL
This subject is known to be problematic for notmuch-tree.
-rwxr-xr-xtest/T450-emacs-show.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh
index 7c6a946a..ff340f06 100755
--- a/test/T450-emacs-show.sh
+++ b/test/T450-emacs-show.sh
@@ -460,4 +460,19 @@ subject4=$(grep '^Subject:' $FILE4)
subject=$(grep '^Subject:' OUTPUT)
test_expect_equal "$subject4" "$subject"
+test_begin_subtest "notmuch-show for message with subject with embedded CRNL"
+add_message "[subject]=\"=?UTF-8?B?8J+Pi++4jw==?= A SALE to boost your =?UTF-8?Q?workout=0D=0A?=\" [body]=the-message-body"
+test_emacs "(notmuch-show \"id:${gen_msg_id}\")
+ (test-output \"OUTPUT.raw\")"
+cat <<EOF >EXPECTED
+Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
+Subject: 🏋️ A SALE to boost your workout
+To: Notmuch Test Suite <test_suite@notmuchmail.org>
+Date: GENERATED_DATE
+
+the-message-body
+EOF
+notmuch_date_sanitize < OUTPUT.raw > OUTPUT
+test_expect_equal_file EXPECTED OUTPUT
+
test_done