From: Eric Wong Date: Fri, 1 Jul 2016 02:36:34 +0000 (+0000) Subject: t/watch_maildir: quiet down spam check warning X-Git-Tag: v1.0.0~333 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=6a167873a8b991a305a63b8718b1699e22050380 t/watch_maildir: quiet down spam check warning Probably better than bloating our own API with configurable warning streams and such... --- diff --git a/t/watch_maildir.t b/t/watch_maildir.t index 21389638..3969c80d 100644 --- a/t/watch_maildir.t +++ b/t/watch_maildir.t @@ -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);