Annotation of embedaddon/php/ext/standard/tests/file/bug44607.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #44607 (stream_get_line unable to correctly identify the "ending" in the stream content)
3: --FILE--
4: <?php
5: $eol = '<EOL>';
6: $tempnam = __DIR__ . '/' . 'tmpbug44607.txt';
7: $data = str_repeat('.', 14000);
8: $data .= $eol;
9: $data .= $data;
10: file_put_contents($tempnam, $data);
11: $fd = fopen($tempnam, 'r');
12: var_dump(strlen(stream_get_line($fd, 15000, $eol)));
13: var_dump(strlen(stream_get_line($fd, 15000, $eol)));
14: fseek($fd, 1, SEEK_SET);
15: var_dump(strlen(stream_get_line($fd, 15000, $eol)));
16: var_dump(strlen(stream_get_line($fd, 15000, $eol)));
17: fclose($fd);
18: unlink($tempnam);
19: ?>
20: --EXPECT--
21: int(14000)
22: int(14000)
23: int(13999)
24: int(14000)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>