X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fnet_reader-imap.t;h=5de8f92b809b654af2e76753cc3b99bc585bc261;hb=21fcd8a37c82c1ef654d402cf592f0c9d803aa26;hp=694b5a37ad5c1153215e190b094e03974a30c786;hpb=fc69b9b91323c62e8abeaa8723f4d3fffdac0e27;p=public-inbox.git diff --git a/t/net_reader-imap.t b/t/net_reader-imap.t index 694b5a37..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 Mail::IMAPClient)); +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');