From daab9cf0b8fcd66d1cb7f62f7ea9a8b0e32320ef Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 11 Apr 2020 10:53:29 +0000 Subject: t/*.t: localize $SIG{__WARN__} changes We don't want to propagate %SIG changes to other tests when running multiple tests within the same process via t/run.perl. --- t/mda_filter_rubylang.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/mda_filter_rubylang.t') diff --git a/t/mda_filter_rubylang.t b/t/mda_filter_rubylang.t index dbcb275b..6f288b7e 100644 --- a/t/mda_filter_rubylang.t +++ b/t/mda_filter_rubylang.t @@ -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"; -- cgit v1.2.3-24-ge0c7