96e2418477e1653cc3896c6ad4b66882a4736484
[mmh] / test / tests / send / test-mimeify
1 #Test if MIME convertion work
2
3 . "$MH_TEST_COMMON"
4
5 draft="$MH_TEST_DIR/send-$$.draft"
6
7 profile="$MMH/profile-send"
8 cd "$MMH"
9 cat "`mhparam profile`" - >"$profile" <<!
10 default-from: Bob <bob@example.org>
11 !
12 cd - >/dev/null
13 export MMHP="$profile"
14
15 cat >"$draft" <<!
16 From: Bob <bob@example.org>
17 To: alice
18 Date: Sun, 25 Oct 2015 18:59:56 +0100
19 Subject: Test MIME
20 ----------------
21 foo
22 !
23
24 runandcheck 'send -debug "$draft" | sed "/^Content-ID/s/:.*/: <TESTID>/"' <<!
25 From: Bob <bob@example.org>
26 To: alice
27 Date: Sun, 25 Oct 2015 18:59:56 +0100
28 Subject: Test MIME
29 MIME-Version: 1.0
30 Content-Type: text/plain; charset="us-ascii"
31 Content-ID: <TESTID>
32
33 foo
34 ----EOM----
35 alice
36 !
37
38 cat >"$draft" <<!
39 From: Bob <bob@example.org>
40 To: alice
41 Date: Sun, 25 Oct 2015 18:59:56 +0100
42 Subject: Test MIME
43 MIME-Version: 1.0
44 Content-Type: text/plain; charset="us-ascii"
45 Content-ID: <TESTID>
46 ----------------
47 foo
48 !
49
50 runandcheck 'send -debug "$draft"' <<!
51 From: Bob <bob@example.org>
52 To: alice
53 Date: Sun, 25 Oct 2015 18:59:56 +0100
54 Subject: Test MIME
55 MIME-Version: 1.0
56 Content-Type: text/plain; charset="us-ascii"
57 Content-ID: <TESTID>
58
59 foo
60 ----EOM----
61 alice
62 !