From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: [PATCH] test: Fix HTML rendering test
Date: Wed, 24 Oct 2012 16:06:00 -0400 [thread overview]
Message-ID: <1351109160-11105-1-git-send-email-amdragon@mit.edu> (raw)
The test designed to exercise Emacs' rendering of HTML emails
containing images inadvertently assumed w3m was available under Emacs
23. The real point of this test was to exercise Emacs 24's shr
renderer, so if shr isn't available, we now fall back to html2text,
which comes with Emacs.
---
test/emacs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/test/emacs b/test/emacs
index 1f84b91..2ef78bf 100755
--- a/test/emacs
+++ b/test/emacs
@@ -756,7 +756,7 @@ add_message '[subject]="HTML mail with images"' \
'[body]="--abcd
Content-Type: text/html
-<img src="cid:330@goomoji.gmail">
+<img src="cid:330@goomoji.gmail"> smiley
--abcd
Content-Type: image/gif
@@ -766,10 +766,13 @@ Content-ID: <330@goomoji.gmail>
R0lGODlhDAAMAKIFAF5LAP/zxAAAANyuAP/gaP///wAAAAAAACH5BAEAAAUALAAAAAAMAAwAAAMl
WLPcGjDKFYi9lxKBOaGcF35DhWHamZUW0K4mAbiwWtuf0uxFAgA7
--abcd--"'
-test_emacs "(notmuch-show \"id:${gen_msg_id}\")
+test_emacs "(let ((mm-text-html-renderer
+ (if (assq 'shr mm-text-html-renderer-alist)
+ 'shr 'html2text)))
+ (notmuch-show \"id:${gen_msg_id}\"))
(test-output)"
# Normalize output for Emacs 23 and Emacs 24
-sed -i 's/\[cid\]/*/' OUTPUT
+sed -i 's/^ smiley/* smiley/' OUTPUT
cat <<EOF >EXPECTED
Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: HTML mail with images
@@ -778,7 +781,7 @@ Date: Fri, 05 Jan 2001 15:43:57 +0000
[ multipart/related ]
[ text/html ]
-*
+* smiley
EOF
test_expect_equal_file OUTPUT EXPECTED
--
1.7.10
next reply other threads:[~2012-10-24 20:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 20:06 Austin Clements [this message]
2012-10-25 1:59 ` [PATCH] test: Fix HTML rendering test Ethan Glasser-Camp
2012-10-25 2:11 ` Austin Clements
2012-10-25 8:06 ` Tomi Ollila
2012-10-25 13:28 ` Ethan Glasser-Camp
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=1351109160-11105-1-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).