X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Fmultipart;h=8bb9fa42fff4c397d6b4013a67cd85ea4c2fc9f8;hb=150db11214fead32af8b8a90920947d3a6570295;hp=dde25abc2fa7c0b0e6b175178b4e740a4a979c50;hpb=d67f75549785117a8e0c3bc4f0bd71352a29974c;p=notmuch diff --git a/test/multipart b/test/multipart index dde25abc..8bb9fa42 100755 --- a/test/multipart +++ b/test/multipart @@ -49,7 +49,7 @@ notmuch new > /dev/null test_begin_subtest "Show multipart MIME message (--format=text)" output=$(notmuch show --format=text 'id:87liy5ap00.fsf@yoom.home.cworth.org') -test_expect_equal "$output" " message{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 filename:/home/cworth/src/notmuch/test/tmp.multipart/mail/multipart +test_expect_equal "$output" " message{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 filename:${MAIL_DIR}/multipart header{ Carl Worth (2001-01-05) (attachment inbox unread) Subject: Multipart message @@ -58,27 +58,31 @@ To: cworth@cworth.org Date: Tue, 05 Jan 2001 15:43:57 -0000 header} body{ - part{ ID: 1, Content-type: text/plain + part{ ID: 1, Content-type: multipart/signed + part{ ID: 2, Content-type: multipart/mixed + part{ ID: 3, Content-type: text/plain This is an inline text part. part} - attachment{ ID: 2, Content-type: text/plain + attachment{ ID: 4, Content-type: text/plain Attachment: attachment (text/plain) This is a text attachment. attachment} - part{ ID: 3, Content-type: text/plain + part{ ID: 5, Content-type: text/plain And this message is signed. -Carl part} - part{ ID: 4, Content-type: application/pgp-signature + part} + part{ ID: 6, Content-type: application/pgp-signature Non-text part: application/pgp-signature part} + part} body} message}" test_begin_subtest "Show multipart MIME message (--format=json)" output=$(notmuch show --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org') -test_expect_equal "$output" '[[[{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "/home/cworth/src/notmuch/test/tmp.multipart/mail/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth ", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Tue, 05 Jan 2001 15:43:57 -0000"}, "body": [{"id": 1, "content-type": "text/plain", "content": "This is an inline text part.\n"}, {"id": 2, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 3, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}, {"id": 4, "content-type": "application/pgp-signature"}]}, []]]]' +test_expect_equal "$output" '[[[{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "'"${MAIL_DIR}"'/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth ", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Tue, 05 Jan 2001 15:43:57 -0000"}, "body": [{"id": 1, "content-type": "multipart/signed", "content": [{"id": 2, "content-type": "multipart/mixed", "content": [{"id": 3, "content-type": "text/plain", "content": "This is an inline text part.\n"}, {"id": 4, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 5, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}, {"id": 6, "content-type": "application/pgp-signature"}]}]}, []]]]' test_done