X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT190-multipart.sh;h=91a632c6698ed1362421f8c33452ea8d73696d45;hp=a6b155e9c7a82d0ca3b15b8457ef132f7c482a74;hb=3805898e3e337768d13b223a40b0ea76da73657e;hpb=e1c1d33f3726f5cadb2f92d23735dcd1102fbc88 diff --git a/test/T190-multipart.sh b/test/T190-multipart.sh index a6b155e9..91a632c6 100755 --- a/test/T190-multipart.sh +++ b/test/T190-multipart.sh @@ -2,14 +2,7 @@ test_description="output of multipart message" . ./test-lib.sh || exit 1 -cat < embedded_message -From: Carl Worth -To: cworth@cworth.org -Subject: html message -Date: Fri, 05 Jan 2001 15:42:57 +0000 -User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) -Message-ID: <87liy5ap01.fsf@yoom.home.cworth.org> -MIME-Version: 1.0 +cat < embedded_message_body Content-Type: multipart/alternative; boundary="==-=-==" --==-=-== @@ -24,15 +17,19 @@ This is an embedded message, with a multipart/alternative part. --==-=-==-- EOF - -cat < ${MAIL_DIR}/multipart +cat < embedded_message From: Carl Worth To: cworth@cworth.org -Subject: Multipart message -Date: Fri, 05 Jan 2001 15:43:57 +0000 +Subject: html message +Date: Fri, 05 Jan 2001 15:42:57 +0000 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) -Message-ID: <87liy5ap00.fsf@yoom.home.cworth.org> +Message-ID: <87liy5ap01.fsf@yoom.home.cworth.org> MIME-Version: 1.0 +EOF + +cat embedded_message_body >> embedded_message + +cat < multipart_body Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" @@ -44,8 +41,9 @@ Content-Type: message/rfc822 Content-Disposition: inline EOF -cat embedded_message >> ${MAIL_DIR}/multipart -cat <> ${MAIL_DIR}/multipart + +cat embedded_message >> multipart_body +cat <> multipart_body --=-=-= Content-Disposition: attachment; filename=attachment @@ -73,6 +71,18 @@ W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE --==-=-=-- EOF +cat < ${MAIL_DIR}/multipart +From: Carl Worth +To: cworth@cworth.org +Subject: Multipart message +Date: Fri, 05 Jan 2001 15:43:57 +0000 +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +Message-ID: <87liy5ap00.fsf@yoom.home.cworth.org> +MIME-Version: 1.0 +EOF + +cat multipart_body >> ${MAIL_DIR}/multipart + cat < ${MAIL_DIR}/base64-part-with-crlf From: Carl Worth To: cworth@cworth.org @@ -178,7 +188,7 @@ Non-text part: application/pgp-signature body} message} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=1, message body" notmuch show --format=text --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -217,7 +227,7 @@ Non-text part: application/pgp-signature part} part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=2, multipart/mixed" notmuch show --format=text --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -251,7 +261,7 @@ And this message is signed. part} part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=3, rfc822 part" notmuch show --format=text --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -275,7 +285,7 @@ This is an embedded message, with a multipart/alternative part. body} part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=4, rfc822's multipart" notmuch show --format=text --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -289,7 +299,7 @@ This is an embedded message, with a multipart/alternative part. part} part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=5, rfc822's html part" notmuch show --format=text --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -298,7 +308,7 @@ cat <EXPECTED Non-text part: text/html part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=6, rfc822's text part" notmuch show --format=text --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -307,7 +317,7 @@ cat <EXPECTED This is an embedded message, with a multipart/alternative part. part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=7, inline attachement" notmuch show --format=text --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -316,7 +326,7 @@ cat <EXPECTED This is a text attachment. attachment} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=8, plain text part" notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -327,7 +337,7 @@ And this message is signed. -Carl part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=9, pgp signature (unverified)" notmuch show --format=text --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -336,7 +346,7 @@ cat <EXPECTED Non-text part: application/pgp-signature part} EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=text --part=8, no part, expect error" test_expect_success "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'" @@ -448,15 +458,15 @@ test_expect_success "notmuch show --format=json --part=10 'id:87liy5ap00.fsf@yoo test_begin_subtest "--format=raw" notmuch show --format=raw 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT -test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart +test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT test_begin_subtest "--format=raw --part=0, full message" notmuch show --format=raw --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT -test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart +test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT test_begin_subtest "--format=raw --part=1, message body" notmuch show --format=raw --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT -test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart +test_expect_equal_file "${MAIL_DIR}"/multipart OUTPUT test_begin_subtest "--format=raw --part=2, multipart/mixed" notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -501,11 +511,11 @@ And this message is signed. --=-=-=-- EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=raw --part=3, rfc822 part" notmuch show --format=raw --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT -test_expect_equal_file OUTPUT embedded_message +test_expect_equal_file embedded_message OUTPUT test_begin_subtest "--format=raw --part=4, rfc822's multipart" notmuch show --format=raw --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -531,28 +541,28 @@ This is an embedded message, with a multipart/alternative part. --==-=-==-- EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=raw --part=5, rfc822's html part" notmuch show --format=raw --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT cat <EXPECTED

This is an embedded message, with a multipart/alternative part.

EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=raw --part=6, rfc822's text part" notmuch show --format=raw --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT cat <EXPECTED This is an embedded message, with a multipart/alternative part. EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=raw --part=7, inline attachment" notmuch show --format=raw --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT cat <EXPECTED This is a text attachment. EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=raw --part=8, plain text part" notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -561,7 +571,7 @@ And this message is signed. -Carl EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=raw --part=9, pgp signature (unverified)" notmuch show --format=raw --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT @@ -576,7 +586,7 @@ W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE =zkga -----END PGP SIGNATURE----- EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=raw --part=10, no part, expect error" test_expect_success "notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'" @@ -587,7 +597,7 @@ printf "From cworth@cworth.org Fri Jan 5 15:43:57 2001\n" >EXPECTED cat "${MAIL_DIR}"/multipart >>EXPECTED # mbox output is expected to include a blank line echo >>EXPECTED -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "--format=mbox --part=1, incompatible, expect error" test_expect_success "! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org'" @@ -614,7 +624,7 @@ Non-text part: text/html > > -Carl EOF -test_expect_equal_file OUTPUT EXPECTED +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "'notmuch reply' to a multipart message with json format" notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT