2 test_description="output of multipart message"
5 cat <<EOF > embedded_message
6 From: Carl Worth <cworth@cworth.org>
9 Date: Fri, 05 Jan 2001 15:42:57 +0000
10 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu)
11 Message-ID: <87liy5ap01.fsf@yoom.home.cworth.org>
13 Content-Type: multipart/alternative; boundary="==-=-=="
16 Content-Type: text/html
18 <p>This is an embedded message, with a multipart/alternative part.</p>
21 Content-Type: text/plain
23 This is an embedded message, with a multipart/alternative part.
28 cat <<EOF > ${MAIL_DIR}/multipart
29 From: Carl Worth <cworth@cworth.org>
31 Subject: Multipart message
32 Date: Fri, 05 Jan 2001 15:43:57 +0000
33 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu)
34 Message-ID: <87liy5ap00.fsf@yoom.home.cworth.org>
36 Content-Type: multipart/signed; boundary="==-=-=";
37 micalg=pgp-sha1; protocol="application/pgp-signature"
40 Content-Type: multipart/mixed; boundary="=-=-="
43 Content-Type: message/rfc822
44 Content-Disposition: inline
47 cat embedded_message >> ${MAIL_DIR}/multipart
48 cat <<EOF >> ${MAIL_DIR}/multipart
50 Content-Disposition: attachment; filename=attachment
52 This is a text attachment.
56 And this message is signed.
63 Content-Type: application/pgp-signature
65 -----BEGIN PGP SIGNATURE-----
66 Version: GnuPG v1.4.11 (GNU/Linux)
68 iEYEARECAAYFAk3SA/gACgkQ6JDdNq8qSWj0sACghqVJEQJUs3yV8zbTzhgnSIcD
69 W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE
71 -----END PGP SIGNATURE-----
75 cat <<EOF > ${MAIL_DIR}/base64-part-with-crlf
76 From: Carl Worth <cworth@cworth.org>
78 Subject: Test message with a BASE64 encoded binary containing CRLF pair
79 Date: Fri, 05 Jan 2001 15:43:57 +0000
80 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu)
81 Message-ID: <base64-part-with-crlf>
83 Content-Type: multipart/mixed; boundary="==-=-=";
87 The attached BASE64-encoded part expands to a binary containing a CRLF
88 pair (that is one bye of 0x0D followed by one byte of 0x0A). This is
89 designed to ensure that notmuch is not corrupting the output of this
90 part by converting the CRLF pair to an LF only (as would be appropriate
91 for display of a text part on a Linux system, for example).
93 The part should be a 3-byte file with the following sequence of 3
99 Content-Type: application/octet-stream
100 Content-Disposition: attachment; filename=crlf.bin
101 Content-Transfer-Encoding: base64
106 notmuch new > /dev/null
108 test_begin_subtest "--format=text --part=0, full message"
109 notmuch show --format=text --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
111 \fmessage{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 filename:${MAIL_DIR}/multipart
113 Carl Worth <cworth@cworth.org> (2001-01-05) (attachment inbox signed unread)
114 Subject: Multipart message
115 From: Carl Worth <cworth@cworth.org>
116 To: cworth@cworth.org
117 Date: Fri, 05 Jan 2001 15:43:57 +0000
120 \fpart{ ID: 1, Content-type: multipart/signed
121 \fpart{ ID: 2, Content-type: multipart/mixed
122 \fpart{ ID: 3, Content-type: message/rfc822
124 From: Carl Worth <cworth@cworth.org>
125 To: cworth@cworth.org
126 Subject: html message
127 Date: Fri, 05 Jan 2001 15:42:57 +0000
130 \fpart{ ID: 4, Content-type: multipart/alternative
131 \fpart{ ID: 5, Content-type: text/html
132 Non-text part: text/html
134 \fpart{ ID: 6, Content-type: text/plain
135 This is an embedded message, with a multipart/alternative part.
140 \fattachment{ ID: 7, Filename: attachment, Content-type: text/plain
141 This is a text attachment.
143 \fpart{ ID: 8, Content-type: text/plain
144 And this message is signed.
149 \fpart{ ID: 9, Content-type: application/pgp-signature
150 Non-text part: application/pgp-signature
156 test_expect_equal_file OUTPUT EXPECTED
158 test_begin_subtest "--format=text --part=1, message body"
159 notmuch show --format=text --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
161 \fpart{ ID: 1, Content-type: multipart/signed
162 \fpart{ ID: 2, Content-type: multipart/mixed
163 \fpart{ ID: 3, Content-type: message/rfc822
165 From: Carl Worth <cworth@cworth.org>
166 To: cworth@cworth.org
167 Subject: html message
168 Date: Fri, 05 Jan 2001 15:42:57 +0000
171 \fpart{ ID: 4, Content-type: multipart/alternative
172 \fpart{ ID: 5, Content-type: text/html
173 Non-text part: text/html
175 \fpart{ ID: 6, Content-type: text/plain
176 This is an embedded message, with a multipart/alternative part.
181 \fattachment{ ID: 7, Filename: attachment, Content-type: text/plain
182 This is a text attachment.
184 \fpart{ ID: 8, Content-type: text/plain
185 And this message is signed.
190 \fpart{ ID: 9, Content-type: application/pgp-signature
191 Non-text part: application/pgp-signature
195 test_expect_equal_file OUTPUT EXPECTED
197 test_begin_subtest "--format=text --part=2, multipart/mixed"
198 notmuch show --format=text --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
200 \fpart{ ID: 2, Content-type: multipart/mixed
201 \fpart{ ID: 3, Content-type: message/rfc822
203 From: Carl Worth <cworth@cworth.org>
204 To: cworth@cworth.org
205 Subject: html message
206 Date: Fri, 05 Jan 2001 15:42:57 +0000
209 \fpart{ ID: 4, Content-type: multipart/alternative
210 \fpart{ ID: 5, Content-type: text/html
211 Non-text part: text/html
213 \fpart{ ID: 6, Content-type: text/plain
214 This is an embedded message, with a multipart/alternative part.
219 \fattachment{ ID: 7, Filename: attachment, Content-type: text/plain
220 This is a text attachment.
222 \fpart{ ID: 8, Content-type: text/plain
223 And this message is signed.
229 test_expect_equal_file OUTPUT EXPECTED
231 test_begin_subtest "--format=text --part=3, rfc822 part"
232 notmuch show --format=text --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
234 \fpart{ ID: 3, Content-type: message/rfc822
236 From: Carl Worth <cworth@cworth.org>
237 To: cworth@cworth.org
238 Subject: html message
239 Date: Fri, 05 Jan 2001 15:42:57 +0000
242 \fpart{ ID: 4, Content-type: multipart/alternative
243 \fpart{ ID: 5, Content-type: text/html
244 Non-text part: text/html
246 \fpart{ ID: 6, Content-type: text/plain
247 This is an embedded message, with a multipart/alternative part.
253 test_expect_equal_file OUTPUT EXPECTED
255 test_begin_subtest "--format=text --part=4, rfc822's multipart"
256 notmuch show --format=text --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
258 \fpart{ ID: 4, Content-type: multipart/alternative
259 \fpart{ ID: 5, Content-type: text/html
260 Non-text part: text/html
262 \fpart{ ID: 6, Content-type: text/plain
263 This is an embedded message, with a multipart/alternative part.
267 test_expect_equal_file OUTPUT EXPECTED
269 test_begin_subtest "--format=text --part=5, rfc822's html part"
270 notmuch show --format=text --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
272 \fpart{ ID: 5, Content-type: text/html
273 Non-text part: text/html
276 test_expect_equal_file OUTPUT EXPECTED
278 test_begin_subtest "--format=text --part=6, rfc822's text part"
279 notmuch show --format=text --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
281 \fpart{ ID: 6, Content-type: text/plain
282 This is an embedded message, with a multipart/alternative part.
285 test_expect_equal_file OUTPUT EXPECTED
287 test_begin_subtest "--format=text --part=7, inline attachement"
288 notmuch show --format=text --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
290 \fattachment{ ID: 7, Filename: attachment, Content-type: text/plain
291 This is a text attachment.
294 test_expect_equal_file OUTPUT EXPECTED
296 test_begin_subtest "--format=text --part=8, plain text part"
297 notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
299 \fpart{ ID: 8, Content-type: text/plain
300 And this message is signed.
305 test_expect_equal_file OUTPUT EXPECTED
307 test_begin_subtest "--format=text --part=9, pgp signature (unverified)"
308 notmuch show --format=text --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
310 \fpart{ ID: 9, Content-type: application/pgp-signature
311 Non-text part: application/pgp-signature
314 test_expect_equal_file OUTPUT EXPECTED
316 test_expect_success \
317 "--format=text --part=8, no part, expect error" \
318 "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
320 test_begin_subtest "--format=json --part=0, full message"
321 notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
322 echo >>OUTPUT # expect *no* newline at end of output
325 {"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "${MAIL_DIR}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [
326 {"id": 1, "content-type": "multipart/signed", "content": [
327 {"id": 2, "content-type": "multipart/mixed", "content": [
328 {"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Subject": "html message", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
329 {"id": 4, "content-type": "multipart/alternative", "content": [
330 {"id": 5, "content-type": "text/html"},
331 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]},
332 {"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"},
333 {"id": 8, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]},
334 {"id": 9, "content-type": "application/pgp-signature"}]}]}
336 test_expect_equal_file OUTPUT EXPECTED
338 test_begin_subtest "--format=json --part=1, message body"
339 notmuch show --format=json --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
340 echo >>OUTPUT # expect *no* newline at end of output
343 {"id": 1, "content-type": "multipart/signed", "content": [
344 {"id": 2, "content-type": "multipart/mixed", "content": [
345 {"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Subject": "html message", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
346 {"id": 4, "content-type": "multipart/alternative", "content": [
347 {"id": 5, "content-type": "text/html"},
348 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]},
349 {"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"},
350 {"id": 8, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]},
351 {"id": 9, "content-type": "application/pgp-signature"}]}
353 test_expect_equal_file OUTPUT EXPECTED
355 test_begin_subtest "--format=json --part=2, multipart/mixed"
356 notmuch show --format=json --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
357 echo >>OUTPUT # expect *no* newline at end of output
360 {"id": 2, "content-type": "multipart/mixed", "content": [
361 {"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Subject": "html message", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
362 {"id": 4, "content-type": "multipart/alternative", "content": [
363 {"id": 5, "content-type": "text/html"},
364 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]},
365 {"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"},
366 {"id": 8, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}
368 test_expect_equal_file OUTPUT EXPECTED
370 test_begin_subtest "--format=json --part=3, rfc822 part"
371 notmuch show --format=json --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
372 echo >>OUTPUT # expect *no* newline at end of output
375 {"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Subject": "html message", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [
376 {"id": 4, "content-type": "multipart/alternative", "content": [
377 {"id": 5, "content-type": "text/html"},
378 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}]}]}
380 test_expect_equal_file OUTPUT EXPECTED
382 test_begin_subtest "--format=json --part=4, rfc822's multipart/alternative"
383 notmuch show --format=json --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
384 echo >>OUTPUT # expect *no* newline at end of output
387 {"id": 4, "content-type": "multipart/alternative", "content": [
388 {"id": 5, "content-type": "text/html"},
389 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}]}
391 test_expect_equal_file OUTPUT EXPECTED
393 test_begin_subtest "--format=json --part=5, rfc822's html part"
394 notmuch show --format=json --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
395 echo >>OUTPUT # expect *no* newline at end of output
398 {"id": 5, "content-type": "text/html"}
400 test_expect_equal_file OUTPUT EXPECTED
402 test_begin_subtest "--format=json --part=6, rfc822's text part"
403 notmuch show --format=json --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
404 echo >>OUTPUT # expect *no* newline at end of output
407 {"id": 6, "content-type": "text/plain", "content": "This is an embedded message, with a multipart/alternative part.\n"}
409 test_expect_equal_file OUTPUT EXPECTED
411 test_begin_subtest "--format=json --part=7, inline attachment"
412 notmuch show --format=json --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
413 echo >>OUTPUT # expect *no* newline at end of output
416 {"id": 7, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}
418 test_expect_equal_file OUTPUT EXPECTED
420 test_begin_subtest "--format=json --part=8, plain text part"
421 notmuch show --format=json --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
422 echo >>OUTPUT # expect *no* newline at end of output
425 {"id": 8, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}
427 test_expect_equal_file OUTPUT EXPECTED
429 test_begin_subtest "--format=json --part=9, pgp signature (unverified)"
430 notmuch show --format=json --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
431 echo >>OUTPUT # expect *no* newline at end of output
434 {"id": 9, "content-type": "application/pgp-signature"}
436 test_expect_equal_file OUTPUT EXPECTED
438 test_expect_success \
439 "--format=json --part=10, no part, expect error" \
440 "notmuch show --format=json --part=10 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
442 test_begin_subtest "--format=raw"
443 notmuch show --format=raw 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
444 test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
446 test_begin_subtest "--format=raw --part=0, full message"
447 notmuch show --format=raw --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
448 test_expect_equal_file OUTPUT "${MAIL_DIR}"/multipart
450 test_begin_subtest "--format=raw --part=1, message body"
451 notmuch show --format=raw --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
452 # output should *not* include newline
455 From: Carl Worth <cworth@cworth.org>
456 To: cworth@cworth.org
457 Subject: html message
458 Date: Fri, 05 Jan 2001 15:42:57 +0000
460 <p>This is an embedded message, with a multipart/alternative part.</p>
461 This is an embedded message, with a multipart/alternative part.
462 This is a text attachment.
463 And this message is signed.
466 -----BEGIN PGP SIGNATURE-----
467 Version: GnuPG v1.4.11 (GNU/Linux)
469 iEYEARECAAYFAk3SA/gACgkQ6JDdNq8qSWj0sACghqVJEQJUs3yV8zbTzhgnSIcD
470 W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE
472 -----END PGP SIGNATURE-----
474 test_expect_equal_file OUTPUT EXPECTED
476 test_begin_subtest "--format=raw --part=2, multipart/mixed"
477 notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
479 From: Carl Worth <cworth@cworth.org>
480 To: cworth@cworth.org
481 Subject: html message
482 Date: Fri, 05 Jan 2001 15:42:57 +0000
484 <p>This is an embedded message, with a multipart/alternative part.</p>
485 This is an embedded message, with a multipart/alternative part.
486 This is a text attachment.
487 And this message is signed.
491 test_expect_equal_file OUTPUT EXPECTED
493 test_begin_subtest "--format=raw --part=3, rfc822 part"
494 notmuch show --format=raw --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
495 test_expect_equal_file OUTPUT embedded_message
497 test_begin_subtest "--format=raw --part=4, rfc822's html part"
498 notmuch show --format=raw --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
500 <p>This is an embedded message, with a multipart/alternative part.</p>
501 This is an embedded message, with a multipart/alternative part.
503 test_expect_equal_file OUTPUT EXPECTED
505 test_begin_subtest "--format=raw --part=5, rfc822's html part"
506 notmuch show --format=raw --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
508 <p>This is an embedded message, with a multipart/alternative part.</p>
510 test_expect_equal_file OUTPUT EXPECTED
512 test_begin_subtest "--format=raw --part=6, rfc822's text part"
513 notmuch show --format=raw --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
515 This is an embedded message, with a multipart/alternative part.
517 test_expect_equal_file OUTPUT EXPECTED
519 test_begin_subtest "--format=raw --part=7, inline attachment"
520 notmuch show --format=raw --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
522 This is a text attachment.
524 test_expect_equal_file OUTPUT EXPECTED
526 test_begin_subtest "--format=raw --part=8, plain text part"
527 notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
529 And this message is signed.
533 test_expect_equal_file OUTPUT EXPECTED
535 test_begin_subtest "--format=raw --part=9, pgp signature (unverified)"
536 notmuch show --format=raw --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
537 # output should *not* include newline
540 -----BEGIN PGP SIGNATURE-----
541 Version: GnuPG v1.4.11 (GNU/Linux)
543 iEYEARECAAYFAk3SA/gACgkQ6JDdNq8qSWj0sACghqVJEQJUs3yV8zbTzhgnSIcD
544 W6cAmQE4dcYrx/LPLtYLZm1jsGauE5hE
546 -----END PGP SIGNATURE-----
548 test_expect_equal_file OUTPUT EXPECTED
550 test_expect_success \
551 "--format=raw --part=10, no part, expect error" \
552 "notmuch show --format=raw --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
554 test_begin_subtest "--format=mbox"
555 notmuch show --format=mbox 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
556 printf "From cworth@cworth.org Fri Jan 5 15:43:57 2001\n" >EXPECTED
557 cat "${MAIL_DIR}"/multipart >>EXPECTED
558 # mbox output is expected to include a blank line
560 test_expect_equal_file OUTPUT EXPECTED
562 test_expect_success \
563 "--format=mbox --part=1, incompatible, expect error" \
564 "! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
566 test_begin_subtest "'notmuch reply' to a multipart message"
567 notmuch reply 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
569 From: Notmuch Test Suite <test_suite@notmuchmail.org>
570 Subject: Re: Multipart message
571 To: Carl Worth <cworth@cworth.org>, cworth@cworth.org
572 In-Reply-To: <87liy5ap00.fsf@yoom.home.cworth.org>
573 References: <87liy5ap00.fsf@yoom.home.cworth.org>
575 On Fri, 05 Jan 2001 15:43:57 +0000, Carl Worth <cworth@cworth.org> wrote:
576 Non-text part: multipart/signed
577 Non-text part: multipart/mixed
578 > From: Carl Worth <cworth@cworth.org>
579 > To: cworth@cworth.org
580 > Subject: html message
581 > Date: Fri, 05 Jan 2001 15:42:57 +0000
583 Non-text part: multipart/alternative
584 Non-text part: text/html
585 > This is an embedded message, with a multipart/alternative part.
586 > This is a text attachment.
587 > And this message is signed.
590 Non-text part: application/pgp-signature
592 test_expect_equal_file OUTPUT EXPECTED
594 test_begin_subtest "'notmuch show --part' does not corrupt a part with CRLF pair"
595 notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out
596 echo -n -e "\xEF\x0D\x0A" > crlf.expected
597 test_expect_equal_file crlf.out crlf.expected