Bugzilla – Attachment 186780 Details for
Bug 38936
Move suppressed record redirection into a sub
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38936: Remove local WARN
Bug-38936-Remove-local-WARN.patch (text/plain), 1.61 KB, created by
Jonathan Druart
on 2025-09-23 08:50:31 UTC
(
hide
)
Description:
Bug 38936: Remove local WARN
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-09-23 08:50:31 UTC
Size:
1.61 KB
patch
obsolete
>From 6e966d19a567706ba53ef252146031030cbc9dea Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38936
:
176855
|
176856
|
176857
|
178576
|
178577
|
178578
|
185249
|
185250
|
185251
|
185937
|
185938
|
185939
|
185967
|
185968
|
185969
|
186767
|
186768
|
186769
| 186780 |
187139