X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fnet_reader-imap.t;h=5de8f92b809b654af2e76753cc3b99bc585bc261;hb=4eee5af6011cc8cdefb66c9729952c7eff5c0b0b;hp=eea8b0fd8711616ec058e530d16719d332763841;hpb=63283ae1b51203c930332e6887296cb123e5db6c;p=public-inbox.git diff --git a/t/net_reader-imap.t b/t/net_reader-imap.t index eea8b0fd..5de8f92b 100644 --- a/t/net_reader-imap.t +++ b/t/net_reader-imap.t @@ -3,7 +3,8 @@ # License: AGPL-3.0+ use strict; use v5.10.1; use PublicInbox::TestCommon; require_git 2.6; -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(-imapd Search::Xapian Mail::IMAPClient)); +use PublicInbox::Config; my ($tmpdir, $for_destroy) = tmpdir; my ($ro_home, $cfg_path) = setup_public_inboxes; my $cmd = [ '-imapd', '-W0', "--stdout=$tmpdir/1", "--stderr=$tmpdir/2" ]; @@ -32,7 +33,9 @@ is(scalar(@w), 0, 'no warnings'); ok($nr, 'got some emails'); is($eml{'PublicInbox::Eml'}, $nr, 'got expected Eml objects'); is(scalar keys %eml, 1, 'only got Eml objects'); -is($urls{$url}, $nr, 'one URL expected number of times'); +is(scalar(grep(/\A\Q$url\E;UIDVALIDITY=\d+\z/, keys %urls)), scalar(keys %urls), + 'UIDVALIDITY added to URL passed to callback'); +is_deeply([values %urls], [$nr], 'one URL expected number of times'); is(scalar keys %urls, 1, 'only got one URL'); is($args{blah}, $nr, 'got arg expected number of times'); is(scalar keys %args, 1, 'only got one arg');