]> granicus.if.org Git - php/commitdiff
- fix test and use __DIR__ as usual
authorPierre Joye <pajoye@php.net>
Wed, 26 Aug 2009 16:07:05 +0000 (16:07 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 26 Aug 2009 16:07:05 +0000 (16:07 +0000)
ext/standard/tests/file/bug44607.phpt

index 8b2cf97f92f0b0acd0c83aabac7809654d68738a..dc5e4cbd5e94880574b3fdc259dee202c887d425 100644 (file)
@@ -3,7 +3,7 @@ Bug #44607 (stream_get_line unable to correctly identify the "ending" in the str
 --FILE--
 <?php
 $eol = '<EOL>';
-$tempnam = tempnam(sys_get_temp_dir(), 'php');
+$tempnam = __DIR__ . '/' . 'tmpbug44607.txt';
 $data = str_repeat('.', 14000);
 $data .= $eol;
 $data .= $data;
@@ -14,6 +14,7 @@ var_dump(strlen(stream_get_line($fd, 15000, $eol)));
 fseek($fd, 1, SEEK_SET);
 var_dump(strlen(stream_get_line($fd, 15000, $eol)));
 var_dump(strlen(stream_get_line($fd, 15000, $eol)));
+fclose($fd);
 unlink($tempnam);
 ?>
 --EXPECT--