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
printf ("\n");
- /*
- * If verbose, print any RFC-822 comments in the
- * Content-Type line.
- */
- if (verbose && ci->ci_comment) {
- char *dp;
+ if (verbose) {
+ char **ap, **ep;
+ CI ci = &ct->c_ctinfo;
- dp = trimcpy (cp = add (ci->ci_comment, NULL));
- free (cp);
- snprintf (buffer, sizeof(buffer), "(%s)", dp);
- free (dp);
- printf (LSTFMT2d2, buffer);
+ for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++)
+ printf ("\t %s=\"%s\"\n", *ap, *ep);
+
+ /*
+ * If verbose, print any RFC-822 comments in the
+ * Content-Type line.
+ */
+ if (ci->ci_comment) {
+ char *dp;
+
+ dp = trimcpy (cp = add (ci->ci_comment, NULL));
+ free (cp);
+ snprintf (buffer, sizeof(buffer), "(%s)", dp);
+ free (dp);
+ printf (LSTFMT2d2, buffer);
+ }
}
if (debug)
/*
* list content information for type "application"
+ * This no longer needs to be a separate function. It used to
+ * produce some output with verbose enabled, but that has been
+ * moved to list_content ().
*/
static int
list_application (CT ct, int toplevel, int realsize, int verbose, int debug)
{
list_content (ct, toplevel, realsize, verbose, debug);
- if (verbose) {
- char **ap, **ep;
- CI ci = &ct->c_ctinfo;
-
- for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++)
- printf ("\t %s=\"%s\"\n", *ap, *ep);
- }
return OK;
}