[PATCH] test: Fix HTML rendering test

Ethan Glasser-Camp ethan.glasser.camp at gmail.com
Wed Oct 24 18:59:16 PDT 2012


Austin Clements <amdragon at MIT.EDU> writes:

> 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.

Hi! I'm eager to apply any patch here that makes this better. But this
one doesn't fix it for me (24.1.1, although it seems to work with
23.4.1). OUTPUT is "*\nsmiley " (no space after the asterisk or before
the word smiley, but after). I see that this sed command is supposed to
normalize things, but at least on my setup, it doesn't. I also see "nil"
written to console, but I have no idea what that's about.

More generally, I guess I don't understand exactly what this test is
supposed to be exercising. The commit message says "the shr renderer",
but what about it? In
id:"1348941314-8377-4-git-send-email-amdragon at mit.edu" you write that
using shr raised a void-variable error previously, so maybe we're making
sure that error doesn't show up? In that case, even my semi-broken
output is good enough.

In a perfect world, test probably shouldn't succeed if shr isn't
present, but should note that it wasn't run. Maybe the emacs lisp code
can check for shr, and if it's not present, write "shr not present" to
an output file, and the shell code can grep for that and then call
test_skip if it sees it?

Still, I'm excited that you're working on this so please let's get it
fixed!

Ethan


More information about the notmuch mailing list