Lines Matching refs:file

5 /* Read content less than file size &
6 Read entire file
9 // include the file.inc for common functions for test
10 include ("file.inc");
13 Description : Read data from file of size $read_size and verifies that $expected_size no. of
21 // print file pointer position before read
26 echo "Reading $read_size bytes from file, expecting $expect_size bytes ... ";
33 echo "Error reading file, total number of bytes read = ".strlen($data_from_file)."\n";
35 // file pointer position after read
37 // check if file pointer at eof()
52 echo "\n-- Testing fread() with file having content of type ". $file_content_type ." --\n";
54 /* open the file using $files_modes and perform fread() on it */
61 … $filename = __DIR__."/fread_variation1.tmp"; // this is name of the file created by create_files()
65 echo "Error: failed to fopen() file: $filename!";
74 echo "-- Reading entire file content, expected : 1024 bytes --\n";
75 // read from file, by giving the file actual size,
81 // reading file by giving less than its size
82 echo "-- Reading file content less than max. file size, expected : 1000 bytes --\n";
89 // now close the file
92 // delete the file created
93 delete_file($filename); // delete file
102 -- Testing fread() with file having content of type numeric --
104 -- Reading entire file content, expected : 1024 bytes --
107 Reading 1024 bytes from file, expecting 1024 bytes ... OK
111 -- Reading file content less than max. file size, expected : 1000 bytes --
114 Reading 1000 bytes from file, expecting 1000 bytes ... OK
119 -- Reading entire file content, expected : 1024 bytes --
122 Reading 1024 bytes from file, expecting 1024 bytes ... OK
126 -- Reading file content less than max. file size, expected : 1000 bytes --
129 Reading 1000 bytes from file, expecting 1000 bytes ... OK
134 -- Reading entire file content, expected : 1024 bytes --
137 Reading 1024 bytes from file, expecting 1024 bytes ... OK
141 -- Reading file content less than max. file size, expected : 1000 bytes --
144 Reading 1000 bytes from file, expecting 1000 bytes ... OK
149 -- Reading entire file content, expected : 1024 bytes --
152 Reading 1024 bytes from file, expecting 1024 bytes ... OK
156 -- Reading file content less than max. file size, expected : 1000 bytes --
159 Reading 1000 bytes from file, expecting 1000 bytes ... OK
164 -- Reading entire file content, expected : 1024 bytes --
167 Reading 1024 bytes from file, expecting 1024 bytes ... OK
171 -- Reading file content less than max. file size, expected : 1000 bytes --
174 Reading 1000 bytes from file, expecting 1000 bytes ... OK
179 -- Reading entire file content, expected : 1024 bytes --
182 Reading 1024 bytes from file, expecting 1024 bytes ... OK
186 -- Reading file content less than max. file size, expected : 1000 bytes --
189 Reading 1000 bytes from file, expecting 1000 bytes ... OK
194 -- Reading entire file content, expected : 1024 bytes --
197 Reading 1024 bytes from file, expecting 1024 bytes ... OK
201 -- Reading file content less than max. file size, expected : 1000 bytes --
204 Reading 1000 bytes from file, expecting 1000 bytes ... OK
209 -- Reading entire file content, expected : 1024 bytes --
212 Reading 1024 bytes from file, expecting 1024 bytes ... OK
216 -- Reading file content less than max. file size, expected : 1000 bytes --
219 Reading 1000 bytes from file, expecting 1000 bytes ... OK
224 -- Reading entire file content, expected : 1024 bytes --
227 Reading 1024 bytes from file, expecting 1024 bytes ... OK
231 -- Reading file content less than max. file size, expected : 1000 bytes --
234 Reading 1000 bytes from file, expecting 1000 bytes ... OK
239 -- Testing fread() with file having content of type text --
241 -- Reading entire file content, expected : 1024 bytes --
244 Reading 1024 bytes from file, expecting 1024 bytes ... OK
248 -- Reading file content less than max. file size, expected : 1000 bytes --
251 Reading 1000 bytes from file, expecting 1000 bytes ... OK
256 -- Reading entire file content, expected : 1024 bytes --
259 Reading 1024 bytes from file, expecting 1024 bytes ... OK
263 -- Reading file content less than max. file size, expected : 1000 bytes --
266 Reading 1000 bytes from file, expecting 1000 bytes ... OK
271 -- Reading entire file content, expected : 1024 bytes --
274 Reading 1024 bytes from file, expecting 1024 bytes ... OK
278 -- Reading file content less than max. file size, expected : 1000 bytes --
281 Reading 1000 bytes from file, expecting 1000 bytes ... OK
286 -- Reading entire file content, expected : 1024 bytes --
289 Reading 1024 bytes from file, expecting 1024 bytes ... OK
293 -- Reading file content less than max. file size, expected : 1000 bytes --
296 Reading 1000 bytes from file, expecting 1000 bytes ... OK
301 -- Reading entire file content, expected : 1024 bytes --
304 Reading 1024 bytes from file, expecting 1024 bytes ... OK
308 -- Reading file content less than max. file size, expected : 1000 bytes --
311 Reading 1000 bytes from file, expecting 1000 bytes ... OK
316 -- Reading entire file content, expected : 1024 bytes --
319 Reading 1024 bytes from file, expecting 1024 bytes ... OK
323 -- Reading file content less than max. file size, expected : 1000 bytes --
326 Reading 1000 bytes from file, expecting 1000 bytes ... OK
331 -- Reading entire file content, expected : 1024 bytes --
334 Reading 1024 bytes from file, expecting 1024 bytes ... OK
338 -- Reading file content less than max. file size, expected : 1000 bytes --
341 Reading 1000 bytes from file, expecting 1000 bytes ... OK
346 -- Reading entire file content, expected : 1024 bytes --
349 Reading 1024 bytes from file, expecting 1024 bytes ... OK
353 -- Reading file content less than max. file size, expected : 1000 bytes --
356 Reading 1000 bytes from file, expecting 1000 bytes ... OK
361 -- Reading entire file content, expected : 1024 bytes --
364 Reading 1024 bytes from file, expecting 1024 bytes ... OK
368 -- Reading file content less than max. file size, expected : 1000 bytes --
371 Reading 1000 bytes from file, expecting 1000 bytes ... OK
376 -- Testing fread() with file having content of type text_with_new_line --
378 -- Reading entire file content, expected : 1024 bytes --
381 Reading 1024 bytes from file, expecting 1024 bytes ... OK
385 -- Reading file content less than max. file size, expected : 1000 bytes --
388 Reading 1000 bytes from file, expecting 1000 bytes ... OK
393 -- Reading entire file content, expected : 1024 bytes --
396 Reading 1024 bytes from file, expecting 1024 bytes ... OK
400 -- Reading file content less than max. file size, expected : 1000 bytes --
403 Reading 1000 bytes from file, expecting 1000 bytes ... OK
408 -- Reading entire file content, expected : 1024 bytes --
411 Reading 1024 bytes from file, expecting 1024 bytes ... OK
415 -- Reading file content less than max. file size, expected : 1000 bytes --
418 Reading 1000 bytes from file, expecting 1000 bytes ... OK
423 -- Reading entire file content, expected : 1024 bytes --
426 Reading 1024 bytes from file, expecting 1024 bytes ... OK
430 -- Reading file content less than max. file size, expected : 1000 bytes --
433 Reading 1000 bytes from file, expecting 1000 bytes ... OK
438 -- Reading entire file content, expected : 1024 bytes --
441 Reading 1024 bytes from file, expecting 1024 bytes ... OK
445 -- Reading file content less than max. file size, expected : 1000 bytes --
448 Reading 1000 bytes from file, expecting 1000 bytes ... OK
453 -- Reading entire file content, expected : 1024 bytes --
456 Reading 1024 bytes from file, expecting 1024 bytes ... OK
460 -- Reading file content less than max. file size, expected : 1000 bytes --
463 Reading 1000 bytes from file, expecting 1000 bytes ... OK
468 -- Reading entire file content, expected : 1024 bytes --
471 Reading 1024 bytes from file, expecting 1024 bytes ... OK
475 -- Reading file content less than max. file size, expected : 1000 bytes --
478 Reading 1000 bytes from file, expecting 1000 bytes ... OK
483 -- Reading entire file content, expected : 1024 bytes --
486 Reading 1024 bytes from file, expecting 1024 bytes ... OK
490 -- Reading file content less than max. file size, expected : 1000 bytes --
493 Reading 1000 bytes from file, expecting 1000 bytes ... OK
498 -- Reading entire file content, expected : 1024 bytes --
501 Reading 1024 bytes from file, expecting 1024 bytes ... OK
505 -- Reading file content less than max. file size, expected : 1000 bytes --
508 Reading 1000 bytes from file, expecting 1000 bytes ... OK
513 -- Testing fread() with file having content of type alphanumeric --
515 -- Reading entire file content, expected : 1024 bytes --
518 Reading 1024 bytes from file, expecting 1024 bytes ... OK
522 -- Reading file content less than max. file size, expected : 1000 bytes --
525 Reading 1000 bytes from file, expecting 1000 bytes ... OK
530 -- Reading entire file content, expected : 1024 bytes --
533 Reading 1024 bytes from file, expecting 1024 bytes ... OK
537 -- Reading file content less than max. file size, expected : 1000 bytes --
540 Reading 1000 bytes from file, expecting 1000 bytes ... OK
545 -- Reading entire file content, expected : 1024 bytes --
548 Reading 1024 bytes from file, expecting 1024 bytes ... OK
552 -- Reading file content less than max. file size, expected : 1000 bytes --
555 Reading 1000 bytes from file, expecting 1000 bytes ... OK
560 -- Reading entire file content, expected : 1024 bytes --
563 Reading 1024 bytes from file, expecting 1024 bytes ... OK
567 -- Reading file content less than max. file size, expected : 1000 bytes --
570 Reading 1000 bytes from file, expecting 1000 bytes ... OK
575 -- Reading entire file content, expected : 1024 bytes --
578 Reading 1024 bytes from file, expecting 1024 bytes ... OK
582 -- Reading file content less than max. file size, expected : 1000 bytes --
585 Reading 1000 bytes from file, expecting 1000 bytes ... OK
590 -- Reading entire file content, expected : 1024 bytes --
593 Reading 1024 bytes from file, expecting 1024 bytes ... OK
597 -- Reading file content less than max. file size, expected : 1000 bytes --
600 Reading 1000 bytes from file, expecting 1000 bytes ... OK
605 -- Reading entire file content, expected : 1024 bytes --
608 Reading 1024 bytes from file, expecting 1024 bytes ... OK
612 -- Reading file content less than max. file size, expected : 1000 bytes --
615 Reading 1000 bytes from file, expecting 1000 bytes ... OK
620 -- Reading entire file content, expected : 1024 bytes --
623 Reading 1024 bytes from file, expecting 1024 bytes ... OK
627 -- Reading file content less than max. file size, expected : 1000 bytes --
630 Reading 1000 bytes from file, expecting 1000 bytes ... OK
635 -- Reading entire file content, expected : 1024 bytes --
638 Reading 1024 bytes from file, expecting 1024 bytes ... OK
642 -- Reading file content less than max. file size, expected : 1000 bytes --
645 Reading 1000 bytes from file, expecting 1000 bytes ... OK