From: Adam Wolfe Gordon Date: Sun, 22 Apr 2012 00:54:52 +0000 (+1800) Subject: [PATCH 1/2] test: Replying to an HTML-only message in emacs X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d58dfe0e54d095d811f6ac86acbc033bd1266bc3;p=notmuch-archives.git [PATCH 1/2] test: Replying to an HTML-only message in emacs --- diff --git a/bd/edba28bc9f887b5b3676f1c6b73891cb15b362 b/bd/edba28bc9f887b5b3676f1c6b73891cb15b362 new file mode 100644 index 000000000..8d8160959 --- /dev/null +++ b/bd/edba28bc9f887b5b3676f1c6b73891cb15b362 @@ -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 42071431FBD + for ; Sat, 21 Apr 2012 17:55:07 -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 rn-FAxJI3ux7 for ; + Sat, 21 Apr 2012 17:54:56 -0700 (PDT) +Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) + by olra.theworths.org (Postfix) with ESMTP id 4E5C5431FB6 + for ; Sat, 21 Apr 2012 17:54:56 -0700 (PDT) +Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd6ml3no-ssvc.prod.shaw.ca) + ([10.0.144.222]) + by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 21 Apr 2012 18:54:55 -0600 +X-Cloudmark-SP-Filtered: true +X-Cloudmark-SP-Result: v=1.1 cv=gFGh1ScE7ROJHT2jhivHYaSHya8441O0LZB7wkhlVyo= + c=1 sm=1 + a=NoL1FBsgOlgA: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 pd6ml3no-dmz.prod.shaw.ca with ESMTP; 21 Apr 2012 18:54:55 -0600 +Received: by lagos.xvx.ca (Postfix, from userid 1000) + id D83278004801; Sat, 21 Apr 2012 18:54:54 -0600 (MDT) +From: Adam Wolfe Gordon +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] test: Replying to an HTML-only message in emacs +Date: Sat, 21 Apr 2012 18:54:52 -0600 +Message-Id: <1335056093-17621-2-git-send-email-awg+notmuch@xvx.ca> +X-Mailer: git-send-email 1.7.5.4 +In-Reply-To: <1335056093-17621-1-git-send-email-awg+notmuch@xvx.ca> +References: <1335056093-17621-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: Sun, 22 Apr 2012 00:55:07 -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 c7510e9..e648f80 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 +