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 34C98429E21 for ; Mon, 28 Nov 2011 13:14:32 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 7DVy3LcB4HHR for ; Mon, 28 Nov 2011 13:14:31 -0800 (PST) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 8D3DA431FB6 for ; Mon, 28 Nov 2011 13:14:31 -0800 (PST) Received: by faaq2 with SMTP id q2so2116648faa.26 for ; Mon, 28 Nov 2011 13:14:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=oMNhVo6i4PxyJOx7vJuezkOmSxbzUCuSY9gzH47FurY=; b=fYUpfDogM93uKgjLL2h0LxMbADAPjkLSGWFIb7D2K+tMbZOcn1eFy3apliIrKpmKvz kk7eLWCo44+0TH1Pb7OWTEnpgD8Z4YWrik6Lgxou12YtnN1TkiSfqatAQxqYDDb4buE+ BabcbmEhYjgXOrytgaAK0QeZb4SvqwMTSxad0= Received: by 10.204.153.195 with SMTP id l3mr11752963bkw.132.1322514870201; Mon, 28 Nov 2011 13:14:30 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id hy13sm32349232bkc.0.2011.11.28.13.14.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Nov 2011 13:14:29 -0800 (PST) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH v3 2/3] test: check that Emacs UI does not call notmuch for non-inlinable parts Date: Tue, 29 Nov 2011 01:13:58 +0400 Message-Id: <1322514839-28441-3-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1322514839-28441-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1322271878-32614-1-git-send-email-dmitry.kurochkin@gmail.com> <1322514839-28441-1-git-send-email-dmitry.kurochkin@gmail.com> 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: Mon, 28 Nov 2011 21:14:32 -0000 The patch adds two new test cases: * Do not call notmuch for non-inlinable application/mpeg parts * Do not call notmuch for non-inlinable audio/mpeg parts The application/mpeg test passes thanks to a workaround for application/* Content-Types. The audio/mpeg is currently broken. --- test/emacs | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index 3f8c72d..bdac84f 100755 --- a/test/emacs +++ b/test/emacs @@ -472,4 +472,35 @@ test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail. (test-visible-output)' test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts" +id='message-with-application/mpeg-attachment@notmuchmail.org' +emacs_deliver_message \ + 'Message with application/mpeg attachment' \ + '' \ + "(message-goto-eoh) + (insert \"Message-ID: <$id>\n\") + (message-goto-body) + (mml-insert-part \"application/mpeg\") + (insert \"a fake mp3 file\")" +notmuch_counter_reset +test_emacs "(let ((notmuch-command \"$notmuch_counter_command\")) + (notmuch-show \"id:$id\"))" +test_expect_equal $(notmuch_counter_value) 1 + +test_begin_subtest "Do not call notmuch for non-inlinable audio/mpeg parts" +test_subtest_known_broken +id='message-with-audio/mpeg-attachment@notmuchmail.org' +emacs_deliver_message \ + 'Message with audio/mpeg attachment' \ + '' \ + "(message-goto-eoh) + (insert \"Message-ID: <$id>\n\") + (message-goto-body) + (mml-insert-part \"audio/mpeg\") + (insert \"a fake mp3 file\")" +notmuch_counter_reset +test_emacs "(let ((notmuch-command \"$notmuch_counter_command\")) + (notmuch-show \"id:$id\"))" +test_expect_equal $(notmuch_counter_value) 1 + test_done -- 1.7.7.3