function TestEof() { $Rif = new ReadInputFile('/home/markd/workspace/fossology/utils/freshmeat/tests/tfile_medium'); while ($line = $Rif->getline($Rif->file_resource)) { continue; } if (empty($line)) { $this->pass("TestEof Passed\n"); } }
exit(1); } if (array_key_exists("o", $options)) { $in_file = $options['o']; } else { // default $out_file = 'STDOUT'; } if (array_key_exists("r", $options)) { $rdf_file = $options['r']; } else { print "ERROR, -r is a required parameter\n"; exit(1); } // Should still check $in_file and $rdf_file $INF = new ReadInputFile($in_file); $gRdf = new GetFreshMeatRdf(''); $gRdf->get_rdf($gRdf->rdf_name); if ($gRdf->error_code != 0) { print "ERROR getting the Freshmeat RDF file\n"; print "ERROR code was:{$gRdf->error_code}\n"; print "command output was:"; print_r($gRdf->error_out); } $FRdf = new FreshMeatRdfs($gRdf->rdf_name); if (!$FRdf->Uncompress($gRdf->rdf_name)) { print "Could not uncompress the file {$gRdf->rdf_name}\n"; print "return code from uncompress:{$FRdf->error_code}\n"; print "Output from uncompress:{$FRdf->error_out}\n"; } $FMprojects = $FRdf->XtractProjInfo($FRdf->uncompressed_file);