Re: [PATCH] test: Fix HTML rendering test
[notmuch-archives.git] / b4 / 54307fe40c0ae6bd2ed43876f4079bd69e9ac3
1 Return-Path: <amdragon@mit.edu>\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 589CC431FAF\r
6         for <notmuch@notmuchmail.org>; Wed, 24 Oct 2012 19:11:15 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id QZNcilWodVP3 for <notmuch@notmuchmail.org>;\r
16         Wed, 24 Oct 2012 19:11:14 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
18         [18.7.68.36])\r
19         by olra.theworths.org (Postfix) with ESMTP id A5B24431FAE\r
20         for <notmuch@notmuchmail.org>; Wed, 24 Oct 2012 19:11:14 -0700 (PDT)\r
21 X-AuditID: 12074424-b7fce6d000000925-f3-50889fc11f25\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
23         by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 83.4F.02341.1CF98805; Wed, 24 Oct 2012 22:11:14 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q9P2BDtN031262; \r
27         Wed, 24 Oct 2012 22:11:13 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q9P2BBxi001864\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Wed, 24 Oct 2012 22:11:12 -0400 (EDT)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1TRCud-0007Oe-Iy; Wed, 24 Oct 2012 22:11:11 -0400\r
37 Date: Wed, 24 Oct 2012 22:11:11 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>\r
40 Subject: Re: [PATCH] test: Fix HTML rendering test\r
41 Message-ID: <20121025021111.GW14861@mit.edu>\r
42 References: <1351109160-11105-1-git-send-email-amdragon@mit.edu>\r
43         <873913joqz.fsf@betacantrips.com>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 Content-Disposition: inline\r
47 In-Reply-To: <873913joqz.fsf@betacantrips.com>\r
48 User-Agent: Mutt/1.5.21 (2010-09-15)\r
49 X-Brightmail-Tracker:\r
50  H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42IRYrdT1z00vyPA4OQ+Jos7PbtYLK7fnMns\r
51         wOSxc9Zddo9nq24xBzBFcdmkpOZklqUW6dslcGUcP7aUteCuUMW0k7PYGxh/8XUxcnJICJhI\r
52         3PpwihXCFpO4cG89WxcjF4eQwD5Gid/vfjJDOBsYJX52fGSEcE4ySTy7vI8JwlnCKHH/13Kg\r
53         Hg4OFgFVic7+FJBRbAIaEtv2L2cECYsImEr8PagOEmYWkJb49ruZCcQWFjCSuHT+GJjNK6Aj\r
54         8XbaI3aQciGBFIkr/QUQYUGJkzOfsEC0aknc+PeSCaQEZMzyfxwgYU4BPYlzj5+zgdiiAioS\r
55         U05uY5vAKDQLSfcsJN2zELoXMDKvYpRNya3SzU3MzClOTdYtTk7My0st0jXXy80s0UtNKd3E\r
56         CA5pF5UdjM2HlA4xCnAwKvHwHvDoCBBiTSwrrsw9xCjJwaQkyrt0DlCILyk/pTIjsTgjvqg0\r
57         J7X4EKMEB7OSCO/kB+0BQrwpiZVVqUX5MClpDhYlcd7rKTf9hQTSE0tSs1NTC1KLYLIyHBxK\r
58         ErxT5gENFSxKTU+tSMvMKUFIM3FwggznARpuD1LDW1yQmFucmQ6RP8Woy3H0zdyHjEIsefl5\r
59         qVLivNNBigRAijJK8+DmwFLRK0ZxoLeEeetBqniAaQxu0iugJUxAS8x5WkGWlCQipKQaGFk2\r
60         8VvtOVVlVxBj1zdZRu5Xen7Yi4lfAiMfLXm9MaY/MmIxa/7je92dEbN8X37zE74z4zKz5F7V\r
61         SSEpcya9jhfbzd9r68pSrNiffic+5pBMs+uJ4If8E6s3hp4O9ihubZZw/RQuvSBAyURsdlyd\r
62         ctDBnJUv9pZPOb9yZqVvr5fHp7fNK0UDlViKMxINtZiLihMBZ+bQTSADAAA=\r
63 Cc: notmuch@notmuchmail.org\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Thu, 25 Oct 2012 02:11:15 -0000\r
77 \r
78 Quoth Ethan Glasser-Camp on Oct 24 at  9:59 pm:\r
79 > Austin Clements <amdragon@MIT.EDU> writes:\r
80\r
81 > > The test designed to exercise Emacs' rendering of HTML emails\r
82 > > containing images inadvertently assumed w3m was available under Emacs\r
83 > > 23.  The real point of this test was to exercise Emacs 24's shr\r
84 > > renderer, so if shr isn't available, we now fall back to html2text,\r
85 > > which comes with Emacs.\r
86\r
87 > Hi! I'm eager to apply any patch here that makes this better. But this\r
88 > one doesn't fix it for me (24.1.1, although it seems to work with\r
89 > 23.4.1). OUTPUT is "*\nsmiley " (no space after the asterisk or before\r
90 > the word smiley, but after). I see that this sed command is supposed to\r
91 > normalize things, but at least on my setup, it doesn't. I also see "nil"\r
92 > written to console, but I have no idea what that's about.\r
93 \r
94 Emacs seems to have as many ways to convert HTML to text as there are\r
95 people trying to run this test.  What's the value of\r
96 mm-text-html-renderer for you in Emacs 24?\r
97 \r
98 > More generally, I guess I don't understand exactly what this test is\r
99 > supposed to be exercising. The commit message says "the shr renderer",\r
100 > but what about it? In\r
101 > id:"1348941314-8377-4-git-send-email-amdragon@mit.edu" you write that\r
102 > using shr raised a void-variable error previously, so maybe we're making\r
103 > sure that error doesn't show up? In that case, even my semi-broken\r
104 > output is good enough.\r
105 \r
106 Yes; this is essentially a regression test.  I would prefer not to\r
107 catch exceptions in this test because I think we'll eventually start\r
108 eating exceptions in body renderers to prevent them from breaking the\r
109 rest of the show buffer.  We could check that the output contains the\r
110 word "smiley" somewhere as evidence that it probably didn't crash.\r
111 \r
112 > In a perfect world, test probably shouldn't succeed if shr isn't\r
113 > present, but should note that it wasn't run. Maybe the emacs lisp code\r
114 > can check for shr, and if it's not present, write "shr not present" to\r
115 > an output file, and the shell code can grep for that and then call\r
116 > test_skip if it sees it?\r
117 \r
118 That's another possibility.  Unfortunately, skipped tests seem rather\r
119 heavyweight in the test infrastructure and get reported loudly, which\r
120 would affect anyone running the tests under Emacs 23.\r
121 \r
122 > Still, I'm excited that you're working on this so please let's get it\r
123 > fixed!\r
124\r
125 > Ethan\r