summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/bug30362.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/file/bug30362.phpt')
-rw-r--r--ext/standard/tests/file/bug30362.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/standard/tests/file/bug30362.phpt b/ext/standard/tests/file/bug30362.phpt
new file mode 100644
index 000000000..1c2b4be97
--- /dev/null
+++ b/ext/standard/tests/file/bug30362.phpt
@@ -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