From 6e966d19a567706ba53ef252146031030cbc9dea Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 Sep 2025 10:50:00 +0200 Subject: [PATCH] Bug 38936: Remove local WARN We now have Test::NoWarnings --- t/db_dependent/Output.t | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/t/db_dependent/Output.t b/t/db_dependent/Output.t index 98294c29d2e..0e692a4d2da 100755 --- a/t/db_dependent/Output.t +++ b/t/db_dependent/Output.t @@ -61,24 +61,21 @@ subtest 'redirect_if_opac_suppressed() tests' => sub { subtest 'not suppressed tests' => sub { - plan tests => 2; + plan tests => 1; open STDOUT, '>', \$stdout; $opac_suppressed = 0; - my $warnings; - local $SIG{__WARN__} = sub { $warnings = shift }; redirect_if_opac_suppressed( $query, $biblio ); is( $stdout, undef, 'No redirection if the biblio is not suppressed' ); - ok( !$warnings, "safe_exit not called" ); close STDOUT; }; subtest 'suppressed tests' => sub { - plan tests => 11; + plan tests => 10; $opac_suppressed = 1; @@ -151,12 +148,9 @@ subtest 'redirect_if_opac_suppressed() tests' => sub { $ENV{REMOTE_ADDR} = '192.168.0.115'; - my $warnings; - local $SIG{__WARN__} = sub { $warnings = shift }; redirect_if_opac_suppressed( $query, $biblio ); is( $stdout, undef, 'No redirection if the IP is on the range' ); - ok( !$warnings, "safe_exit not called" ); undef $stdout; -- 2.34.1