Bugzilla – Attachment 39178 Details for
Bug 14200
GetNormalizedISBN failing to normalize valid ISBNs in some cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14200 - Unit Tests
Bug-14200---Unit-Tests.patch (text/plain), 2.24 KB, created by
Kyle M Hall (khall)
on 2015-05-14 10:21:32 UTC
(
hide
)
Description:
Bug 14200 - Unit Tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-05-14 10:21:32 UTC
Size:
2.24 KB
patch
obsolete
>From fe0b84466c40228a0f04bbea6c33bcb2f1508303 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 14 May 2015 06:19:39 -0400 >Subject: [PATCH] Bug 14200 - Unit Tests > >--- > t/Koha.t | 14 +++++++++++++- > 1 files changed, 13 insertions(+), 1 deletions(-) > >diff --git a/t/Koha.t b/t/Koha.t >index 18dacd6..933fd5b 100755 >--- a/t/Koha.t >+++ b/t/Koha.t >@@ -18,7 +18,7 @@ > use Modern::Perl; > > use C4::Context; >-use Test::More tests => 18; >+use Test::More tests => 29; > use Test::MockModule; > use DBD::Mock; > >@@ -98,4 +98,16 @@ ok(!defined $isbn, 'NormalizeISBN returns undef when converting to ISBN10 an ISB > @isbns = GetVariationsOfISBNs('abc'); > is(scalar(@isbns), 0, 'zero variations returned of invalid ISBN'); > >+is( C4::Koha::GetNormalizedISBN('9780062059994 (hardcover bdg.) | 0062059998 (hardcover bdg.)'), '0062059998', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9780385753067 (trade) | 0385753063 (trade) | 9780385753074 (lib. bdg.) | 0385753071 (lib. bdg.)'), '0385753063', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9781432829162 (hardcover) | 1432829165 (hardcover)'), '1432829165', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9780062063625 (hardcover) | 9780062063632 | 0062063634'), '0062063626', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9780062059932 (hardback)'), '0062059939', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9780316370318 (hardback) | 9780316376266 (special edition hardcover) | 9780316405454 (international paperback edition)'), '0316370312', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9781595148032 (hbk.) | 1595148035 (hbk.)') , '1595148035', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9780062349859 | 0062349856 | 9780062391308 | 0062391305'), '0062349856', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9781250075345 (hardcover) | 1250075343 (hardcover) | 9781250049872 (trade pbk.) | 1250049873 (trade pbk.)'), '1250075343', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9781250067128 | 125006712X'), '125006712X', 'Test GetNormalizedISBN' ); >+is( C4::Koha::GetNormalizedISBN('9780373211463 | 0373211465'), '0373211465', 'Test GetNormalizedISBN' ); >+ > 1; >-- >1.7.2.5
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 14200
:
39178
|
39179
|
39197
|
39198
|
39296
|
39297