check $expected $actual
# Write message with a text/plain subpart.
-msgfile=$(mhpath new)
+msgfile=`mhpath new`
cat > $msgfile <<EOF
To: recipient@example.com
From: sender@example.com
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.
# 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
# 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'
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
# 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