[PATCH v2 1/2] test: Replying to an HTML-only message in emacs
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Sat, 5 May 2012 19:24:28 +0000 (13:24 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:56 +0000 (09:46 -0800)
26/979a50de945ea6cddec780aab1213096a7b6a2 [new file with mode: 0644]

diff --git a/26/979a50de945ea6cddec780aab1213096a7b6a2 b/26/979a50de945ea6cddec780aab1213096a7b6a2
new file mode 100644 (file)
index 0000000..1c75fd1
--- /dev/null
@@ -0,0 +1,106 @@
+Return-Path: <awg@lagos.xvx.ca>\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 DC9CF431FAE\r
+       for <notmuch@notmuchmail.org>; Sat,  5 May 2012 12:24:37 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 mwrqfAjiDxW6 for <notmuch@notmuchmail.org>;\r
+       Sat,  5 May 2012 12:24:37 -0700 (PDT)\r
+Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9])\r
+       by olra.theworths.org (Postfix) with ESMTP id EF84A431FBC\r
+       for <notmuch@notmuchmail.org>; Sat,  5 May 2012 12:24:36 -0700 (PDT)\r
+Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd7ml3no-ssvc.prod.shaw.ca)\r
+       ([10.0.144.222])\r
+       by pd7mo1no-svcs.prod.shaw.ca with ESMTP; 05 May 2012 13:24:34 -0600\r
+X-Cloudmark-SP-Filtered: true\r
+X-Cloudmark-SP-Result: v=1.1 cv=aDUJ/pRHNXkohnfhaDKKve0FfU8uPxX8npdo6G126bI=\r
+       c=1 sm=1\r
+       a=XejJYtmazEQA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
+       a=pGLkceISAAAA:8 a=7343-z1_AAAA:8 a=XO_JPfpFyO7eHv6Wg-AA:9\r
+       a=wByx9icT8cMI-syc5TcA:7 a=0BPXsuqt4rsA:10 a=MSl-tDqOz04A:10\r
+       a=0c-eHkXYtrgA:10 a=ibHUYwHMjd1ke71a:21 a=QfoBV0eLwBxe4XEy:21\r
+       a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
+Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
+       by pd7ml3no-dmz.prod.shaw.ca with ESMTP; 05 May 2012 13:24:34 -0600\r
+Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
+       id 01B358004807; Sat,  5 May 2012 13:24:33 -0600 (MDT)\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/2] test: Replying to an HTML-only message in emacs\r
+Date: Sat,  5 May 2012 13:24:28 -0600\r
+Message-Id: <1336245869-32699-2-git-send-email-awg+notmuch@xvx.ca>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1336245869-32699-1-git-send-email-awg+notmuch@xvx.ca>\r
+References: <1336245869-32699-1-git-send-email-awg+notmuch@xvx.ca>\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, 05 May 2012 19:24:38 -0000\r
+\r
+With the latest reply infrastructure, we should be able to nicely\r
+quote HTML-only emails. But currently emacs quotes the raw HTML\r
+instead of parsing it first. This commit adds a test for this case.\r
+\r
+This test currently marked as broken.\r
+---\r
+ test/emacs |   27 +++++++++++++++++++++++++++\r
+ 1 files changed, 27 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 38decd0..5f238d9 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -444,6 +444,33 @@ Alex Botero-Lowry <alex.boterolowry@gmail.com> writes:\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "Reply within emacs to an html-only message"\r
++test_subtest_known_broken\r
++add_message '[content-type]="text/html"' \\r
++          '[body]="Hi,<br />This is an <b>HTML</b> test message.<br /><br />OK?"'\r
++test_emacs "(let ((message-hidden-headers '()))\r
++          (notmuch-show \"id:${gen_msg_id}\")\r
++          (notmuch-show-reply)\r
++          (test-output))"\r
++sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT\r
++cat <<EOF >EXPECTED\r
++From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++To: \r
++Subject: Re: Reply within emacs to an html-only message\r
++In-Reply-To: <${gen_msg_id}>\r
++Fcc: ${MAIL_DIR}/sent\r
++References: <${gen_msg_id}>\r
++User-Agent: Notmuch/XXX Emacs/XXX\r
++--text follows this line--\r
++Notmuch Test Suite <test_suite@notmuchmail.org> writes:\r
++\r
++> Hi,\r
++> This is an HTML test message.\r
++>\r
++> OK?\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "Quote MML tags in reply"\r
+ message_id='test-emacs-mml-quoting@message.id'\r
+ add_message [id]="$message_id" \\r
+-- \r
+1.7.5.4\r
+\r