X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fmsg_iter.t;h=e8115e2584c7ba7a0ccf58fab7511a123e490eb0;hb=453dee4881a9c764b09d33f3a827879f2cd3669d;hp=6adbf165b0713268cfb87bf73c9b7b9d7c45d1a9;hpb=e39585ee2bdcbeaab7b6bd33b3568021042d0879;p=public-inbox.git diff --git a/t/msg_iter.t b/t/msg_iter.t index 6adbf165..e8115e25 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'); { @@ -29,14 +28,12 @@ use_ok('PublicInbox::MsgIter'); $s =~ s/\s+//s; push @parts, [ $s, $level, @ex ]; }); - is_deeply(\@parts, [ [qw(a 2 1 1)], [qw(b 2 1 2)], [qw(sig 1 2)] ], + is_deeply(\@parts, [ [qw(a 2 1.1)], [qw(b 2 1.2)], [qw(sig 1 2)] ], 'nested part shows up properly'); } { - 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]};