6 use Test::More tests => 7;
7 use Data::Dump qw/dump/;
10 use_ok( 'MARC::Fast' );
14 my $debug = shift @ARGV;
16 my $marc_file = 't/utf8.marc';
18 ok(my $marc = MARC::Fast->new(
21 Encode::decode( 'utf-8', $_[0] );
25 cmp_ok($marc->count, '==', 1, 'count' );
27 ok(my $rec = $marc->fetch(1), "fetch 1");
28 diag dump $rec if $debug;
30 ok(my $hash = $marc->to_hash(1), "to_hash 1");
31 diag dump $hash if $debug;
33 ok( $hash->{260}->[0]->{'b'} eq "\x{160}kolska knjiga,", 'utf-8 flag' );