[PATCH 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Mon, 28 Nov 2011 03:28:14 +0000 (07:28 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:27 +0000 (09:40 -0800)
bd/92703cdb259456ac9158214ba529155c1afb5a [new file with mode: 0644]

diff --git a/bd/92703cdb259456ac9158214ba529155c1afb5a b/bd/92703cdb259456ac9158214ba529155c1afb5a
new file mode 100644 (file)
index 0000000..f859af8
--- /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 415FC429E29\r
+       for <notmuch@notmuchmail.org>; Sun, 27 Nov 2011 19:28:48 -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 pebqNH5hd5iV for <notmuch@notmuchmail.org>;\r
+       Sun, 27 Nov 2011 19:28:46 -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 C80E5429E25\r
+       for <notmuch@notmuchmail.org>; Sun, 27 Nov 2011 19:28:43 -0800 (PST)\r
+Received: by mail-bw0-f53.google.com with SMTP id q10so8621145bka.26\r
+       for <notmuch@notmuchmail.org>; Sun, 27 Nov 2011 19:28:43 -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=FbPTferqsvxD38/LuOtIzDR8VLWRSBrg47EmokBDToM=;\r
+       b=nFWKwXnUKE0oBtJN55IiuUIHA/FzmIS6n+ko10v1R/SmAVENTbAPlYsogSg7ly0fkO\r
+       NtBbcgiq4QHAGtHpS9Ocyf3WoBWpF+w2lQ7hnQswelIAa/grPfLHs1u01Yx01yoRGg8p\r
+       HzRzCTHyZDrBfHza+1APdnu0PcN5TGVAYEwdw=\r
+Received: by 10.204.34.148 with SMTP id l20mr37509271bkd.55.1322450923472;\r
+       Sun, 27 Nov 2011 19:28:43 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id cc2sm26749483bkb.8.2011.11.27.19.28.42\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 27 Nov 2011 19:28:42 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/3] test: check that Emacs UI does not call notmuch for\r
+       non-inlinable parts\r
+Date: Mon, 28 Nov 2011 07:28:14 +0400\r
+Message-Id: <1322450895-32523-3-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.7.3\r
+In-Reply-To: <1322450895-32523-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1322271878-32614-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <1322450895-32523-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: Mon, 28 Nov 2011 03:28:48 -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 198c27b..20f8449 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