/[MARC-Fast]/trunk/t/003_marc-repeatable.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/t/003_marc-repeatable.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 40 - (hide annotations)
Thu Sep 23 13:05:59 2010 UTC (13 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 562 byte(s)
test repeatable subfields
1 dpavlin 40 #!/usr/bin/perl -w
2    
3     use strict;
4     use lib 'lib';
5    
6     use Test::More tests => 7;
7     use Data::Dump qw/dump/;
8    
9     BEGIN {
10     use_ok( 'MARC::Fast' );
11     use_ok( 'Encode' );
12     }
13    
14     my $debug = shift @ARGV;
15    
16     my $marc_file = 't/koha-105405.mrc';
17    
18     ok(my $marc = MARC::Fast->new(
19     marcdb => $marc_file,
20     ), "new");
21    
22     cmp_ok($marc->count, '==', 1, 'count' );
23    
24     ok(my $rec = $marc->fetch(1), "fetch 1");
25     diag dump $rec if $debug;
26    
27     ok(my $hash = $marc->to_hash(1, include_subfields => 1), "to_hash 1 include_subfields");
28     diag dump $hash if $debug;
29    
30     isa_ok( $hash->{653}->[0]->{'a'}, 'ARRAY' );
31    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26