use AMF::Tests;

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

my $res;

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

my $r1;
my $r2;
my @v;

$r1 = amf_get_next_record();
test $r1;

use Data::Dumper;
print Dumper( $r1 );


$r2 = amf_get_next_record();
test $r2;

use Data::Dumper;
print Dumper( $r2 );

@v = $r1 -> get_value( "title" );

test( $#v == 0, $#v + 1 );
test $v[0] eq 'The Social Life of Information';

@v = $r1 -> get_value( "hasauthor/name" );

test $v[0] eq 'Paul Duguid';
test $#v == 0;


@v = $r1 -> get_value( "hasauthor/REF" );

test $v[0] eq 'amf:JSB';
test $#v == 0;


