]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/eml.t
eml: keep body if no headers are found
[public-inbox.git] / t / eml.t
diff --git a/t/eml.t b/t/eml.t
index 0cf48f225a45c50d0bb70e10acd8274525240c08..2d8993a51075f317ce11f5cc61012d55211663d6 100644 (file)
--- 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 = <<EOM;
+--- a/lib/PublicInbox/Eml.pm
++++ b/lib/PublicInbox/Eml.pm
+@@ -122,9 +122,10 @@ sub new {
+\x20
+EOM
+       my $eml = PublicInbox::Eml->new($str);
+       is($eml->body, $str, 'body-only accepted');
+}
+
 for my $cls (@classes) { # XXX: matching E::M, but not sure about this
        my $s = <<EOF;
 Content-Type: multipart/mixed; boundary="b"