
##  ReDIF perl suite test script:
##     ReDIF::init.pm
## 
##
##

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

BEGIN { 
#	use Cwd; 
#	my $cwd = cwd(); print "CWD: $cwd\n";
#	push @ARGV, '--spec' , '$cwd/spec/redif.spec'; 
#	push @ARGV, '--spec' , './spec/redif.spec'; 
}

use rr;

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

$loaded = 1;

print "ok 1\n";

### ::initialize( { silent_init => 1 }  );

my $t = rr::OpenRDF ( "t/test.rdf" ) ;
if ( not $t ) {
    print "not ok 2\n";
    exit;
} 
  
print "ok 2\n";

$t = rr::NextTemplate();

if ($t) {
    print "ok 3\n";
} else {
    print "not ok 3\n";
}      

# if ( not defined $HashT{'handle'} ) {
	use pretty_print qw( &pretty_print );
	pretty_print ( \%HashT );
#}

if ( $HashT{'handle'} eq 'RePEc:tst:testse' ) {
    print "ok 4\n";
} else {
    print "not ok 4 ($HashT{'handle'})\n";
}



$t = rr::NextTemplate();

if ($t) {
    print "ok 5\n";
} else {
    print "not ok 5\n";
}      
if ( $HashT{'handle'} eq 'RePEc:tst:tests2' ) {
    print "ok 6\n";
} else {
    print "not ok 6 ($HashT{'handle'})\n";
}

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

1;




