]> diplodocus.org Git - nmh/blob - test/mhmail/test-mhmail
Allow a RRULE in an iCalendar request to not have an INTERVAL on its
[nmh] / test / mhmail / test-mhmail
1 #!/bin/sh
2 ######################################################
3 #
4 # Test mhmail
5 #
6 ######################################################
7
8 set -e
9
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir=`dirname $0`/../..
12 MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR
13 fi
14
15 . "${srcdir}/test/post/test-post-common.sh"
16
17 # Find MIME type string, using configured procs if available.
18 MIMETYPEPROC=`mhparam mimetypeproc`
19 MIMEENCODINGPROC=`mhparam mimeencodingproc`
20 content_type_string() {
21 if test -z "$MIMETYPEPROC" -o -z "$MIMEENCODINGPROC"; then
22 #### This should be the order of name and charset.
23 echo "text/plain; name=\"`basename $1`\"; charset=\"us-ascii\""
24 else
25 #### Excise any leading filename followed by : and whitespace.
26 printf '%s; charset="%s"; name="%s"' \
27 `$MIMETYPEPROC $1 | sed -e 's/.*: *//'` \
28 `$MIMEENCODINGPROC $1 | sed -e 's/.*: *//'` `basename $1`
29 fi
30 }
31
32 # Customize test_post () for use with mhmail.
33 # $1 is expected output file, provided by caller
34 # $2 is mhmail switches, except for -body
35 # $3 of -b signifies use -body switch, | signifies provide body on stdin
36 # $4 contains the message body.
37 test_mhmail ()
38 {
39 pid=`"${MH_OBJ_DIR}/test/fakesmtp" "$actual" $localport`
40
41 if [ $3 = '|' ]; then
42 printf '%s' "$4" | mhmail recipient@example.com $2 \
43 -server 127.0.0.1 -port $localport
44 else
45 mhmail recipient@example.com $2 -body "$4" \
46 -server 127.0.0.1 -port $localport
47 fi
48
49 #
50 # It's hard to calculate the exact Date: header post is going to
51 # use, so we'll just use sed to remove the actual date so we can easily
52 # compare it against our "correct" output. And same for
53 # Message-ID.
54 #
55
56 sed -e 's/^Date:.*/Date:/' \
57 -e 's/^Resent-Date:.*/Resent-Date:/' \
58 -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate
59 rm -f "$actual"
60
61 check "$actual".nodate "$1"
62 }
63
64 expected=$MH_TEST_DIR/test-mhmail$$.expected
65 expected_err=$MH_TEST_DIR/test-mhmail$$.expected_err
66 actual=$MH_TEST_DIR/test-mhmail$$.actual
67 actual_err=$MH_TEST_DIR/test-mhmail$$.actual_err
68
69
70 # check -help
71 # Verified behavior consistent with compiled sendmail.
72 cat >$expected <<EOF
73 Usage: mhmail [-t(o)] addrs ... [switches]
74 switches are:
75 -at(tach) file [-at(tach) file] ...
76 -b(ody) text
77 -c(c) addrs ...
78 -f(rom) addr
79 -hea(derfield) name:value [-hea(derfield) name:value] ...
80 -su(bject) text
81 -r(esent)
82 -pr(ofile)
83 -se(nd)
84 -nose(nd)
85 -v(ersion)
86 -hel(p)
87 and all post(8)/send(1) switches
88 mhmail with no arguments is equivalent to inc
89 EOF
90
91 mhmail -help >$actual 2>&1
92 check $expected $actual
93
94
95 # check -version
96 # Verified same behavior as compiled mhmail.
97 case `mhmail -v` in
98 mhmail\ --*) ;;
99 * ) printf '%s: mhmail -v generated unexpected output\n' "$0" >&2
100 failed=`expr ${failed:-0} + 1`;;
101 esac
102
103 # check for missing argument to switches that require them
104 for switch in attach body cc from headerfield subject to; do
105 run_test "mhmail recipient -$switch" \
106 "mhmail: missing argument to -$switch"
107 done
108 for switch in attach body cc from headerfield subject to; do
109 run_test "mhmail recipient -$switch -nosend" \
110 "mhmail: missing argument to -$switch"
111 done
112 for switch in attach body cc from headerfield subject to; do
113 run_test "mhmail recipient -$switch -server 127.0.0.1" \
114 "mhmail: missing argument to -$switch"
115 done
116
117
118 # check with no switches
119 # That will just run inc, which we don't want to do anything,
120 # so tell inc to just display its version.
121 # Verified same behavior as compiled mhmail.
122 printf 'inc: -version\n' >> $MH
123 case `mhmail` in
124 inc\ --*) ;;
125 * ) echo "$0: mhmail generated unexpected output" >&2
126 failed=`expr ${failed:-0} + 1`;;
127 esac
128
129
130 # check -nosend
131 # Not supported by compiled mhmail.
132 mhmail -nosend recipient@example.com -from sender1@localhost \
133 -server 127.0.0.1 -port $localport -body '' >"$actual" 2>"$actual_err"
134
135 cat > "$expected" <<EOF
136 To: recipient@example.com
137 From: sender1@localhost
138
139
140 EOF
141
142 cat > "$expected_err" <<EOF
143 EOF
144
145 check "$expected" "$actual"
146 check "$expected_err" "$actual_err"
147 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
148
149
150 # check -send
151 # Not supported by compiled mhmail.
152 cat > "$expected" <<EOF
153 EHLO nosuchhost.example.com
154 MAIL FROM:<sender2@localhost>
155 RCPT TO:<recipient@example.com>
156 DATA
157 To: recipient@example.com
158 From: sender2@localhost
159 Date:
160
161 message
162 .
163 QUIT
164 EOF
165
166 test_mhmail "$expected" "-from sender2@localhost -nosend -send" '|' message
167 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
168
169
170 # check -from
171 # Verified same behavior as compiled mhmail.
172 cat > "$expected" <<EOF
173 EHLO nosuchhost.example.com
174 MAIL FROM:<sender3@localhost>
175 RCPT TO:<recipient@example.com>
176 DATA
177 To: recipient@example.com
178 From: sender3@localhost
179 Date:
180
181 message
182 .
183 QUIT
184 EOF
185
186 test_mhmail "$expected" "-from sender3@localhost" '|' message
187 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
188
189
190 # check -from and -body
191 # Verified same behavior as compiled mhmail.
192 cat > "$expected" <<EOF
193 EHLO nosuchhost.example.com
194 MAIL FROM:<sender4@localhost>
195 RCPT TO:<recipient@example.com>
196 DATA
197 To: recipient@example.com
198 From: sender4@localhost
199 Date:
200
201 body
202 .
203 QUIT
204 EOF
205
206 test_mhmail "$expected" "-from sender4@localhost" -b body
207 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
208
209
210 # check -from and -cc
211 # Verified same behavior as compiled mhmail.
212 cat > "$expected" <<EOF
213 EHLO nosuchhost.example.com
214 MAIL FROM:<sender5@localhost>
215 RCPT TO:<recipient@example.com>
216 RCPT TO:<recipient2@example.com>
217 DATA
218 To: recipient@example.com
219 Cc: recipient2@example.com
220 From: sender5@localhost
221 Date:
222
223 message
224 .
225 QUIT
226 EOF
227
228 test_mhmail "$expected" \
229 "-from sender5@localhost -cc recipient2@example.com" '|' message
230 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
231
232
233 # check -from and multiple -cc addresses
234 # Verified same behavior as compiled mhmail.
235 cat > "$expected" <<EOF
236 EHLO nosuchhost.example.com
237 MAIL FROM:<sender6@localhost>
238 RCPT TO:<recipient@example.com>
239 RCPT TO:<recipient2@example.com>
240 RCPT TO:<recipient3@example.com>
241 RCPT TO:<recipient4@example.com>
242 DATA
243 To: recipient@example.com
244 Cc: recipient2@example.com, recipient3@example.com,
245 recipient4@example.com
246 From: sender6@localhost
247 Date:
248
249 message
250 .
251 QUIT
252 EOF
253
254 test_mhmail "$expected" \
255 '-from sender6@localhost -cc recipient2@example.com '\
256 'recipient3@example.com recipient4@example.com' '|' message
257 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
258
259
260 # check -from and -subject
261 # Verified same behavior as compiled mhmail.
262 cat > "$expected" <<EOF
263 EHLO nosuchhost.example.com
264 MAIL FROM:<sender7@localhost>
265 RCPT TO:<recipient@example.com>
266 DATA
267 To: recipient@example.com
268 Subject: Test
269 From: sender7@localhost
270 Date:
271
272 message
273 .
274 QUIT
275 EOF
276
277 test_mhmail "$expected" '-from sender7@localhost -subject Test' '|' message
278 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
279
280
281 # check -from and -profile
282 # Show that -profile causes mhmail to 1) read the profile and
283 # 2) use send(1) by added a send switch to the profile and
284 # verifying that it gets used.
285 # Not supported by compiled mhmail.
286 printf 'send: -msgid\n' >> $MH
287
288 cat > "$expected" <<EOF
289 EHLO nosuchhost.example.com
290 MAIL FROM:<sender8@localhost>
291 RCPT TO:<recipient@example.com>
292 DATA
293 To: recipient@example.com
294 From: sender8@localhost
295 MIME-Version: 1.0
296 Content-Type: text/plain; charset="us-ascii"
297 Date:
298 Message-ID:
299
300 message
301 .
302 QUIT
303 EOF
304
305 test_mhmail "$expected" '-from sender8@localhost -profile' '|' message
306 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
307
308
309 # check repeated -from and -subject switches
310 # Verified same behavior as compiled mhmail.
311 cat > "$expected" <<EOF
312 EHLO nosuchhost.example.com
313 MAIL FROM:<sender9@localhost>
314 RCPT TO:<recipient@example.com>
315 DATA
316 To: recipient@example.com
317 Subject: Subject2
318 From: sender9@localhost
319 Date:
320
321 message
322 .
323 QUIT
324 EOF
325
326 test_mhmail "$expected" '-from sender9@localhost -from sender9@localhost '\
327 '-subject Subject1 -subject Subject2' -b message
328 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
329
330 # check repeated -body switches
331 # Verified same behavior as compiled mhmail.
332 cat > "$expected" <<EOF
333 EHLO nosuchhost.example.com
334 MAIL FROM:<sender10@localhost>
335 RCPT TO:<recipient@example.com>
336 DATA
337 To: recipient@example.com
338 From: sender10@localhost
339 Date:
340
341 body2
342 .
343 QUIT
344 EOF
345
346 test_mhmail "$expected" "-from sender10@localhost -body body1" -b body2
347 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
348
349
350 # check multiple -cc switches
351 # Verified same behavior as compiled mhmail.
352 cat > "$expected" <<EOF
353 EHLO nosuchhost.example.com
354 MAIL FROM:<sender11@localhost>
355 RCPT TO:<recipient@example.com>
356 RCPT TO:<cc1@example.com>
357 RCPT TO:<cc2@example.com>
358 DATA
359 To: recipient@example.com
360 Cc: cc1@example.com, cc2@example.com
361 From: sender11@localhost
362 Date:
363
364 message
365 .
366 QUIT
367 EOF
368
369 test_mhmail "$expected" \
370 '-from sender11@localhost -cc cc1@example.com -cc cc2@example.com' -b message
371 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
372
373
374 # check separated -cc arguments
375 # Verified same behavior as compiled mhmail.
376 cat > "$expected" <<EOF
377 EHLO nosuchhost.example.com
378 MAIL FROM:<sender12@localhost>
379 RCPT TO:<recipient@example.com>
380 RCPT TO:<cc1@example.com>
381 RCPT TO:<cc2@example.com>
382 DATA
383 To: recipient@example.com
384 Cc: cc1@example.com, cc2@example.com
385 Subject: Test
386 From: sender12@localhost
387 Date:
388
389 message
390 .
391 QUIT
392 EOF
393
394 test_mhmail "$expected" \
395 '-from sender12@localhost -cc cc1@example.com -subject '\
396 'Test cc2@example.com' -b message
397 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
398
399
400 # check -cc switch followed by -to switch
401 # Verified same behavior as compiled mhmail.
402 cat > "$expected" <<EOF
403 EHLO nosuchhost.example.com
404 MAIL FROM:<sender13@localhost>
405 RCPT TO:<recipient@example.com>
406 RCPT TO:<recipient2@example.com>
407 RCPT TO:<cc1@example.com>
408 DATA
409 To: recipient@example.com, recipient2@example.com
410 Cc: cc1@example.com
411 Subject: Test
412 From: sender13@localhost
413 Date:
414
415 message
416 .
417 QUIT
418 EOF
419
420 test_mhmail "$expected" \
421 "-from sender13@localhost -cc cc1@example.com -subject Test \
422 -to recipient2@example.com" \
423 -b message
424 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
425
426
427 # check with no newline on stdin
428 # Shows different behavior than compiled mhmail, which was silent in this case.
429 cat > "$expected" <<EOF
430 EOF
431
432 cat > "$expected_err" <<EOF
433 mhmail: empty message not sent, use -body '' to force.
434 EOF
435
436 set +e
437 printf '' | mhmail recipient@example.com -server 127.0.0.1 -port $localport \
438 >"$actual" 2>"$actual_err"
439 set -e
440
441 check "$expected" "$actual"
442 check "$expected_err" "$actual_err"
443 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
444
445
446 # check with one newline on stdin
447 # Verified same behavior as compiled mhmail.
448 cat > "$expected" <<EOF
449 EHLO nosuchhost.example.com
450 MAIL FROM:<sender14@localhost>
451 RCPT TO:<recipient@example.com>
452 DATA
453 To: recipient@example.com
454 From: sender14@localhost
455 Date:
456
457
458 .
459 QUIT
460 EOF
461
462 test_mhmail "$expected" '-from sender14@localhost' '|' '
463 '
464 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
465
466
467 # check with multiple newlines on stdin
468 # Verified same behavior as compiled mhmail.
469 cat > "$expected" <<EOF
470 EHLO nosuchhost.example.com
471 MAIL FROM:<sender15@localhost>
472 RCPT TO:<recipient@example.com>
473 DATA
474 To: recipient@example.com
475 From: sender15@localhost
476 Date:
477
478
479
480
481 .
482 QUIT
483 EOF
484
485 test_mhmail "$expected" '-from sender15@localhost' '|' '
486
487
488 '
489 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
490
491
492 # check with text and no trailing newline on stdin
493 # Verified same behavior as compiled mhmail.
494 cat > "$expected" <<EOF
495 EHLO nosuchhost.example.com
496 MAIL FROM:<sender16@localhost>
497 RCPT TO:<recipient@example.com>
498 DATA
499 To: recipient@example.com
500 From: sender16@localhost
501 Date:
502
503 no newline in input
504 .
505 QUIT
506 EOF
507
508 test_mhmail "$expected" '-from sender16@localhost' '|' 'no newline in input'
509 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
510
511
512 # check with text and multiple trailing blank lines on stdin
513 # Verified same behavior as compiled mhmail.
514 cat > "$expected" <<EOF
515 EHLO nosuchhost.example.com
516 MAIL FROM:<sender17@localhost>
517 RCPT TO:<recipient@example.com>
518 DATA
519 To: recipient@example.com
520 From: sender17@localhost
521 Date:
522
523 here's some text
524
525
526 .
527 QUIT
528 EOF
529
530 test_mhmail "$expected" '-from sender17@localhost' '|' "here's some text
531
532
533 "
534 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
535
536
537 # check with no newline to -body
538 # Verified same behavior as compiled mhmail.
539 cat > "$expected" <<EOF
540 EHLO nosuchhost.example.com
541 MAIL FROM:<sender18@localhost>
542 RCPT TO:<recipient@example.com>
543 DATA
544 To: recipient@example.com
545 From: sender18@localhost
546 Date:
547
548
549 .
550 QUIT
551 EOF
552
553 test_mhmail "$expected" '-from sender18@localhost' -b ''
554 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
555
556
557 # check with one newline to -body
558 # Shows different behavior than compiled mhmail, which suppressed the newline.
559 cat > "$expected" <<EOF
560 EHLO nosuchhost.example.com
561 MAIL FROM:<sender19@localhost>
562 RCPT TO:<recipient@example.com>
563 DATA
564 To: recipient@example.com
565 From: sender19@localhost
566 Date:
567
568
569
570 .
571 QUIT
572 EOF
573
574 test_mhmail "$expected" '-from sender19@localhost' -b '
575 '
576 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
577
578
579 # check with multiple newlines to -body
580 # Shows different behavior than compiled mhmail, which suppressed one
581 # of the newlines.
582 cat > "$expected" <<EOF
583 EHLO nosuchhost.example.com
584 MAIL FROM:<sender20@localhost>
585 RCPT TO:<recipient@example.com>
586 DATA
587 To: recipient@example.com
588 From: sender20@localhost
589 Date:
590
591
592
593
594
595 .
596 QUIT
597 EOF
598
599 test_mhmail "$expected" '-from sender20@localhost' -b '
600
601
602 '
603 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
604
605
606 # check with text and no trailing newline to -body
607 # Verified same behavior as compiled mhmail.
608 cat > "$expected" <<EOF
609 EHLO nosuchhost.example.com
610 MAIL FROM:<sender21@localhost>
611 RCPT TO:<recipient@example.com>
612 DATA
613 To: recipient@example.com
614 From: sender21@localhost
615 Date:
616
617 no newline in input
618 .
619 QUIT
620 EOF
621
622 test_mhmail "$expected" '-from sender21@localhost' -b 'no newline in input'
623 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
624
625
626 # check with text and multiple trailing blank lines to -body
627 # Shows different behavior than compiled mhmail, which suppressed one
628 # of the newlines.
629 cat > "$expected" <<EOF
630 EHLO nosuchhost.example.com
631 MAIL FROM:<sender22@localhost>
632 RCPT TO:<recipient@example.com>
633 DATA
634 To: recipient@example.com
635 From: sender22@localhost
636 Date:
637
638 here's some text
639
640
641 .
642 QUIT
643 EOF
644
645 test_mhmail "$expected" '-from sender22@localhost' -b "here's some text
646
647 "
648 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
649
650
651 # check -resent
652 # Verified same behavior as compiled mhmail.
653 cat > "$expected" <<EOF
654 EHLO nosuchhost.example.com
655 MAIL FROM:<orig_recipient@example.com>
656 RCPT TO:<recipient@example.com>
657 DATA
658 Resent-To: recipient@example.com
659 Resent-From: orig_recipient@example.com
660 To: recipient@example.com
661 From: sender23@localhost
662 Date:
663 Resent-Date:
664
665 please resend this message, 1
666 .
667 QUIT
668 EOF
669
670 test_mhmail "$expected" '-from orig_recipient@example.com -resent' \
671 -b 'To: recipient@example.com
672 From: sender23@localhost
673 Date: Sat Jun 16 18:35:15 -0500
674
675 please resend this message, 1'
676
677 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
678
679 # check -resent -profile, using stdin
680 # Not supported by compiled mhmail.
681 cat > "$expected" <<EOF
682 EHLO nosuchhost.example.com
683 MAIL FROM:<orig_recipient@example.com>
684 RCPT TO:<recipient@example.com>
685 DATA
686 To: recipient@example.com
687 From: sender24@localhost
688 Date:
689 Resent-To: recipient@example.com
690 Resent-From: orig_recipient@example.com
691 Resent-Date:
692
693 please resend this message, 2
694 .
695 QUIT
696 EOF
697
698 test_mhmail "$expected" \
699 '-from orig_recipient@example.com -resent -profile -nomsgid' \
700 '|' 'To: recipient@example.com
701 From: sender24@localhost
702 Date: Sat Jun 16 18:35:15 -0500
703
704 please resend this message, 2'
705
706 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
707
708
709 # check -resent -profile, using -b
710 # Not supported by compiled mhmail.
711 cat > "$expected" <<EOF
712 EHLO nosuchhost.example.com
713 MAIL FROM:<orig_recipient@example.com>
714 RCPT TO:<recipient@example.com>
715 DATA
716 To: recipient@example.com
717 From: sender25@localhost
718 Date:
719 Resent-To: recipient@example.com
720 Resent-From: orig_recipient@example.com
721 Resent-Date:
722
723 please resend this message, 3
724 .
725 QUIT
726 EOF
727
728 test_mhmail "$expected" \
729 '-from orig_recipient@example.com -resent -profile -nomsgid' \
730 -b 'To: recipient@example.com
731 From: sender25@localhost
732 Date: Sat Jun 16 18:35:15 -0500
733
734 please resend this message, 3'
735
736 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
737
738
739 # check -headerfield.
740 # Not supported by compiled mhmail.
741 cat > "$expected" <<EOF
742 EHLO nosuchhost.example.com
743 MAIL FROM:<sender26@example.com>
744 RCPT TO:<recipient@example.com>
745 DATA
746 To: recipient@example.com
747 From: sender26@example.com
748 User-Agent: nmh
749 Date:
750
751 with added header field
752 .
753 QUIT
754 EOF
755
756 test_mhmail "$expected" \
757 '-from sender26@example.com -headerfield User-Agent:nmh' \
758 -b 'with added header field'
759
760 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
761
762
763 # check multiple -headerfields.
764 # Not supported by compiled mhmail.
765 cat > "$expected" <<EOF
766 EHLO nosuchhost.example.com
767 MAIL FROM:<sender27@example.com>
768 RCPT TO:<recipient@example.com>
769 DATA
770 To: recipient@example.com
771 From: sender27@example.com
772 MIME-Version: 1.0
773 Content-Type: text/plain;charset=utf-8
774 Content-Transfer-Encoding: 8bit
775 Date:
776
777 with added header fields
778 .
779 QUIT
780 EOF
781
782 test_mhmail "$expected" \
783 "-from sender27@example.com -headerfield MIME-Version:1.0 \
784 -headerfield Content-Type:text/plain;charset=utf-8 \
785 -headerfield Content-Transfer-Encoding:8bit" \
786 -b 'with added header fields'
787
788 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
789
790
791 # check -attach
792 # Not supported by compiled mhmail.
793 cat > "$expected" <<EOF
794 EHLO nosuchhost.example.com
795 MAIL FROM:<sender28@example.com>
796 RCPT TO:<recipient@example.com>
797 DATA
798 To: recipient@example.com
799 From: sender28@example.com
800 MIME-Version: 1.0
801 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
802 Date:
803 Message-ID:
804
805 ------- =_aaaaaaaaaa0
806 Content-Type: text/plain; charset="us-ascii"
807
808 See how easy it is to add an attachment!
809
810 ------- =_aaaaaaaaaa0
811 Content-Type: `content_type_string ${srcdir}/test/mhmail/attachment.txt`
812 Content-Description: attachment.txt
813 Content-Disposition: attachment; filename="attachment.txt"
814
815 The future disappears into memory, With only a moment between,
816 Forever dwells in that moment, hope is what remains to be seen
817 Forever dwells in that moment, hope is what remains to be seen.
818
819 ------- =_aaaaaaaaaa0--
820 .
821 QUIT
822 EOF
823
824 test_mhmail "$expected" \
825 "-from sender28@example.com -attach ${srcdir}/test/mhmail/attachment.txt" \
826 -b 'See how easy it is to add an attachment!'
827
828 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
829
830
831 exit ${failed:-0}