]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/watch_maildir: quiet down spam check warning
authorEric Wong <e@80x24.org>
Fri, 1 Jul 2016 02:36:34 +0000 (02:36 +0000)
committerEric Wong <e@80x24.org>
Fri, 1 Jul 2016 02:36:34 +0000 (02:36 +0000)
Probably better than bloating our own API with configurable
warning streams and such...

t/watch_maildir.t

index 213896385d7e59622059dbf8fc88db7d7bdac67d..3969c80d6ce6171720891b02f4fd7f4662302acb 100644 (file)
@@ -94,7 +94,10 @@ More majordomo info at  http://vger.kernel.org/majordomo-info.html\n);
        local $ENV{PATH} = $fail_path;
        PublicInbox::Emergency->new($maildir)->prepare(\$msg);
        $config->{'publicinboxwatch.spamcheck'} = 'spamc';
-       PublicInbox::WatchMaildir->new($config)->scan;
+       {
+               local $SIG{__WARN__} = sub {}; # quiet spam check warning
+               PublicInbox::WatchMaildir->new($config)->scan;
+       }
        @list = $git->qx(qw(ls-tree -r --name-only refs/heads/master));
        is(scalar @list, 0, 'tree has no files spamc checked');
        is(unlink(glob("$maildir/new/*")), 1);