Lines 1-9
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
2 |
use strict; |
2 |
|
3 |
use warnings; |
3 |
# This file is part of Koha. |
|
|
4 |
# |
5 |
# Koha is free software; you can redistribute it and/or modify it |
6 |
# under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 3 of the License, or |
8 |
# (at your option) any later version. |
9 |
# |
10 |
# Koha is distributed in the hope that it will be useful, but |
11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
14 |
# |
15 |
# You should have received a copy of the GNU General Public License |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
17 |
|
18 |
use Modern::Perl; |
4 |
|
19 |
|
5 |
use C4::Context; |
20 |
use C4::Context; |
6 |
use Test::More tests => 16; |
21 |
use Test::More tests => 18; |
7 |
use Test::MockModule; |
22 |
use Test::MockModule; |
8 |
use DBD::Mock; |
23 |
use DBD::Mock; |
9 |
|
24 |
|
Lines 74-78
eval {
Link Here
|
74 |
}; |
89 |
}; |
75 |
ok($@ eq '', 'NormalizeISBN does not throw exception when parsing invalid ISBN (bug 12243)'); |
90 |
ok($@ eq '', 'NormalizeISBN does not throw exception when parsing invalid ISBN (bug 12243)'); |
76 |
|
91 |
|
|
|
92 |
eval { |
93 |
$isbn = C4::Koha::NormalizeISBN({ isbn => '979-10-90085-00-8', format => 'ISBN-10', strip_hyphens => 1 }); |
94 |
}; |
95 |
ok($@ eq '', 'NormalizeISBN does not throw exception when converting to ISBN10 an ISBN starting with 979 (bug 13167)'); |
96 |
ok(!defined $isbn, 'NormalizeISBN returns undef when converting to ISBN10 an ISBN starting with 979 (bug 13167)'); |
97 |
|
77 |
@isbns = GetVariationsOfISBNs('abc'); |
98 |
@isbns = GetVariationsOfISBNs('abc'); |
78 |
is(scalar(@isbns), 0, 'zero variations returned of invalid ISBN'); |
99 |
is(scalar(@isbns), 0, 'zero variations returned of invalid ISBN'); |
79 |
- |
100 |
|
|
|
101 |
1; |