From: Peter Wang <novalazy@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 4/4] test: conform to content-length fields (text)
Date: Sun, 5 Aug 2012 17:22:25 +1000 [thread overview]
Message-ID: <1344151345-25411-4-git-send-email-novalazy@gmail.com> (raw)
In-Reply-To: <1344151345-25411-1-git-send-email-novalazy@gmail.com>
Update tests to expect Content-length fields in show --format=text
output, for leaf parts with omitted body content.
---
test/crypto | 4 ++--
test/multipart | 18 +++++++++---------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/test/crypto b/test/crypto
index 4a73dcc..8dfbfa6 100755
--- a/test/crypto
+++ b/test/crypto
@@ -161,14 +161,14 @@ Date: Sat, 01 Jan 2000 12:00:00 +0000
\fheader}
\fbody{
\fpart{ ID: 1, Content-type: multipart/encrypted
-\fpart{ ID: 2, Content-type: application/pgp-encrypted
+\fpart{ ID: 2, Content-type: application/pgp-encrypted, Content-length: 11
Non-text part: application/pgp-encrypted
\fpart}
\fpart{ ID: 3, Content-type: multipart/mixed
\fpart{ ID: 4, Content-type: text/plain
This is a test encrypted message.
\fpart}
-\fattachment{ ID: 5, Filename: TESTATTACHMENT, Content-type: application/octet-stream
+\fattachment{ ID: 5, Filename: TESTATTACHMENT, Content-type: application/octet-stream, Content-length: 28
Non-text part: application/octet-stream
\fattachment}
\fpart}
diff --git a/test/multipart b/test/multipart
index 0f9e113..064e91a 100755
--- a/test/multipart
+++ b/test/multipart
@@ -129,7 +129,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
\fpart{ ID: 4, Content-type: multipart/alternative
-\fpart{ ID: 5, Content-type: text/html
+\fpart{ ID: 5, Content-type: text/html, Content-length: 71
Non-text part: text/html
\fpart}
\fpart{ ID: 6, Content-type: text/plain
@@ -147,7 +147,7 @@ And this message is signed.
-Carl
\fpart}
\fpart}
-\fpart{ ID: 9, Content-type: application/pgp-signature
+\fpart{ ID: 9, Content-type: application/pgp-signature, Content-length: 197
Non-text part: application/pgp-signature
\fpart}
\fpart}
@@ -170,7 +170,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
\fpart{ ID: 4, Content-type: multipart/alternative
-\fpart{ ID: 5, Content-type: text/html
+\fpart{ ID: 5, Content-type: text/html, Content-length: 71
Non-text part: text/html
\fpart}
\fpart{ ID: 6, Content-type: text/plain
@@ -188,7 +188,7 @@ And this message is signed.
-Carl
\fpart}
\fpart}
-\fpart{ ID: 9, Content-type: application/pgp-signature
+\fpart{ ID: 9, Content-type: application/pgp-signature, Content-length: 197
Non-text part: application/pgp-signature
\fpart}
\fpart}
@@ -208,7 +208,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
\fpart{ ID: 4, Content-type: multipart/alternative
-\fpart{ ID: 5, Content-type: text/html
+\fpart{ ID: 5, Content-type: text/html, Content-length: 71
Non-text part: text/html
\fpart}
\fpart{ ID: 6, Content-type: text/plain
@@ -241,7 +241,7 @@ Date: Fri, 05 Jan 2001 15:42:57 +0000
\fheader}
\fbody{
\fpart{ ID: 4, Content-type: multipart/alternative
-\fpart{ ID: 5, Content-type: text/html
+\fpart{ ID: 5, Content-type: text/html, Content-length: 71
Non-text part: text/html
\fpart}
\fpart{ ID: 6, Content-type: text/plain
@@ -257,7 +257,7 @@ test_begin_subtest "--format=text --part=4, rfc822's multipart"
notmuch show --format=text --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
\fpart{ ID: 4, Content-type: multipart/alternative
-\fpart{ ID: 5, Content-type: text/html
+\fpart{ ID: 5, Content-type: text/html, Content-length: 71
Non-text part: text/html
\fpart}
\fpart{ ID: 6, Content-type: text/plain
@@ -270,7 +270,7 @@ test_expect_equal_file OUTPUT EXPECTED
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
cat <<EOF >EXPECTED
-\fpart{ ID: 5, Content-type: text/html
+\fpart{ ID: 5, Content-type: text/html, Content-length: 71
Non-text part: text/html
\fpart}
EOF
@@ -308,7 +308,7 @@ test_expect_equal_file OUTPUT EXPECTED
test_begin_subtest "--format=text --part=9, pgp signature (unverified)"
notmuch show --format=text --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
cat <<EOF >EXPECTED
-\fpart{ ID: 9, Content-type: application/pgp-signature
+\fpart{ ID: 9, Content-type: application/pgp-signature, Content-length: 197
Non-text part: application/pgp-signature
\fpart}
EOF
--
1.7.4.4
next prev parent reply other threads:[~2012-08-05 7:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-05 7:22 [PATCH 1/4] show: indicate length of omitted body content (json) Peter Wang
2012-08-05 7:22 ` [PATCH 2/4] test: conform to content-length fields (json) Peter Wang
2012-08-05 7:22 ` [PATCH 3/4] show: indicate length of omitted body content (text) Peter Wang
2012-08-06 16:50 ` Austin Clements
2012-08-05 7:22 ` Peter Wang [this message]
2012-08-05 9:32 ` [PATCH 1/4] show: indicate length of omitted body content (json) Tomi Ollila
2012-08-05 21:37 ` Jameson Graef Rollins
2012-08-06 14:36 ` Peter Wang
2012-08-06 16:47 ` Austin Clements
2012-08-07 13:24 ` Peter Wang
2012-08-07 13:57 ` Austin Clements
2012-08-07 23:01 ` Mark Walters
2012-08-08 12:31 ` Peter Wang
2012-10-20 1:56 ` Ethan Glasser-Camp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344151345-25411-4-git-send-email-novalazy@gmail.com \
--to=novalazy@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).