
use ReDIF::Parser;
use ReDIF::Record;

###  there happen a problem on perl 5.8.0 either with regular expression
###  matching or with \U quoted string modificator, when a part of the string
###  get's eaten and its feces left in the string.  I saw the following as
###  part of person handle ":39c^@^@lack" (through ``less'', hence the control
###  chars representation)


# my $file = shift;

my $file = 't/RePEc_per_1900-11-11_JOE_BLACK.rdf';
print "1..1\n";  

for ( $file ) {
  
  if ( not -e $file	 
       or not -r _    
       or not ReDIF::Parser::open_file( $file ) 
     ) {
    print "nok 1\n";
    next;
  }
  
  my $template = ReDIF::Parser::get_next_template_good_or_bad();
  bless $template, 'ReDIF::Record';

  my $id = $template -> id;
  print "ID: $id\n";

  if ( $id =~ /:39c/ ) { 
    print "nok 1\n";
  } else {
    print "ok 1\n";
  }
  
}
