use AMF::Tests;
use AMF::Parser;
use Data::Dumper;

my $res;

$AMF::Parser::parser -> {REPORT} = 1;
#$AMF::Parser::parser -> {REPORT_ENCLOSED_NOUNS} = 1;

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

$res = amf_get_next_record();
test $res;

test $res -> {PROBLEMS};
test $res -> {PROBLEMS} =~ /unknown element /i;

print Dumper( $res );


$res = amf_get_next_record();
test $res;
test $res -> {PROBLEMS};
test $res -> {PROBLEMS} =~ /has an element inside it/i;


print Dumper( $res );


#$res = amf_get_next_record();
#print $res->id, ":\n";
#print $res->{PROBLEMS};

#test $res->{PROBLEMS};