
my $test_file = "t/x_test.rdf";

BEGIN {print "1..7\n";}
END {print "not ok 1\n" unless $loaded;}

### BEGIN { $::RR_BUG_FIX = 1; }
### use rr BUG_FIX;

BEGIN { 
#	push @ARGV, '--spec' , './spec/redif.spec'; 
}

use rr ('BUG_FIX');
$rr::Options{"x_attributes"} = 1;

$redif_spec_filename = $ReDIF::CONFIG{spec_full_name}; 
print "redif.spec: $redif_spec_filename\n";

$loaded = 1;

print "ok 1\n";

if ( not $rr::BUG_FIXED ) {
    print "not ok 2\n";
} else {
    print "ok 2\n";
}

my $t = rr::OpenRDF ( $test_file ) ;
if ( not $t ) {
    print "not ok 3\n";
    exit;
} 
  
print "ok 3\n";

$t = rr::NextTemplate();

if ( not ref $HashT{'template-type'} ) { die; }
if ( not scalar( @{$HashT{'template-type'}} ) == 1 ) { die; }

if( not $HashT{'handle'}[0] eq 'RePEc:jen:jenavo:9906-01' ) { 
	print "not "; }

print "ok 4\n";

$t = rr::NextTemplate() or die;

if( not ref $HashT{'x-abstract'} or
	not $HashT{'x-abstract'}[0] ) { print "not "; }
print "ok 5\n";


$t = rr::NextTemplate() or die;

my $five_ok = 1;
if( not ref $HashT{'author'}[0]{'x-character'}  ) {
    $five_ok = 0;
    print "not "; 
}
print "ok 6\n";

if ( $HashT{author}[0]{'x-character'}[0] !~ /kind/ ) {
    print "not "; 
}
print "ok 7\n";

