Lines 19-25
use Modern::Perl;
Link Here
|
19 |
|
19 |
|
20 |
use Test::More tests => 3; |
20 |
use Test::More tests => 3; |
21 |
use Test::MockModule; |
21 |
use Test::MockModule; |
22 |
use Data::Dumper; |
|
|
23 |
|
22 |
|
24 |
use MARC::Record; |
23 |
use MARC::Record; |
25 |
|
24 |
|
Lines 166-172
sub run_tests {
Link Here
|
166 |
$record_for_isbn->append_fields( $isbn_field ); |
165 |
$record_for_isbn->append_fields( $isbn_field ); |
167 |
$isbns = GetMarcISBN( $record_for_isbn, $marcflavour ); |
166 |
$isbns = GetMarcISBN( $record_for_isbn, $marcflavour ); |
168 |
is( scalar @$isbns, 1, '(GetMarcISBN) The record contains one ISBN'); |
167 |
is( scalar @$isbns, 1, '(GetMarcISBN) The record contains one ISBN'); |
169 |
is( $isbns->[0]->{ marcisbn }, $isbn, '(GetMarcISBN) The record contains our ISBN'); |
168 |
is( $isbns->[0], $isbn, '(GetMarcISBN) The record contains our ISBN'); |
170 |
|
169 |
|
171 |
# We add 3 more ISBNs |
170 |
# We add 3 more ISBNs |
172 |
$record_for_isbn = MARC::Record->new(); |
171 |
$record_for_isbn = MARC::Record->new(); |
Lines 178-184
sub run_tests {
Link Here
|
178 |
$isbns = GetMarcISBN( $record_for_isbn, $marcflavour ); |
177 |
$isbns = GetMarcISBN( $record_for_isbn, $marcflavour ); |
179 |
is( scalar @$isbns, 4, '(GetMarcISBN) The record contains 4 ISBNs'); |
178 |
is( scalar @$isbns, 4, '(GetMarcISBN) The record contains 4 ISBNs'); |
180 |
for my $i (0 .. $#more_isbns) { |
179 |
for my $i (0 .. $#more_isbns) { |
181 |
is( $isbns->[$i]->{ marcisbn }, $more_isbns[$i], |
180 |
is( $isbns->[$i], $more_isbns[$i], |
182 |
"(GetMarcISBN) Corretly retrieves ISBN #". ($i + 1)); |
181 |
"(GetMarcISBN) Corretly retrieves ISBN #". ($i + 1)); |
183 |
} |
182 |
} |
184 |
|
183 |
|
185 |
- |
|
|