mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
Added testcase for bug #30362
This commit is contained in:
parent
95f860d025
commit
28b13f50e6
2 changed files with 28 additions and 0 deletions
26
ext/standard/tests/file/bug30362.phpt
Normal file
26
ext/standard/tests/file/bug30362.phpt
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #30362 (stream_get_line() not working as documented)
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$resource = fopen(dirname(__FILE__).'/bug30362.txt', 'rb');
|
||||||
|
|
||||||
|
for ($i = 0; ($i < 10) && !feof($resource); ++$i ) {
|
||||||
|
$a = "Y";
|
||||||
|
$line = stream_get_line($resource, 50, $a);
|
||||||
|
echo $line . "\n";
|
||||||
|
}
|
||||||
|
fclose($resource);
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
111
|
||||||
|
111111111
|
||||||
|
111111111
|
||||||
|
111111111
|
||||||
|
111111111
|
||||||
|
111111111
|
||||||
|
111111111
|
||||||
|
111111111
|
||||||
|
111111111
|
||||||
|
111111111
|
2
ext/standard/tests/file/bug30362.txt
Normal file
2
ext/standard/tests/file/bug30362.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue