unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/3] test: Add a test for HTML email with inline images
Date: Sat, 29 Sep 2012 13:55:13 -0400	[thread overview]
Message-ID: <1348941314-8377-3-git-send-email-amdragon@mit.edu> (raw)
In-Reply-To: <1348941314-8377-1-git-send-email-amdragon@mit.edu>

Currently this test passes in Emacs 23 but fails in Emacs 24 (at least
on some Linux distributions).
---
 test/emacs |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/test/emacs b/test/emacs
index 174a9ac..1f84b91 100755
--- a/test/emacs
+++ b/test/emacs
@@ -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
-- 
1.7.10

  parent reply	other threads:[~2012-09-29 17:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-29 17:55 [PATCH 0/3] Fix gnus-inhibit-images bug in Emacs 24 Austin Clements
2012-09-29 17:55 ` [PATCH 1/3] test: Clear test-ouput output file before running Emacs tests Austin Clements
2012-09-29 17:55 ` Austin Clements [this message]
2012-10-03  9:35   ` [PATCH 2/3] test: Add a test for HTML email with inline images Dmitry Kurochkin
2012-10-03 14:28     ` Austin Clements
2012-10-03 14:41       ` Dmitry Kurochkin
2012-09-29 17:55 ` [PATCH 3/3] emacs: Work around gnus-inhibit-images bug in mm-shr Austin Clements
2012-09-29 18:03   ` [PATCH] " Austin Clements
2012-09-29 20:26 ` [PATCH 0/3] Fix gnus-inhibit-images bug in Emacs 24 Tomi Ollila
2012-10-01  2:38   ` 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=1348941314-8377-3-git-send-email-amdragon@mit.edu \
    --to=amdragon@mit.edu \
    --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).