View | Details | Raw Unified | Return to bug 14629
Collapse All | Expand All

(-)a/C4/Koha.pm (-2 / +5 lines)
Lines 1931-1938 sub GetVariationsOfISSN { Link Here
1931
1931
1932
    my @issns;
1932
    my @issns;
1933
1933
1934
    push( @issns, NormalizeISSN({ issn => $issn }) );
1934
    if( NormalizeISSN({issn => $issn}) ){
1935
    push( @issns, NormalizeISSN({ issn => $issn, strip_hyphen => 1 }) );
1935
        push( @issns, NormalizeISSN({ issn => $issn }) );
1936
        push( @issns, NormalizeISSN({ issn => $issn, strip_hyphen => 1 }) );
1937
    }
1938
    else { push( @issns, $issn) }
1936
1939
1937
    # Strip out any "empty" strings from the array
1940
    # Strip out any "empty" strings from the array
1938
    @issns = grep { defined($_) && $_ =~ /\S/ } @issns;
1941
    @issns = grep { defined($_) && $_ =~ /\S/ } @issns;
(-)a/t/Koha.t (-3 / +3 lines)
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 => 36;
28
        plan tests => 37;
29
    } else {
29
    } else {
30
        plan skip_all => "Need Test::DBIx::Class"
30
        plan skip_all => "Need Test::DBIx::Class"
31
    }
31
    }
Lines 134-139 eval { Link Here
134
ok($@ eq '', 'NormalizeISSN does not throw exception when parsing invalid ISSN');
134
ok($@ eq '', 'NormalizeISSN does not throw exception when parsing invalid ISSN');
135
135
136
@issns = GetVariationsOfISSNs('abc');
136
@issns = GetVariationsOfISSNs('abc');
137
is(scalar(@issns), 0, 'zero variations returned of invalid ISSN');
137
is($issns[0], 'abc', 'Original ISSN passed through even if invalid');
138
is(scalar(@issns), 1, 'zero additional variations returned of invalid ISSN');
138
139
139
1;
140
1;
140
- 

Return to bug 14629