[PATCH v4 2/3] test: check that Emacs UI does not call notmuch for non-inlinable...
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Tue, 29 Nov 2011 21:19:53 +0000 (01:19 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:30 +0000 (09:40 -0800)
f8/3a41250b2d390bc5c8b860efc8df076abad980 [new file with mode: 0644]

diff --git a/f8/3a41250b2d390bc5c8b860efc8df076abad980 b/f8/3a41250b2d390bc5c8b860efc8df076abad980
new file mode 100644 (file)
index 0000000..8b5ee7e
--- /dev/null
@@ -0,0 +1,114 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\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 75B97431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 29 Nov 2011 13:20:37 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 1OT0HAToyDt0 for <notmuch@notmuchmail.org>;\r
+       Tue, 29 Nov 2011 13:20:37 -0800 (PST)\r
+Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 8AEB6429E32\r
+       for <notmuch@notmuchmail.org>; Tue, 29 Nov 2011 13:20:29 -0800 (PST)\r
+Received: by mail-bw0-f53.google.com with SMTP id q10so11590721bka.26\r
+       for <notmuch@notmuchmail.org>; Tue, 29 Nov 2011 13:20:29 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=oMNhVo6i4PxyJOx7vJuezkOmSxbzUCuSY9gzH47FurY=;\r
+       b=eho32bQTkBVnIQeISJuaApZbBvr/ubSOEz2FlnywyzeXOpWQnFtLiH6czUmDSm7OQp\r
+       FOetzPGRqCD65AtQxxCB75Jf1I1xhH4b+lLJM3HTPgOz48859c5vFCx9jkYvjJ6RqenH\r
+       s9uknYlkwL2D+7TWEokyYJQQlQLbc9RvZi6j4=\r
+Received: by 10.204.10.77 with SMTP id o13mr54415966bko.12.1322601628503;\r
+       Tue, 29 Nov 2011 13:20:28 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id z7sm39733162bka.1.2011.11.29.13.20.26\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Tue, 29 Nov 2011 13:20:27 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 2/3] test: check that Emacs UI does not call notmuch for\r
+       non-inlinable parts\r
+Date: Wed, 30 Nov 2011 01:19:53 +0400\r
+Message-Id: <1322601595-20537-3-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.7.3\r
+In-Reply-To: <1322601595-20537-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1322271878-32614-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <1322601595-20537-1-git-send-email-dmitry.kurochkin@gmail.com>\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: Tue, 29 Nov 2011 21:20:38 -0000\r
+\r
+The patch adds two new test cases:\r
+\r
+* Do not call notmuch for non-inlinable application/mpeg parts\r
+* Do not call notmuch for non-inlinable audio/mpeg parts\r
+\r
+The application/mpeg test passes thanks to a workaround for\r
+application/* Content-Types.  The audio/mpeg is currently broken.\r
+---\r
+ test/emacs |   31 +++++++++++++++++++++++++++++++\r
+ 1 files changed, 31 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 3f8c72d..bdac84f 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -472,4 +472,35 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.\r
+           (test-visible-output)'\r
+ test_expect_equal_file OUTPUT EXPECTED\r
\r
++test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts"\r
++id='message-with-application/mpeg-attachment@notmuchmail.org'\r
++emacs_deliver_message \\r
++    'Message with application/mpeg attachment' \\r
++    '' \\r
++    "(message-goto-eoh)\r
++     (insert \"Message-ID: <$id>\n\")\r
++     (message-goto-body)\r
++     (mml-insert-part \"application/mpeg\")\r
++     (insert \"a fake mp3 file\")"\r
++notmuch_counter_reset\r
++test_emacs "(let ((notmuch-command \"$notmuch_counter_command\"))\r
++            (notmuch-show \"id:$id\"))"\r
++test_expect_equal $(notmuch_counter_value) 1\r
++\r
++test_begin_subtest "Do not call notmuch for non-inlinable audio/mpeg parts"\r
++test_subtest_known_broken\r
++id='message-with-audio/mpeg-attachment@notmuchmail.org'\r
++emacs_deliver_message \\r
++    'Message with audio/mpeg attachment' \\r
++    '' \\r
++    "(message-goto-eoh)\r
++     (insert \"Message-ID: <$id>\n\")\r
++     (message-goto-body)\r
++     (mml-insert-part \"audio/mpeg\")\r
++     (insert \"a fake mp3 file\")"\r
++notmuch_counter_reset\r
++test_emacs "(let ((notmuch-command \"$notmuch_counter_command\"))\r
++            (notmuch-show \"id:$id\"))"\r
++test_expect_equal $(notmuch_counter_value) 1\r
++\r
+ test_done\r
+-- \r
+1.7.7.3\r
+\r