From: Adam Wolfe Gordon Date: Sat, 5 May 2012 19:24:28 +0000 (+1800) Subject: [PATCH v2 1/2] test: Replying to an HTML-only message in emacs X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e254480457289c887a858b5af3e314ad78f4d4a4;p=notmuch-archives.git [PATCH v2 1/2] test: Replying to an HTML-only message in emacs --- diff --git a/26/979a50de945ea6cddec780aab1213096a7b6a2 b/26/979a50de945ea6cddec780aab1213096a7b6a2 new file mode 100644 index 000000000..1c75fd1ad --- /dev/null +++ b/26/979a50de945ea6cddec780aab1213096a7b6a2 @@ -0,0 +1,106 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id DC9CF431FAE + for ; Sat, 5 May 2012 12:24:37 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id mwrqfAjiDxW6 for ; + Sat, 5 May 2012 12:24:37 -0700 (PDT) +Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) + by olra.theworths.org (Postfix) with ESMTP id EF84A431FBC + for ; Sat, 5 May 2012 12:24:36 -0700 (PDT) +Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd7ml3no-ssvc.prod.shaw.ca) + ([10.0.144.222]) + by pd7mo1no-svcs.prod.shaw.ca with ESMTP; 05 May 2012 13:24:34 -0600 +X-Cloudmark-SP-Filtered: true +X-Cloudmark-SP-Result: v=1.1 cv=aDUJ/pRHNXkohnfhaDKKve0FfU8uPxX8npdo6G126bI= + c=1 sm=1 + a=XejJYtmazEQA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17 + a=pGLkceISAAAA:8 a=7343-z1_AAAA:8 a=XO_JPfpFyO7eHv6Wg-AA:9 + a=wByx9icT8cMI-syc5TcA:7 a=0BPXsuqt4rsA:10 a=MSl-tDqOz04A:10 + a=0c-eHkXYtrgA:10 a=ibHUYwHMjd1ke71a:21 a=QfoBV0eLwBxe4XEy:21 + a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 +Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56]) + by pd7ml3no-dmz.prod.shaw.ca with ESMTP; 05 May 2012 13:24:34 -0600 +Received: by lagos.xvx.ca (Postfix, from userid 1000) + id 01B358004807; Sat, 5 May 2012 13:24:33 -0600 (MDT) +From: Adam Wolfe Gordon +To: notmuch@notmuchmail.org +Subject: [PATCH v2 1/2] test: Replying to an HTML-only message in emacs +Date: Sat, 5 May 2012 13:24:28 -0600 +Message-Id: <1336245869-32699-2-git-send-email-awg+notmuch@xvx.ca> +X-Mailer: git-send-email 1.7.5.4 +In-Reply-To: <1336245869-32699-1-git-send-email-awg+notmuch@xvx.ca> +References: <1336245869-32699-1-git-send-email-awg+notmuch@xvx.ca> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 05 May 2012 19:24:38 -0000 + +With the latest reply infrastructure, we should be able to nicely +quote HTML-only emails. But currently emacs quotes the raw HTML +instead of parsing it first. This commit adds a test for this case. + +This test currently marked as broken. +--- + test/emacs | 27 +++++++++++++++++++++++++++ + 1 files changed, 27 insertions(+), 0 deletions(-) + +diff --git a/test/emacs b/test/emacs +index 38decd0..5f238d9 100755 +--- a/test/emacs ++++ b/test/emacs +@@ -444,6 +444,33 @@ Alex Botero-Lowry writes: + EOF + test_expect_equal_file OUTPUT EXPECTED + ++test_begin_subtest "Reply within emacs to an html-only message" ++test_subtest_known_broken ++add_message '[content-type]="text/html"' \ ++ '[body]="Hi,
This is an HTML test message.

OK?"' ++test_emacs "(let ((message-hidden-headers '())) ++ (notmuch-show \"id:${gen_msg_id}\") ++ (notmuch-show-reply) ++ (test-output))" ++sed -i -e 's,^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' OUTPUT ++cat <EXPECTED ++From: Notmuch Test Suite ++To: ++Subject: Re: Reply within emacs to an html-only message ++In-Reply-To: <${gen_msg_id}> ++Fcc: ${MAIL_DIR}/sent ++References: <${gen_msg_id}> ++User-Agent: Notmuch/XXX Emacs/XXX ++--text follows this line-- ++Notmuch Test Suite writes: ++ ++> Hi, ++> This is an HTML test message. ++> ++> OK? ++EOF ++test_expect_equal_file OUTPUT EXPECTED ++ + test_begin_subtest "Quote MML tags in reply" + message_id='test-emacs-mml-quoting@message.id' + add_message [id]="$message_id" \ +-- +1.7.5.4 +