]> granicus.if.org Git - php/commitdiff
MFH
authorfoobar <sniper@php.net>
Mon, 4 Apr 2005 18:15:41 +0000 (18:15 +0000)
committerfoobar <sniper@php.net>
Mon, 4 Apr 2005 18:15:41 +0000 (18:15 +0000)
ext/standard/tests/file/bug30362.phpt [new file with mode: 0644]
ext/standard/tests/file/bug30362.txt [new file with mode: 0644]

diff --git a/ext/standard/tests/file/bug30362.phpt b/ext/standard/tests/file/bug30362.phpt
new file mode 100644 (file)
index 0000000..1c2b4be
--- /dev/null
@@ -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
diff --git a/ext/standard/tests/file/bug30362.txt b/ext/standard/tests/file/bug30362.txt
new file mode 100644 (file)
index 0000000..3a1b7f4
--- /dev/null
@@ -0,0 +1 @@
+111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111