]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/eml.t
confine Email::MIME use even further
[public-inbox.git] / t / eml.t
diff --git a/t/eml.t b/t/eml.t
index b7f58ac706965b289b03e1d627a4acb7dc6f3113..1892b00123528a4f56d21d76e64b55322007a243 100644 (file)
--- a/t/eml.t
+++ b/t/eml.t
@@ -12,6 +12,12 @@ SKIP: {
 };
 use_ok $_ for @classes;
 
+sub mime_load ($) {
+       my ($path) = @_;
+       open(my $fh, '<', $path) or die "open $path: $!";
+       PublicInbox::MIME->new(\(do { local $/; <$fh> }));
+}
+
 {
        my $eml = PublicInbox::Eml->new(\(my $str = "a: b\n\nhi\n"));
        is($str, "hi\n", '->new modified body like Email::Simple');