use AMF::Tests;

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


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


my $slofi = amf_get_next_record();

test $slofi;

use Data::Dumper;

print Dumper( $slofi );

my $jel = $slofi -> {'http://amf.openlib.org/JEL classification'};

test scalar @$jel;
test scalar @$jel == 2;
test $jel->[0][0][0] eq 'F13', "jel: $jel->[0][0][0]";


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

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

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

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

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





