]>
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 1
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"'