]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/mda_filter_rubylang.t
t/*.t: localize $SIG{__WARN__} changes
[public-inbox.git] / t / mda_filter_rubylang.t
index fec61b6887e118e1907faa156c74aa96db6f7d31..6f288b7ebbfb4075eb51cf77853a01791e18e104 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -18,7 +18,7 @@ is(system(@cfg, 'publicinboxmda.spamcheck', 'none'), 0);
 
 for my $v (qw(V1 V2)) {
        my @warn;
-       $SIG{__WARN__} = sub { push @warn, @_ };
+       local $SIG{__WARN__} = sub { push @warn, @_ };
        my $cfgpfx = "publicinbox.$v";
        my $inboxdir = "$tmpdir/$v";
        my $addr = "test-$v\@example.com";