3 |
use strict; |
use strict; |
4 |
use lib 'lib'; |
use lib 'lib'; |
5 |
|
|
6 |
use Test::More tests => 7; |
use Test::More tests => 8; |
7 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
8 |
|
|
9 |
BEGIN { |
BEGIN { |
13 |
|
|
14 |
my $debug = shift @ARGV; |
my $debug = shift @ARGV; |
15 |
|
|
16 |
my $marc_file = 't/koha-105405.mrc'; |
my $marc_file = 't/koha-232766.mrc'; |
17 |
|
|
18 |
ok(my $marc = MARC::Fast->new( |
ok(my $marc = MARC::Fast->new( |
19 |
marcdb => $marc_file, |
marcdb => $marc_file, |
27 |
ok(my $hash = $marc->to_hash(1, include_subfields => 1), "to_hash 1 include_subfields"); |
ok(my $hash = $marc->to_hash(1, include_subfields => 1), "to_hash 1 include_subfields"); |
28 |
diag dump $hash if $debug; |
diag dump $hash if $debug; |
29 |
|
|
30 |
isa_ok( $hash->{653}->[0]->{'a'}, 'ARRAY' ); |
ok( ref $hash->{653}->[0]->{'a'} eq '', 'first occurance not repeatable' ); |
31 |
|
ok( ref $hash->{653}->[1]->{'a'} eq 'ARRAY', 'second is repetable' ); |
32 |
|
|