about summary refs log tree commit homepage
path: root/t/msg_iter.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-04-25 05:52:23 +0000
committerEric Wong <e@yhbt.net>2020-04-26 07:03:15 +0000
commitaa454143b1f26ffdf5f32f17c2032473d70eceae (patch)
tree5dec11537d4ee9e3ed2c0ecfb86112251024116d /t/msg_iter.t
parente39585ee2bdcbeaab7b6bd33b3568021042d0879 (diff)
downloadpublic-inbox-aa454143b1f26ffdf5f32f17c2032473d70eceae.tar.gz
mime_from_path is designed to fail gracefully in busy Maildirs
whereas mime_load was made for loading files from a work tree.
Diffstat (limited to 't/msg_iter.t')
-rw-r--r--t/msg_iter.t9
1 files changed, 2 insertions, 7 deletions
diff --git a/t/msg_iter.t b/t/msg_iter.t
index 6adbf165..5c57e043 100644
--- a/t/msg_iter.t
+++ b/t/msg_iter.t
@@ -5,7 +5,6 @@ use warnings;
 use Test::More;
 use PublicInbox::TestCommon;
 use PublicInbox::Hval qw(ascii_html);
-use PublicInbox::InboxWritable;
 use_ok('PublicInbox::MsgIter');
 
 {
@@ -34,9 +33,7 @@ use_ok('PublicInbox::MsgIter');
 }
 
 {
-        my $f = 't/iso-2202-jp.eml';
-        my $mime = PublicInbox::InboxWritable::mime_from_path($f) or
-                die "open $f: $!";
+        my $mime = mime_load 't/iso-2202-jp.eml';
         my $raw = '';
         msg_iter($mime, sub {
                 my ($part, $level, @ex) = @{$_[0]};
@@ -49,9 +46,7 @@ use_ok('PublicInbox::MsgIter');
 }
 
 {
-        my $f = 't/x-unknown-alpine.eml';
-        my $mime = PublicInbox::InboxWritable::mime_from_path($f) or
-                die "open $f: $!";
+        my $mime = mime_load 't/x-unknown-alpine.eml';
         my $raw = '';
         msg_iter($mime, sub {
                 my ($part, $level, @ex) = @{$_[0]};