Annotation of embedaddon/php/ext/standard/tests/file/stream_get_line.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Crash inside stream_get_line(), when length=0
                      3: --FILE--
                      4: <?php
                      5: $path = dirname(__FILE__) . '/test.html';
                      6: 
                      7: file_put_contents($path, b"foo<br>bar<br>foo");
                      8: $fp = fopen($path, "r");
                      9: while ($fp && !feof($fp)) {
                     10:        echo stream_get_line($fp, 0, "<br>")."\n";
                     11: }
                     12: fclose($fp);
                     13: @unlink($path);
                     14: ?>
                     15: --EXPECT--
                     16: foo
                     17: bar
                     18: foo

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>