33 require_once (
'../../../tests/fossologyUnitTestCase.php');
34 require_once (
'../Classes/ReadInputFile.php');
48 function TestNoInputFile()
51 $this->assert_Notresource($RF->file_resource);
57 function TestResource()
59 $Rif =
new ReadInputFile(
'/home/markd/workspace/fossology/utils/freshmeat/tests/tfile_small');
62 $this->assert_resource($Rif->file_resource);
69 function TestForCommentBlankLine()
71 $Rif =
new ReadInputFile(
'/home/markd/workspace/fossology/utils/freshmeat/tests/tfile_comment');
74 $line = $Rif->getline($Rif->file_resource);
75 while ($line = $Rif->getline($Rif->file_resource))
78 $this->assert_NoPattern(
'/^#/', $line);
79 $this->assert_NoPattern(
'//', $line);
80 $line = $Rif->getline($Rif->file_resource);
82 $this->pass(
"TestForCommentBlankLine Passed\n");
90 $Rif =
new ReadInputFile(
'/home/markd/workspace/fossology/utils/freshmeat/tests/tfile_medium');
91 while ($line = $Rif->getline($Rif->file_resource))
97 $this->pass(
"TestEof Passed\n");