]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/mbox_reader.t
update copyrights for 2021
[public-inbox.git] / t / mbox_reader.t
index 9391dc2480717a7642e4f37f2608a47d2efdb110..53458ec2fb2095763c5f2c0e6301d3d16eb037b4 100644 (file)
@@ -1,5 +1,5 @@
 #!perl -w
-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use v5.10.1;
@@ -32,7 +32,6 @@ if ($ENV{TEST_EXTRA}) {
 }
 
 my $reader = PublicInbox::MboxReader->new;
-my $write_in_full = PublicInbox::LeiToMail->can('write_in_full');
 my $check_fmt = sub {
        my $fmt = shift;
        my @order = shuffle(keys %raw);
@@ -41,7 +40,7 @@ my $check_fmt = sub {
        for my $k (@order) {
                my $eml = PublicInbox::Eml->new($raw{$k});
                my $buf = $eml2mbox->($eml);
-               $write_in_full->($fh, $buf, undef);
+               print $fh $$buf or BAIL_OUT "print $!";
        }
        seek($fh, 0, SEEK_SET) or BAIL_OUT "seek: $!";
        $reader->$fmt($fh, sub {