]>
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 require_locale en_US.UTF
-8 en_US.UTF8 en_US.utf
-8 en_US.utf8
21 expected
=$MH_TEST_DIR/$$.expected
22 actual
=$MH_TEST_DIR/$$.actual
25 # Write a message with some extended parameters
30 To: recipient@example.com
31 From: sender@example.com
32 Subject: mhlist ext param test 1
34 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
37 Content-Type: text/plain; charset=us-ascii;
38 name*=utf-8''This%20%C3%AFs%20the%20filename
43 Content-Type: image/jpeg;
44 name*0="This is an example of a very long filename. I wonder ";
46 name*2=" this filename might be too long. It should not be. But";
47 name*3=" will it be?.jpg"
48 Content-Disposition: attachment;
49 filename*0="This is an example of a very long filename. I wonder ";
51 filename*2=" this filename might be too long. It should not be. But";
52 filename*3=" will it be?.jpg"
53 Content-Transfer-Encoding: base64
57 ------- =_aaaaaaaaaa0--
60 # check to see if we decode parameters correctly.
62 run_test
'mhlist last -noheader -verbose -disposition' \
63 ' 11 multipart/mixed 637
64 boundary="----- =_aaaaaaaaaa0"
67 name="This ïs the filename"
69 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"
70 disposition "attachment"
71 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"'
74 # Make some more complicated message parameters.
79 To: recipient@example.com
80 From: sender@example.com
81 Subject: mhlist ext param test 2
83 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
86 Content-Type: text/plain; charset=us-ascii;
87 name*=utf-8''This%20%C3%AFs%20the%20filename
92 Content-Type: image/jpeg; name*3=" will it be?.jpg";
93 longparam*5*=Sp%C4%B1n%CC%88al%20Tap!;
94 longparam*2=It; name*1=if;
95 longparam*3=" Might be our Long Lost Band";
96 longparam*0*=UTF-8'en'I%20Cannot%20Believe%20It;
97 name*0="This is an example of a very long filename. I wonder ";
98 longparam*4*=%20The%20%C3%96ne%20And%20Only%20;
99 name*2=" this filename might be too long. It should not be. But";
100 longparam*1=", it Looks Like "
101 Content-Transfer-Encoding: base64
105 ------- =_aaaaaaaaaa0--
108 run_test
'mhlist last -noheader -verbose' \
109 ' 12 multipart/mixed 647
110 boundary="----- =_aaaaaaaaaa0"
113 name="This ïs the filename"
115 longparam="I Cannot Believe It, it Looks Like It Might be our Long Lost Band The Öne And Only Spın̈al Tap!"
116 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"'
119 # Test out message/external-body types, and also make sure we will correctly
120 # decode a URL wrapped with RFC 2017 rules.
125 To: recipient@example.com
126 From: sender@example.com
127 Subject: mhlist ext param test 3
129 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
131 ------- =_aaaaaaaaaa0
132 Content-Type: text/plain; charset=us-ascii;
133 name*=utf-8''This%20%C3%AFs%20the%20filename
137 ------- =_aaaaaaaaaa0
138 Content-Type: message/external-body; access-type="url";
139 url*1="/that/should-be-wrapped/image.jpeg";
140 url*0="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url"
142 Content-Type: image/jpeg
143 Content-Description: Test of a long URL
144 Content-Disposition: attachment; filename=image.jpeg
146 ------- =_aaaaaaaaaa0
147 Content-Type: message/external-body; access-type="url";
148 url*0="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url
149 /that/should-be-wrapped/image.jpeg"
151 Content-Type: image/jpeg
152 Content-Description: Test of a long URL
153 Content-Disposition: attachment; filename=image.jpeg
155 ------- =_aaaaaaaaaa0--
158 run_test
'mhlist last -noheader -verbose -disposition' \
159 ' 13 multipart/mixed 775
160 boundary="----- =_aaaaaaaaaa0"
163 name="This ïs the filename"
164 2 message/external-body 118
166 url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url/that/should-be-wrapped/image.jpeg"
167 image/jpeg Test of a long URL
168 disposition "attachment"
169 filename="image.jpeg"
170 3 message/external-body 118
172 url="http://www.kremvax.ru/this/is/an/example/of/a/very/long/url /that/should-be-wrapped/image.jpeg"
173 image/jpeg Test of a long URL
174 disposition "attachment"
175 filename="image.jpeg"'