X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fwatch_maildir_v2.t;h=6cc8b6ff0e9a1c62baeaadc8d4943dad43a34f94;hb=b2b1006759730507731fcd3fc3e0de68239e3b92;hp=db407f78e2e95d9fae7a16df20c66a9d75d7648b;hpb=a09f678d8254064af7ca6dcfb3c3f84b5ae37b51;p=public-inbox.git diff --git a/t/watch_maildir_v2.t b/t/watch_maildir_v2.t index db407f78..6cc8b6ff 100644 --- a/t/watch_maildir_v2.t +++ b/t/watch_maildir_v2.t @@ -1,13 +1,14 @@ -# Copyright (C) 2018-2019 all contributors +# Copyright (C) 2018-2020 all contributors # License: AGPL-3.0+ use strict; use Test::More; -use PublicInbox::MIME; +use PublicInbox::Eml; use Cwd; use PublicInbox::Config; use PublicInbox::TestCommon; +use PublicInbox::Import; require_git(2.6); -require_mods(qw(Search::Xapian DBD::SQLite Filesys::Notify::Simple)); +require_mods(qw(Search::Xapian DBD::SQLite)); require PublicInbox::V2Writable; my ($tmpdir, $for_destroy) = tmpdir(); my $inboxdir = "$tmpdir/v2"; @@ -125,7 +126,7 @@ More majordomo info at http://vger.kernel.org/majordomo-info.html\n); { my $patch = 't/data/0001.patch'; open my $fh, '<', $patch or die "failed to open $patch: $!\n"; - $msg = eval { local $/; <$fh> }; + $msg = do { local $/; <$fh> }; PublicInbox::Emergency->new($maildir)->prepare(\$msg); PublicInbox::WatchMaildir->new($config)->scan('full'); my ($nr, $msgs) = $srch->reopen->query('dfpost:6e006fd7'); @@ -141,7 +142,7 @@ More majordomo info at http://vger.kernel.org/majordomo-info.html\n); my $v1repo = "$tmpdir/v1"; my $v1pfx = "publicinbox.v1"; my $v1addr = 'v1-public@example.com'; - is(system(qw(git init -q --bare), $v1repo), 0, 'v1 init OK'); + PublicInbox::Import::init_bare($v1repo); my $cfg2 = <