1 Return-Path: <dmitry.kurochkin@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id A2BEA431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 3 Oct 2012 07:41:13 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 8w5ucht2Dp4G for <notmuch@notmuchmail.org>;
\r
17 Wed, 3 Oct 2012 07:41:13 -0700 (PDT)
\r
18 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
19 [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id B21AB431FAE
\r
22 for <notmuch@notmuchmail.org>; Wed, 3 Oct 2012 07:41:12 -0700 (PDT)
\r
23 Received: by lbbgg6 with SMTP id gg6so6442350lbb.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 03 Oct 2012 07:41:09 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:in-reply-to:references:user-agent:date
\r
27 :message-id:mime-version:content-type;
\r
28 bh=SNRgZAG19pGg8BdWyQXLe3ZnivGbSsGx7ILkCot0/Q4=;
\r
29 b=Ku+ZsXIyj8wiafXRmd/DtQtmQfav/vQWwPOCjMqZnXz58gQ7FDona3KkdFWHNVomM6
\r
30 MyPpt9OFK6z32MqAPQa+sWTEd3reJniLzNV0FnLfwk32esyK8ZvA+mJSdo+SzpVkc60m
\r
31 cAeV17CrYSFnASGtZA60D1ZaMGeAZC4cgRm6Ah+XrA/SVJdbmdsOrxIIkpvmo2RBHwIh
\r
32 RfREmZFCYesD3RXmFp0fiHrrOeKDSdT/Fk/ajL2zdHbSA5DnY5C0KwiHE0vv01fZf2Z+
\r
33 oJMsXFMFwztROu6gaQOpJCTBRJW7GDyqClYhaCRcAvpV3zRbqn8g6xWXXzwrakRefq3i
\r
35 Received: by 10.112.38.39 with SMTP id d7mr1785649lbk.112.1349275269802;
\r
36 Wed, 03 Oct 2012 07:41:09 -0700 (PDT)
\r
37 Received: from localhost ([91.144.186.21])
\r
38 by mx.google.com with ESMTPS id oj5sm1411951lab.8.2012.10.03.07.41.08
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Wed, 03 Oct 2012 07:41:08 -0700 (PDT)
\r
41 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
42 To: Austin Clements <amdragon@MIT.EDU>
\r
43 Subject: Re: [PATCH 2/3] test: Add a test for HTML email with inline images
\r
44 In-Reply-To: <20121003142834.GC14861@mit.edu>
\r
45 References: <1348941314-8377-1-git-send-email-amdragon@mit.edu>
\r
46 <1348941314-8377-3-git-send-email-amdragon@mit.edu>
\r
47 <87a9w3vqye.fsf@gmail.com> <20121003142834.GC14861@mit.edu>
\r
48 User-Agent: Notmuch/0.14+38~g322117b (http://notmuchmail.org) Emacs/23.4.1
\r
49 (x86_64-pc-linux-gnu)
\r
50 Date: Wed, 03 Oct 2012 18:41:07 +0400
\r
51 Message-ID: <87iparwrcs.fsf@gmail.com>
\r
53 Content-Type: text/plain; charset=us-ascii
\r
54 Cc: notmuch@notmuchmail.org
\r
55 X-BeenThere: notmuch@notmuchmail.org
\r
56 X-Mailman-Version: 2.1.13
\r
58 List-Id: "Use and development of the notmuch mail system."
\r
59 <notmuch.notmuchmail.org>
\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
63 List-Post: <mailto:notmuch@notmuchmail.org>
\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
67 X-List-Received-Date: Wed, 03 Oct 2012 14:41:13 -0000
\r
69 Austin Clements <amdragon@MIT.EDU> writes:
\r
71 > Quoth Dmitry Kurochkin on Oct 03 at 1:35 pm:
\r
74 >> Austin Clements <amdragon@MIT.EDU> writes:
\r
76 >> > Currently this test passes in Emacs 23 but fails in Emacs 24 (at least
\r
77 >> > on some Linux distributions).
\r
79 >> The test fails for me on Emacs 23.4.1 (Debian unstable):
\r
81 >> FAIL Rendering HTML mail with images
\r
82 >> --- emacs.51.OUTPUT 2012-10-03 09:31:33.383529764 +0000
\r
83 >> +++ emacs.51.EXPECTED 2012-10-03 09:31:33.383529764 +0000
\r
85 >> [ multipart/related ]
\r
90 >> Did not look into details.
\r
92 > Yes. This test is (in hindsight, unsurprisingly) sensitive to
\r
93 > whatever HTML renderer Emacs chooses. It looks like you're probably
\r
94 > using html2text, which outputs nothing for an image. Unfortunately,
\r
95 > none of the built-in renderers in Emacs 23 are aware of content
\r
96 > references, which makes this test rather pointless on Emacs 23 unless
\r
97 > we depend on an external renderer.
\r
99 > The best solution I can think of dynamically chooses shr on Emacs 24
\r
100 > (since that's really what we're trying to test) and gives up on Emacs
\r
101 > 23 and forcibly selects html2text (test patch below). Alternatively,
\r
102 > we could cycle through all of the available renderers, test everything
\r
103 > that we can, and just ignore everything that we can't run, though that
\r
104 > would make the test environment-sensitive.
\r
107 Perhaps the test should be skipped if shr is not available, like we do
\r
108 for missing binaries?
\r
113 > diff --git a/test/emacs b/test/emacs
\r
114 > index 1f84b91..2ef78bf 100755
\r
117 > @@ -756,7 +756,7 @@ add_message '[subject]="HTML mail with images"' \
\r
119 > Content-Type: text/html
\r
121 > -<img src="cid:330@goomoji.gmail">
\r
122 > +<img src="cid:330@goomoji.gmail"> smiley
\r
125 > Content-Type: image/gif
\r
126 > @@ -766,10 +766,13 @@ Content-ID: <330@goomoji.gmail>
\r
127 > R0lGODlhDAAMAKIFAF5LAP/zxAAAANyuAP/gaP///wAAAAAAACH5BAEAAAUALAAAAAAMAAwAAAMl
\r
128 > WLPcGjDKFYi9lxKBOaGcF35DhWHamZUW0K4mAbiwWtuf0uxFAgA7
\r
130 > -test_emacs "(notmuch-show \"id:${gen_msg_id}\")
\r
131 > +test_emacs "(let ((mm-text-html-renderer
\r
132 > + (if (assq 'shr mm-text-html-renderer-alist)
\r
133 > + 'shr 'html2text)))
\r
134 > + (notmuch-show \"id:${gen_msg_id}\"))
\r
136 > # Normalize output for Emacs 23 and Emacs 24
\r
137 > -sed -i 's/\[cid\]/*/' OUTPUT
\r
138 > +sed -i 's/^ smiley/* smiley/' OUTPUT
\r
139 > cat <<EOF >EXPECTED
\r
140 > Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
\r
141 > Subject: HTML mail with images
\r
142 > @@ -778,7 +781,7 @@ Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
144 > [ multipart/related ]
\r
149 > test_expect_equal_file OUTPUT EXPECTED
\r