|
Lines 25-31
use Module::Load::Conditional qw/check_install/;
Link Here
|
| 25 |
|
25 |
|
| 26 |
BEGIN { |
26 |
BEGIN { |
| 27 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
27 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
| 28 |
plan tests => 34; |
28 |
plan tests => 36; |
| 29 |
} else { |
29 |
} else { |
| 30 |
plan skip_all => "Need Test::DBIx::Class" |
30 |
plan skip_all => "Need Test::DBIx::Class" |
| 31 |
} |
31 |
} |
|
Lines 119-124
is( C4::Koha::GetNormalizedISBN('9781250075345 (hardcover) | 1250075343 (hardcov
Link Here
|
| 119 |
is( C4::Koha::GetNormalizedISBN('9781250067128 | 125006712X'), '125006712X', 'Test GetNormalizedISBN' ); |
119 |
is( C4::Koha::GetNormalizedISBN('9781250067128 | 125006712X'), '125006712X', 'Test GetNormalizedISBN' ); |
| 120 |
is( C4::Koha::GetNormalizedISBN('9780373211463 | 0373211465'), '0373211465', 'Test GetNormalizedISBN' ); |
120 |
is( C4::Koha::GetNormalizedISBN('9780373211463 | 0373211465'), '0373211465', 'Test GetNormalizedISBN' ); |
| 121 |
|
121 |
|
|
|
122 |
<<<<<<< HEAD |
| 122 |
is( C4::Koha::GetNormalizedUPC(), undef, 'GetNormalizedUPC should return undef if no record is passed' ); |
123 |
is( C4::Koha::GetNormalizedUPC(), undef, 'GetNormalizedUPC should return undef if no record is passed' ); |
| 123 |
is( C4::Koha::GetNormalizedISBN(), undef, 'GetNormalizedISBN should return undef if no record and no isbn are passed' ); |
124 |
is( C4::Koha::GetNormalizedISBN(), undef, 'GetNormalizedISBN should return undef if no record and no isbn are passed' ); |
| 124 |
is( C4::Koha::GetNormalizedEAN(), undef, 'GetNormalizedEAN should return undef if no record and no isbn are passed' ); |
125 |
is( C4::Koha::GetNormalizedEAN(), undef, 'GetNormalizedEAN should return undef if no record and no isbn are passed' ); |
|
Lines 149-153
subtest 'getFacets() tests' => sub {
Link Here
|
| 149 |
'location facet present with singleBranchMode off (bug 10078)' |
150 |
'location facet present with singleBranchMode off (bug 10078)' |
| 150 |
); |
151 |
); |
| 151 |
}; |
152 |
}; |
|
|
153 |
======= |
| 154 |
|
| 155 |
is(C4::Koha::NormalizeISSN({ issn => '0024-9319', strip_hyphen => 1 }), '00249319', 'Test NormalizeISSN with all features enabled' ); |
| 156 |
is(C4::Koha::NormalizeISSN({ issn => '0024-9319', strip_hyphen => 0 }), '0024-9319', 'Test NormalizeISSN with all features enabled' ); |
| 157 |
|
| 158 |
my @issns = qw/ 0024-9319 00249319 /; |
| 159 |
is( join('|', @issns), join('|', GetVariationsOfISSN('0024-9319')), 'GetVariationsOfISSN returns all variations' ); |
| 160 |
is( join('|', @issns), join('|', GetVariationsOfISSNs('0024-9319')), 'GetVariationsOfISSNs returns all variations' ); |
| 161 |
|
| 162 |
my $issn; |
| 163 |
eval { |
| 164 |
$issn = C4::Koha::NormalizeISSN({ issn => '1234-5678', strip_hyphen => 1 }); |
| 165 |
}; |
| 166 |
ok($@ eq '', 'NormalizeISSN does not throw exception when parsing invalid ISSN'); |
| 167 |
|
| 168 |
@issns = GetVariationsOfISSNs('abc'); |
| 169 |
is(scalar(@issns), 0, 'zero variations returned of invalid ISSN'); |
| 170 |
>>>>>>> Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher |
| 152 |
|
171 |
|
| 153 |
1; |
172 |
1; |
| 154 |
- |
|
|