]>
diplodocus.org Git - nmh/blob - test/mhlist/test-ext-params
2 ######################################################
4 # Test mhlist with extended parameters (RFC 2231)
6 ######################################################
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir
=`dirname $0`/..
/..
12 MH_OBJ_DIR
=`cd $srcdir && pwd`; export MH_OBJ_DIR
15 .
"$MH_OBJ_DIR/test/common.sh"
19 expected
=$MH_TEST_DIR/$$.expected
20 actual
=$MH_TEST_DIR/$$.actual
21 LC_ALL
=en_US.UTF
-8; export LC_ALL
24 # Write a message with some extended parameters
29 To: recipient@example.com
30 From: sender@example.com
31 Subject: mhlist ext param test 1
33 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
36 Content-Type: text/plain; charset=us-ascii;
37 name*=utf-8''This%20%C3%AFs%20the%20filename
42 Content-Type: image/jpeg;
43 name*0="This is an example of a very long filename. I wonder ";
45 name*2=" this filename might be too long. It should not be. But";
46 name*3=" will it be?.jpg"
47 Content-Disposition: attachment;
48 filename*0="This is an example of a very long filename. I wonder ";
50 filename*2=" this filename might be too long. It should not be. But";
51 filename*3=" will it be?.jpg"
52 Content-Transfer-Encoding: base64
56 ------- =_aaaaaaaaaa0--
59 # check to see if we decode parameters correctly.
61 run_test
'mhlist last -noheader -verbose -disposition' \
62 ' 11 multipart/mixed 637
63 boundary="----- =_aaaaaaaaaa0"
66 name="This ïs the filename"
68 name="This is an example of a very long filename. I wonder if this filename might be too long. It should not be. But will it be?.jpg"
69 disposition "attachment"
70 filename="This is an example of a very long filename. I wonder if this filename might be too long. It should not be. But will it be?.jpg"'
73 # Make some more complicated message parameters.
78 To: recipient@example.com
79 From: sender@example.com
80 Subject: mhlist ext param test 2
82 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
85 Content-Type: text/plain; charset=us-ascii;
86 name*=utf-8''This%20%C3%AFs%20the%20filename
91 Content-Type: image/jpeg; name*3=" will it be?.jpg";
92 longparam*5*=Sp%C4%B1n%CC%88al%20Tap!;
93 longparam*2=It; name*1=if;
94 longparam*3=" Might be our Long Lost Band";
95 longparam*0*=UTF-8'en'I%20Cannot%20Believe%20It;
96 name*0="This is an example of a very long filename. I wonder ";
97 longparam*4*=%20The%20%C3%96ne%20And%20Only%20;
98 name*2=" this filename might be too long. It should not be. But";
99 longparam*1=", it Looks Like "
100 Content-Transfer-Encoding: base64
104 ------- =_aaaaaaaaaa0--
107 run_test
'mhlist last -noheader -verbose' \
108 ' 12 multipart/mixed 647
109 boundary="----- =_aaaaaaaaaa0"
112 name="This ïs the filename"
114 longparam="I Cannot Believe It, it Looks Like It Might be our Long Lost Band The Öne And Only Spın̈al Tap!"
115 name="This is an example of a very long filename. I wonder if this filename might be too long. It should not be. But will it be?.jpg"'
118 # Test out message/external-body types, and also make sure we will correctly
119 # decode a URL wrapped with RFC 2017 rules.
124 To: recipient@example.com
125 From: sender@example.com
126 Subject: mhlist ext param test 3
128 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
130 ------- =_aaaaaaaaaa0
131 Content-Type: text/plain; charset=us-ascii;
132 name*=utf-8''This%20%C3%AFs%20the%20filename
136 ------- =_aaaaaaaaaa0
137 Content-Type: message/external-body; access-type="url";
138 url*1="/that/should-be-wrapped/image.jpeg";
139 url*0="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url"
141 Content-Type: image/jpeg
142 Content-Description: Test of a long URL
143 Content-Disposition: attachment; filename=image.jpeg
145 ------- =_aaaaaaaaaa0
146 Content-Type: message/external-body; access-type="url";
147 url*0="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url
148 /that/should-be-wrapped/image.jpeg"
150 Content-Type: image/jpeg
151 Content-Description: Test of a long URL
152 Content-Disposition: attachment; filename=image.jpeg
154 ------- =_aaaaaaaaaa0--
157 run_test
'mhlist last -noheader -verbose -disposition' \
158 ' 13 multipart/mixed 775
159 boundary="----- =_aaaaaaaaaa0"
162 name="This ïs the filename"
163 2 message/external-body 118
165 url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
166 url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
168 image/jpeg Test of a long URL
169 disposition "attachment"
170 filename="image.jpeg"
171 3 message/external-body 118
173 url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url /that/should-be-wrapped/image.jpeg"
174 url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
176 image/jpeg Test of a long URL
177 disposition "attachment"
178 filename="image.jpeg"'