From 7fb8ab9f0b470dc236c92686ed33f8e0fa1d5727 Mon Sep 17 00:00:00 2001 From: Adam Wolfe Gordon Date: Sat, 5 May 2012 13:24:28 -0600 Subject: [PATCH] test: Replying to an HTML-only message in emacs 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 file changed, 27 insertions(+) diff --git a/test/emacs b/test/emacs index 38decd0a..5f238d9a 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" \