]>
diplodocus.org Git - nmh/blob - test/mhshow/test-subpart
2 ######################################################
4 # Test show of one part, fixed by
5 # 31cba404636730df219dd009ca5893ccc56d46af
7 ######################################################
11 if test -z "${MH_OBJ_DIR}"; then
12 srcdir
=`dirname "$0"`/..
/..
13 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
16 .
"$MH_OBJ_DIR/test/common.sh"
20 expected
=$MH_TEST_DIR/$$.expected
21 actual
=$MH_TEST_DIR/$$.actual
23 # Write message with a text/plain subpart.
25 msgnum
=`basename $msgfile`
28 Content-Type: multipart/mixed; boundary="NextPart_001"
29 Content-class: urn:content-classes:message
30 Date: Thu, 19 May 2011 00:00:00 -0000
31 From: sender@example.com
32 To: recipient@example.com
34 This is a multi-part message in MIME format.
37 Content-Type: multipart/related;
38 type="multipart/alternative";
39 boundary="NextPart_002"
42 Content-Type: text/plain;
45 This is the text/plain part.
52 # Write the expected output.
54 [ part 1.1 - text/plain - 29B ]
55 This is the text/plain part.
59 run_prog mhshow
-part 1.1 -form mhl.null
$msgnum > $actual 2>&1
60 check
"$expected" "$actual"
63 To: example@example.org
64 From: someone <someone@example.com>
65 Subject: mhshow -part/-type/prefer test
66 Date: Thu, 29 Jan 2015 18:12:21 +0000 (GMT)
67 Content-Type: multipart/mixed; boundary="BoundaryMixed"
70 Content-type: multipart/alternative;
71 boundary="BoundaryAlternative1"
73 --BoundaryAlternative1
74 Content-type: text/plain; charset=ISO-8859-1; format=flowed
75 Content-transfer-encoding: 8bit
77 This is the body text/plain part.
78 --BoundaryAlternative1
79 Content-type: multipart/related;
80 boundary="BoundaryAlternative2"; type="text/html"
82 --BoundaryAlternative2
83 Content-type: text/html; CHARSET=US-ASCII
84 Content-transfer-encoding: quoted-printable
86 <html><body><div><span style=3D"line-height: 1.5;">
87 This is the text/html body part.
88 </span></div></body></html>
90 --BoundaryAlternative2--
92 --BoundaryAlternative1--
95 Content-Type: text/plain; charset="us-ascii"
97 Content-Transfer-Encoding: 7bit
98 Content-Disposition: inline
100 _______________________________________________
101 This is the final text/plain signature part.
106 # Write the expected output.
107 cat > $expected <<EOF
108 [ part 1.1.1 - text/html - 111B ]
109 This is the text/html body part.
113 run_prog mhshow
-part 1.1.1 -form mhl.null
$msgnum > $actual 2>&1
114 check
"$expected" "$actual"
116 # Write the expected output.
117 cat > $expected <<EOF
118 [ part 1.2 - text/plain - 33B ]
119 This is the body text/plain part.
123 run_prog mhshow
-part 1.2 -form mhl.null
$msgnum > $actual 2>&1
124 check
"$expected" "$actual"
126 # Write the expected output.
127 cat > $expected <<EOF
128 [ part 1.1 - text/plain - 33B ]
129 This is the body text/plain part.
133 run_prog mhshow
-prefer text
/plain
-part 1 -form mhl.null
$msgnum > $actual 2>&1
134 check
"$expected" "$actual"
136 # Write the expected output.
137 cat > $expected <<EOF
138 [ part 2 - text/plain - 93B ]
139 _______________________________________________
140 This is the final text/plain signature part.
144 run_prog mhshow
-part 2 -form mhl.null
$msgnum > $actual 2>&1
145 check
"$expected" "$actual"
147 # Write the expected output.
148 cat > $expected <<EOF
149 [ part 1.2 - text/plain - 33B ]
150 This is the body text/plain part.
151 [ part 2 - text/plain - 93B ]
152 _______________________________________________
153 This is the final text/plain signature part.
157 run_prog mhshow
-type text
/plain
-form mhl.null
$msgnum > $actual 2>&1
158 check
"$expected" "$actual"
160 # Write the expected output.
161 cat > $expected <<EOF
162 [ part 1.1 - text/plain - 33B ]
163 This is the body text/plain part.
164 [ part 2 - text/plain - 93B ]
165 _______________________________________________
166 This is the final text/plain signature part.
169 run_prog mhshow
-prefer text
/plain
-form mhl.null
$msgnum > $actual 2>&1
170 check
"$expected" "$actual"