]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/imapd.t
imap: fix uninitialized var on MSN search miss
[public-inbox.git] / t / imapd.t
index a464ad86058d374953a9c3bc943599fd2fa49bde..1df9d26e5dea9190a51c034978795ba4bf1a8901 100644 (file)
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -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>
 # end-to-end IMAP tests, see unit tests in t/imap.t, too
 use strict;
@@ -251,8 +251,8 @@ ok($mic->logout, 'logout works');
 
 my $have_inotify = eval { require Linux::Inotify2; 1 };
 
-my $pi_config = PublicInbox::Config->new;
-$pi_config->each_inbox(sub {
+my $pi_cfg = PublicInbox::Config->new;
+$pi_cfg->each_inbox(sub {
        my ($ibx) = @_;
        my $env = { ORIGINAL_RECIPIENT => $ibx->{-primary_address} };
        my $name = $ibx->{name};
@@ -371,11 +371,13 @@ is(scalar keys %$ret, 3, 'got all 3 messages');
 
 SKIP: {
        # do any clients use non-UID IMAP SEARCH?
-       skip 'Xapian missing', 2 if $level eq 'basic';
+       skip 'Xapian missing', 3 if $level eq 'basic';
        my $x = $mic->search('all');
        is_deeply($x, [1, 2, 3], 'MSN SEARCH works before rm');
        $x = $mic->search(qw(header subject embedded));
        is_deeply($x, [2], 'MSN SEARCH on Subject works before rm');
+       $x = $mic->search('FROM scraper@example.com');
+       is_deeply($x, [], "MSN SEARCH miss won't trigger warnings");
 }
 
 {