X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Feml.t;h=2e6a441f51dc71b85bbb37fcff318f6f2bb88e47;hb=a002384a74382df2649d6a1f8dfba4f291af032e;hp=0cf48f225a45c50d0bb70e10acd8274525240c08;hpb=b6829bbfd86f5d22a8ffb80fd7bfe59299fe6b55;p=public-inbox.git diff --git a/t/eml.t b/t/eml.t index 0cf48f22..2e6a441f 100644 --- a/t/eml.t +++ b/t/eml.t @@ -216,6 +216,17 @@ if ('one newline before headers') { is($eml->body, ""); } +if ('body only') { + my $str = <new($str); + is($eml->body, $str, 'body-only accepted'); +} + for my $cls (@classes) { # XXX: matching E::M, but not sure about this my $s = <new($s)->filename, 'vtpm-makefile.patch', 'filename decoded'); + is($cls->new($s)->filename, 'vtpm-makefile.patch', + "filename decoded ($cls)") if $cls ne 'PublicInbox::MIME'; $s =~ s/^Content-Disposition:.*$//sm; is($cls->new($s)->filename, 'vtpm-fakefile.patch', "filename fallback ($cls)") if $cls ne 'PublicInbox::MIME'; is($cls->new($s)->content_type, 'text/x-patch; name="vtpm-fakefile.patch"', - 'matches Email::MIME output, "correct" or not'); + qq[matches Email::MIME output, "correct" or not ($cls)]); $s = <<'EOF'; Content-Type: multipart/foo; boundary=b