]> git.notmuchmail.org Git - notmuch/blobdiff - test/emacs
test: Move tests from emacs to emacs-show
[notmuch] / test / emacs
index 5d118b67b4d347ae34242ba36cdc0051c2ebd799..1f84b91558420bb44e667d7a3d1b9d8dde9fad45 100755 (executable)
@@ -653,6 +653,8 @@ test_expect_equal "$(cat OUTPUT)" "thread:XXX"
 test_begin_subtest 'notmuch-show-advance-and-archive with invisible signature'
 message1='id:20091118010116.GC25380@dottiness.seas.harvard.edu'
 message2='id:1258491078-29658-1-git-send-email-dottedmag@dottedmag.net'
+test_emacs "(notmuch-show \"$message2\")
+           (test-output \"EXPECTED\")"
 test_emacs "(notmuch-search \"$message1 or $message2\")
            (notmuch-test-wait)
            (notmuch-search-show-thread)
@@ -660,8 +662,6 @@ test_emacs "(notmuch-search \"$message1 or $message2\")
            (redisplay)
            (notmuch-show-advance-and-archive)
            (test-output)"
-test_emacs "(notmuch-show \"$message2\")
-           (test-output \"EXPECTED\")"
 test_expect_equal_file OUTPUT EXPECTED
 
 test_begin_subtest "Refresh show buffer"
@@ -749,4 +749,38 @@ counter=$(test_emacs \
 )
 test_expect_equal "$counter" 2
 
+
+test_begin_subtest "Rendering HTML mail with images"
+add_message '[subject]="HTML mail with images"' \
+    '[content-type]="multipart/related; boundary=abcd"' \
+    '[body]="--abcd
+Content-Type: text/html
+
+<img src="cid:330@goomoji.gmail">
+
+--abcd
+Content-Type: image/gif
+Content-Transfer-Encoding: base64
+Content-ID: <330@goomoji.gmail>
+
+R0lGODlhDAAMAKIFAF5LAP/zxAAAANyuAP/gaP///wAAAAAAACH5BAEAAAUALAAAAAAMAAwAAAMl
+WLPcGjDKFYi9lxKBOaGcF35DhWHamZUW0K4mAbiwWtuf0uxFAgA7
+--abcd--"'
+test_emacs "(notmuch-show \"id:${gen_msg_id}\")
+           (test-output)"
+# Normalize output for Emacs 23 and Emacs 24
+sed -i 's/\[cid\]/*/' OUTPUT
+cat <<EOF >EXPECTED
+Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
+Subject: HTML mail with images
+To: Notmuch Test Suite <test_suite@notmuchmail.org>
+Date: Fri, 05 Jan 2001 15:43:57 +0000
+
+[ multipart/related ]
+[ text/html ]
+*
+EOF
+test_expect_equal_file OUTPUT EXPECTED
+
+
 test_done