Bugzilla – Attachment 32732 Details for
Bug 12916
Use of uninitialized values $max and $min in C4/Tags.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12916 - Missing Test to demonstrate warnings.
PASSED-QA-Bug-12916---Missing-Test-to-demonstrate-.patch (text/plain), 1.47 KB, created by
Katrin Fischer
on 2014-10-25 13:16:07 UTC
(
hide
)
Description:
[PASSED QA] Bug 12916 - Missing Test to demonstrate warnings.
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-10-25 13:16:07 UTC
Size:
1.47 KB
patch
obsolete
>From 5f207b5659378c47fd3f82244e33d13c833adb2a Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 22 Oct 2014 15:50:08 -0400 >Subject: [PATCH] [PASSED QA] Bug 12916 - Missing Test to demonstrate warnings. > >Modifying C4/Tags.pm should have tests. > >TEST PLAN >--------- >1) Apply this test patch only. >2) prove -v t/db_dependent/Tags.t > -- should see two warnings. >3) Apply the first patch. >4) prove -v t/db_dependent/Tags.t > -- no warnings. > >Signed-off-by: Chris <chris@bigballofwax.co.nz> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Tags.t | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Tags.t b/t/db_dependent/Tags.t >index 5359e30..5612d3a 100755 >--- a/t/db_dependent/Tags.t >+++ b/t/db_dependent/Tags.t >@@ -6,16 +6,23 @@ > use strict; > use warnings; > >-use Test::More tests => 30; >+use Test::More tests => 32; > > BEGIN { > use_ok('C4::Tags'); > } > >+# Check no tags case. >+my @tagsarray; >+my $tags = \@tagsarray; >+my ($min, $max) = C4::Tags::stratify_tags(0, $tags); >+is($min, 0, 'Empty array min'); >+is($max, 0, 'Empty array max'); >+ > # Simple 'sequential 5' test >-my $tags = make_tags(1,2,3,4,5); >+$tags = make_tags(1,2,3,4,5); > my @strata = (0,1,2,3,4); >-my ($min, $max) = C4::Tags::stratify_tags(5, $tags); >+($min, $max) = C4::Tags::stratify_tags(5, $tags); > check_tag_strata($tags, \@strata, 'Sequential 5'); > is($min, 0, 'Sequential 5 min'); > is($max, 4, 'Sequential 5 max'); >-- >1.9.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 12916
:
31792
|
32590
|
32604
|
32605
|
32611
|
32612
|
32700
|
32701
| 32732 |
32733