Fixed mhlist -verbose to work with all content types [Bug #35219].
[mmh] / test / mhlist / test-mhlist
index 91748b1..c1bac06 100755 (executable)
@@ -102,7 +102,7 @@ Content-Transfer-Encoding: quoted-printable
 This is the second text/plain part.
 
 ------- =_aaaaaaaaaa0
-Content-Type: text/plain; charset="iso-8859-1"
+Content-Type: text/plain; charset="iso-8859-1"; name="test3"
 Content-Disposition: attachment; filename="test3"
 
 This is the third text/plain part.
@@ -119,19 +119,19 @@ EOF
 
 # check -part
 run_test 'mhlist last -part 3 -noheader' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      3     text/plain                  35'
 
 # check -part of a subpart
 run_test 'mhlist last -part 1.1 -noheader' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      1.1   text/plain                  49'
 
 # check -type
 run_test 'mhlist last -type text/plain -noheader' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      1.1   text/plain                  49
      2     text/plain                  36
@@ -140,19 +140,19 @@ run_test 'mhlist last -type text/plain -noheader' \
 
 # check -norealsize
 run_test 'mhlist last -part 4 -noheader -norealsize' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      4     text/plain                  49'
 
 # check -realsize, the default
 run_test 'mhlist last -part 4 -noheader -norealsize -realsize' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      4     text/plain                  36'
 
 # check -check
 run_test 'mhlist last -part 2 -noheader -check' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      2     text/plain                  36'
 
@@ -160,7 +160,7 @@ run_test 'mhlist last -part 2 -noheader -check' \
 sed 's/\(Content-MD5: \)kq+Hnc/\1BADBAD/' $msgfile > $MH_TEST_DIR/$$.tmp
 mv -f $MH_TEST_DIR/$$.tmp $msgfile
 run_test 'mhlist last -part 2 -noheader -check' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      2     text/plain                  36
 mhlist: content integrity suspect (digest mismatch) -- continuing
@@ -168,8 +168,26 @@ mhlist: content integrity suspect (digest mismatch) -- continuing
 
 # check -nocheck, the default
 run_test 'mhlist last -part 2 -noheader -check -nocheck' \
-'  11       multipart/mixed            922
+'  11       multipart/mixed            936
      1     multipart/related          180
      2     text/plain                  36'
 
+# check -verbose
+run_test 'mhlist 11 -verbose -noheader' \
+'  11       multipart/mixed            936
+            boundary="----- =_aaaaaaaaaa0"
+     1     multipart/related          180
+            type="multipart/alternative"
+            boundary="subpart__1.1"
+     1.1   text/plain                  49
+            charset="iso-8859-1"
+     2     text/plain                  36
+            charset="iso-8859-1"
+     3     text/plain                  35
+            charset="iso-8859-1"
+            name="test3"
+     4     text/plain                  36
+            charset="iso-8859-1"'
+
+
 exit $failed