]> diplodocus.org Git - nmh/blobdiff - test/mhlist/test-ext-params
A more complicated RFC 2231 parsing example.
[nmh] / test / mhlist / test-ext-params
index 52ad6e99f115f43b0247d10eea36f787078e668c..a1d3bed8d8fd828b9f7a0fdf48822eff5b6be354 100755 (executable)
@@ -58,13 +58,60 @@ EOF
 
 # check to see if we decode parameters correctly.
 
-run_test 'mhlist last -noheader -verbose' \
+run_test 'mhlist last -noheader -verbose -disposition' \
 '  11       multipart/mixed            637
             boundary="----- =_aaaaaaaaaa0"
      1     text/plain                  15
             charset="us-ascii"
             name="This ïs the filename"
      2     image/jpeg                   2
+            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"
+            disposition "attachment"
+              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"'
+
+#
+# Make some more complicated message parameters.
+#
+
+msgfile=`mhpath new`
+cat > $msgfile <<EOF
+To: recipient@example.com
+From: sender@example.com
+Subject: mhlist ext param test 1
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; charset=us-ascii;
+       name*=utf-8''This%20%C3%AFs%20the%20filename
+
+This is a test
+
+------- =_aaaaaaaaaa0
+Content-Type: image/jpeg; name*3=" will it be?.jpg";
+       longparam*5*=Sp%C4%B1n%CC%88al%20Tap!;
+       longparam*2=It; name*1=if;
+       longparam*3=" Might be our Long Lost Band";
+       longparam*0*=UTF-8'en'I%20Cannot%20Believe%20It;
+       name*0="This is an example of a very long filename. I wonder ";
+       longparam*4*=%20The%20%C3%96ne%20And%20Only%20;
+       name*2=" this filename might be too long.  It should not be.  But";
+       longparam*1=", it Looks Like "
+Content-Transfer-Encoding: base64
+
+/9g=
+
+------- =_aaaaaaaaaa0--
+EOF
+
+run_test 'mhlist last -noheader -verbose' \
+'  12       multipart/mixed            647
+            boundary="----- =_aaaaaaaaaa0"
+     1     text/plain                  15
+            charset="us-ascii"
+            name="This ïs the filename"
+     2     image/jpeg                   2
+            longparam="I Cannot Believe It, it Looks Like It Might be our Long Lost Band The Öne And Only Spın̈al Tap!"
             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"'
 
 exit $failed