]> git.notmuchmail.org Git - notmuch/blobdiff - test/multipart
test: some small fixes to multipart test
[notmuch] / test / multipart
index 2da9afa6dbf7f953700cc94cc5e08aeaecab42b1..dced23ec99c0f7740da1e0badd7859a2174735f0 100755 (executable)
@@ -88,7 +88,6 @@ Content-Transfer-Encoding: base64
 7w0K
 --==-=-=--
 EOF
-increment_mtime "$MAIL_DIR"
 notmuch new > /dev/null
 
 test_begin_subtest "--format=text --part=0, full message"
@@ -110,8 +109,7 @@ Date: Tue, 05 Jan 2001 15:43:57 -0000
 Non-text part: text/html
 \fpart}
 \fpart}
-\fattachment{ ID: 5, Content-type: text/plain
-Attachment: attachment (text/plain)
+\fattachment{ ID: 5, Filename: attachment, Content-type: text/plain
 This is a text attachment.
 \fattachment}
 \fpart{ ID: 6, Content-type: text/plain
@@ -129,18 +127,9 @@ Non-text part: application/pgp-signature
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
-test_begin_subtest "--format=text --part=0, full message"
-notmuch show --format=text --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
+test_begin_subtest "--format=text --part=1, message body"
+notmuch show --format=text --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
-\fmessage{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 filename:${MAIL_DIR}/multipart
-\fheader{
-Carl Worth <cworth@cworth.org> (2001-01-05) (attachment inbox signed unread)
-Subject: Multipart message
-From: Carl Worth <cworth@cworth.org>
-To: cworth@cworth.org
-Date: Tue, 05 Jan 2001 15:43:57 -0000
-\fheader}
-\fbody{
 \fpart{ ID: 1, Content-type: multipart/signed
 \fpart{ ID: 2, Content-type: multipart/mixed
 \fpart{ ID: 3, Content-type: message/rfc822
@@ -148,8 +137,7 @@ Date: Tue, 05 Jan 2001 15:43:57 -0000
 Non-text part: text/html
 \fpart}
 \fpart}
-\fattachment{ ID: 5, Content-type: text/plain
-Attachment: attachment (text/plain)
+\fattachment{ ID: 5, Filename: attachment, Content-type: text/plain
 This is a text attachment.
 \fattachment}
 \fpart{ ID: 6, Content-type: text/plain
@@ -162,8 +150,6 @@ And this message is signed.
 Non-text part: application/pgp-signature
 \fpart}
 \fpart}
-\fbody}
-\fmessage}
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
@@ -176,8 +162,7 @@ cat <<EOF >EXPECTED
 Non-text part: text/html
 \fpart}
 \fpart}
-\fattachment{ ID: 5, Content-type: text/plain
-Attachment: attachment (text/plain)
+\fattachment{ ID: 5, Filename: attachment, Content-type: text/plain
 This is a text attachment.
 \fattachment}
 \fpart{ ID: 6, Content-type: text/plain
@@ -212,8 +197,7 @@ test_expect_equal_file OUTPUT EXPECTED
 test_begin_subtest "--format=text --part=5, inline attachment"
 notmuch show --format=text --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
 cat <<EOF >EXPECTED
-\fattachment{ ID: 5, Content-type: text/plain
-Attachment: attachment (text/plain)
+\fattachment{ ID: 5, Filename: attachment, Content-type: text/plain
 This is a text attachment.
 \fattachment}
 EOF
@@ -257,13 +241,11 @@ test_begin_subtest "--format=json --part=2, multipart/mixed"
 output=$(notmuch show --format=json --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org')
 test_expect_equal "$output" \
 '{"id": 2, "content-type": "multipart/mixed", "content": [{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}, {"id": 5, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 6, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}'
-test_expect_equal_file OUTPUT EXPECTED
 
 test_begin_subtest "--format=json --part=3, rfc822 multipart"
 output=$(notmuch show --format=json --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org')
 test_expect_equal "$output" \
 '{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}'
-test_expect_equal_file OUTPUT EXPECTED
 
 test_begin_subtest "--format=json --part=4, html part"
 output=$(notmuch show --format=json --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org')