]> git.notmuchmail.org Git - notmuch/commitdiff
test: some small fixes to multipart test
authorJameson Graef Rollins <jrollins@finestructure.net>
Mon, 6 Jun 2011 00:29:25 +0000 (17:29 -0700)
committerDavid Bremner <bremner@debian.org>
Mon, 5 Sep 2011 11:54:56 +0000 (08:54 -0300)
There were two "--format=text --part=0" tests.  One of them was
supposed to be a test for "--format=text --part=1".

There were also two errant "test_expect_equal_file OUTPUT EXPECTED"
lines, that are removed here.

test/multipart

index 22c42c6aefc73b8bcda59831bbf2f0f8c615367f..dced23ec99c0f7740da1e0badd7859a2174735f0 100755 (executable)
@@ -127,18 +127,9 @@ Non-text part: application/pgp-signature
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
 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
 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
 \fpart{ ID: 1, Content-type: multipart/signed
 \fpart{ ID: 2, Content-type: multipart/mixed
 \fpart{ ID: 3, Content-type: message/rfc822
@@ -159,8 +150,6 @@ And this message is signed.
 Non-text part: application/pgp-signature
 \fpart}
 \fpart}
 Non-text part: application/pgp-signature
 \fpart}
 \fpart}
-\fbody}
-\fmessage}
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
@@ -252,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"}]}'
 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_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')
 
 test_begin_subtest "--format=json --part=4, html part"
 output=$(notmuch show --format=json --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org')