X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Femacs;h=42e5d613fce1f3731d7d96b5c011e1ab76e8ed26;hb=69bb7f35b6e59fd3a3b1fb2d0f0367f7016cba80;hp=3f8c72d34e1afa16220bf8932dea7d09c74c7d0a;hpb=f0e0053149bb3b51f4a0cd43371292b639f236a8;p=notmuch diff --git a/test/emacs b/test/emacs index 3f8c72d3..42e5d613 100755 --- a/test/emacs +++ b/test/emacs @@ -472,4 +472,34 @@ 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" +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