use AMF::Tests;

eval " use AMF::Parser; ";
test not $@;


my $res = amf_open_file( 'testsuite/8.xml' );
test $res;


my $slofi = amf_get_next_record();

test $slofi;

use Data::Dumper;

print Dumper( $slofi );

my $title = $slofi -> get_value( 'title' );

my $title1 = $slofi -> {title}[0];

test $title1->[0] eq 'The Social Life of Information';
test $title1->[0] !~ m/\x{044c}/; 
test $title1->[1]{'xml:lang'} eq 'en';

my $title2 = $slofi -> {title}[1];
test $title2->[0] =~ m/\x{044c}/; 
test $title2->[1]{'xml:lang'} eq 'ru';


__END__

test scalar @$jel;
test scalar @$jel == 1;
test $jel->[0][0] eq 'F13';


my $f = $slofi -> get_value( 'file' );

test $f;
test $f -> {'NB note'};
test $f -> {'NB note'}[0];

test $f -> {'NB note'}[0][0] =~ /several/;

my $u = $slofi -> get_value( 'file/url' );

test $u;
test $u eq 'http://www.slofi.com/pub/chapter1.pdf';





