[PATCH v3 2/3] test: check that Emacs UI does not call notmuch for non-inlinable...
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Mon, 28 Nov 2011 21:13:58 +0000 (01:13 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:28 +0000 (09:40 -0800)
6f/a4e3e8f309882c23141efa47f538445301b5e2 [new file with mode: 0644]

diff --git a/6f/a4e3e8f309882c23141efa47f538445301b5e2 b/6f/a4e3e8f309882c23141efa47f538445301b5e2
new file mode 100644 (file)
index 0000000..640f369
--- /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 34C98429E21\r
+       for <notmuch@notmuchmail.org>; Mon, 28 Nov 2011 13:14:32 -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 7DVy3LcB4HHR for <notmuch@notmuchmail.org>;\r
+       Mon, 28 Nov 2011 13:14:31 -0800 (PST)\r
+Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com\r
+       [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 8D3DA431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 28 Nov 2011 13:14:31 -0800 (PST)\r
+Received: by faaq2 with SMTP id q2so2116648faa.26\r
+       for <notmuch@notmuchmail.org>; Mon, 28 Nov 2011 13:14:30 -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=fYUpfDogM93uKgjLL2h0LxMbADAPjkLSGWFIb7D2K+tMbZOcn1eFy3apliIrKpmKvz\r
+       kk7eLWCo44+0TH1Pb7OWTEnpgD8Z4YWrik6Lgxou12YtnN1TkiSfqatAQxqYDDb4buE+\r
+       BabcbmEhYjgXOrytgaAK0QeZb4SvqwMTSxad0=\r
+Received: by 10.204.153.195 with SMTP id l3mr11752963bkw.132.1322514870201;\r
+       Mon, 28 Nov 2011 13:14:30 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id hy13sm32349232bkc.0.2011.11.28.13.14.28\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 28 Nov 2011 13:14:29 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 2/3] test: check that Emacs UI does not call notmuch for\r
+       non-inlinable parts\r
+Date: Tue, 29 Nov 2011 01:13:58 +0400\r
+Message-Id: <1322514839-28441-3-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.7.3\r
+In-Reply-To: <1322514839-28441-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1322271878-32614-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <1322514839-28441-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 21:14:32 -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