--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4992B429E30\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Aug 2013 14:36:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id fFE2pZvNGcpk for <notmuch@notmuchmail.org>;\r
+ Sat, 24 Aug 2013 14:36:12 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 0B5D4429E2E\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Aug 2013 14:36:12 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1VDLV6-0002zN-0o; Sat, 24 Aug 2013 22:36:06 +0100\r
+Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1VDLV5-0008Qc-MR; Sat, 24 Aug 2013 22:36:03 +0100\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/1] test: test notmuch show --include-html option\r
+In-Reply-To: <1377358170-20561-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <notmuch-web-1372724382.450184839@www.wuzzeb.org>\r
+ <1377358170-20561-1-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.15.2+269~g01f5508 (http://notmuchmail.org) Emacs/23.4.1\r
+ (i486-pc-linux-gnu)\r
+Date: Sat, 24 Aug 2013 22:36:02 +0100\r
+Message-ID: <877gfa93gd.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 93.97.24.31\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: 7d251aa7bbcf5c7e6d64c69d540f9654 (of first 20000 bytes)\r
+X-SpamAssassin-Score: 0.0\r
+X-SpamAssassin-SpamBar: /\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored 0.0 points. Summary of the scoring: \r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * 0.0 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 24 Aug 2013 21:36:20 -0000\r
+\r
+\r
+Hi\r
+\r
+Thanks for this. The pair of patches\r
+id:notmuch-web-1372724382.450184839@www.wuzzeb.org and\r
+id:1377358170-20561-1-git-send-email-tomi.ollila@iki.fi LGTM +1\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+\r
+> Test new --include-html option added to notmuch show command with\r
+> json output message parts containing text in latin1 and utf8 format.\r
+> ---\r
+>\r
+> this is test for id:notmuch-web-1372724382.450184839@www.wuzzeb.org asked\r
+> by Mark in id:87txifzexo.fsf@qmul.ac.uk\r
+>\r
+> test/multipart | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-\r
+> 1 file changed, 81 insertions(+), 1 deletion(-)\r
+>\r
+> diff --git a/test/multipart b/test/multipart\r
+> index 2033023..b40fa2c 100755\r
+> --- a/test/multipart\r
+> +++ b/test/multipart\r
+> @@ -647,4 +647,84 @@ notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out\r
+> echo -n -e "\xEF\x0D\x0A" > crlf.expected\r
+> test_expect_equal_file crlf.out crlf.expected\r
+> \r
+> -test_done\r
+> \ No newline at end of file\r
+> +\r
+> +# The ISO-8859-1 encoding of U+00BD is a single byte: octal 275\r
+> +# (Portability note: Dollar-Single ($'...', ANSI C-style escape sequences)\r
+> +# quoting works on bash, ksh, zsh, *BSD sh but not on dash, ash nor busybox sh)\r
+> +readonly u_00bd_latin1=$'\275'\r
+> +\r
+> +# The Unicode fraction symbol 1/2 is U+00BD and is encoded\r
+> +# in UTF-8 as two bytes: octal 302 275\r
+> +readonly u_00bd_utf8=$'\302\275'\r
+> +\r
+> +cat <<EOF > ${MAIL_DIR}/include-html\r
+> +From: A <a@example.com>\r
+> +To: B <b@example.com>\r
+> +Subject: html message\r
+> +Date: Sat, 01 January 2000 00:00:00 +0000\r
+> +Message-ID: <htmlmessage>\r
+> +MIME-Version: 1.0\r
+> +Content-Type: multipart/alternative; boundary="==-=="\r
+> +\r
+> +--==-==\r
+> +Content-Type: text/html; charset=UTF-8\r
+> +\r
+> +<p>0.5 equals ${u_00bd_utf8}</p>\r
+> +\r
+> +--==-==\r
+> +Content-Type: text/html; charset=ISO-8859-1\r
+> +\r
+> +<p>0.5 equals ${u_00bd_latin1}</p>\r
+> +\r
+> +--==-==\r
+> +Content-Type: text/plain; charset=UTF-8\r
+> +\r
+> +0.5 equals ${u_00bd_utf8}\r
+> +\r
+> +--==-==--\r
+> +EOF\r
+> +\r
+> +notmuch new > /dev/null\r
+> +\r
+> +cat_expected_head ()\r
+> +{\r
+> + cat <<EOF\r
+> +[[[{"id": "htmlmessage", "match":true, "excluded": false, "date_relative":"2000-01-01",\r
+> + "timestamp": 946684800,\r
+> + "filename": "${MAIL_DIR}/include-html",\r
+> + "tags": ["inbox", "unread"],\r
+> + "headers": { "Date": "Sat, 01 Jan 2000 00:00:00 +0000", "From": "A <a@example.com>",\r
+> + "Subject": "html message", "To": "B <b@example.com>"},\r
+> + "body": [{\r
+> + "content-type": "multipart/alternative", "id": 1,\r
+> +EOF\r
+> +}\r
+> +\r
+> +cat_expected_head > EXPECTED.nohtml\r
+> +cat <<EOF >> EXPECTED.nohtml\r
+> +"content": [\r
+> + { "id": 2, "content-charset": "UTF-8", "content-length": 21, "content-type": "text/html"},\r
+> + { "id": 3, "content-charset": "ISO-8859-1", "content-length": 20, "content-type": "text/html"},\r
+> + { "id": 4, "content-type": "text/plain", "content": "0.5 equals \\u00bd\\n"}\r
+> +]}]},[]]]]\r
+> +EOF\r
+> +\r
+> +# Both the UTF-8 and ISO-8859-1 part should have U+00BD\r
+> +cat_expected_head > EXPECTED.withhtml\r
+> +cat <<EOF >> EXPECTED.withhtml\r
+> +"content": [\r
+> + { "id": 2, "content-type": "text/html", "content": "<p>0.5 equals \\u00bd</p>\\n"},\r
+> + { "id": 3, "content-type": "text/html", "content": "<p>0.5 equals \\u00bd</p>\\n"},\r
+> + { "id": 4, "content-type": "text/plain", "content": "0.5 equals \\u00bd\\n"}\r
+> +]}]},[]]]]\r
+> +EOF\r
+> +\r
+> +test_begin_subtest "html parts excluded by default"\r
+> +notmuch show --format=json id:htmlmessage > OUTPUT\r
+> +test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED.nohtml)"\r
+> +\r
+> +test_begin_subtest "html parts included"\r
+> +notmuch show --format=json --include-html id:htmlmessage > OUTPUT\r
+> +test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED.withhtml)"\r
+> +\r
+> +test_done\r
+> -- \r
+> 1.8.0\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r