Lines 18-24
Link Here
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use C4::Context; |
20 |
use C4::Context; |
21 |
use Test::More tests => 18; |
21 |
use Test::More tests => 29; |
22 |
use Test::MockModule; |
22 |
use Test::MockModule; |
23 |
use DBD::Mock; |
23 |
use DBD::Mock; |
24 |
|
24 |
|
Lines 98-101
ok(!defined $isbn, 'NormalizeISBN returns undef when converting to ISBN10 an ISB
Link Here
|
98 |
@isbns = GetVariationsOfISBNs('abc'); |
98 |
@isbns = GetVariationsOfISBNs('abc'); |
99 |
is(scalar(@isbns), 0, 'zero variations returned of invalid ISBN'); |
99 |
is(scalar(@isbns), 0, 'zero variations returned of invalid ISBN'); |
100 |
|
100 |
|
|
|
101 |
is( C4::Koha::GetNormalizedISBN('9780062059994 (hardcover bdg.) | 0062059998 (hardcover bdg.)'), '0062059998', 'Test GetNormalizedISBN' ); |
102 |
is( C4::Koha::GetNormalizedISBN('9780385753067 (trade) | 0385753063 (trade) | 9780385753074 (lib. bdg.) | 0385753071 (lib. bdg.)'), '0385753063', 'Test GetNormalizedISBN' ); |
103 |
is( C4::Koha::GetNormalizedISBN('9781432829162 (hardcover) | 1432829165 (hardcover)'), '1432829165', 'Test GetNormalizedISBN' ); |
104 |
is( C4::Koha::GetNormalizedISBN('9780062063625 (hardcover) | 9780062063632 | 0062063634'), '0062063626', 'Test GetNormalizedISBN' ); |
105 |
is( C4::Koha::GetNormalizedISBN('9780062059932 (hardback)'), '0062059939', 'Test GetNormalizedISBN' ); |
106 |
is( C4::Koha::GetNormalizedISBN('9780316370318 (hardback) | 9780316376266 (special edition hardcover) | 9780316405454 (international paperback edition)'), '0316370312', 'Test GetNormalizedISBN' ); |
107 |
is( C4::Koha::GetNormalizedISBN('9781595148032 (hbk.) | 1595148035 (hbk.)') , '1595148035', 'Test GetNormalizedISBN' ); |
108 |
is( C4::Koha::GetNormalizedISBN('9780062349859 | 0062349856 | 9780062391308 | 0062391305'), '0062349856', 'Test GetNormalizedISBN' ); |
109 |
is( C4::Koha::GetNormalizedISBN('9781250075345 (hardcover) | 1250075343 (hardcover) | 9781250049872 (trade pbk.) | 1250049873 (trade pbk.)'), '1250075343', 'Test GetNormalizedISBN' ); |
110 |
is( C4::Koha::GetNormalizedISBN('9781250067128 | 125006712X'), '125006712X', 'Test GetNormalizedISBN' ); |
111 |
is( C4::Koha::GetNormalizedISBN('9780373211463 | 0373211465'), '0373211465', 'Test GetNormalizedISBN' ); |
112 |
|
101 |
1; |
113 |
1; |
102 |
- |
|
|