mirror of
https://github.com/php/php-src.git
synced 2024-09-30 22:36:12 +00:00
9c1e1bbc05
While running these on HHVM I've run into a lot of parallelism issues. I'm backporting all the fixes I had to do in https://github.com/facebook/hiphop-php/blob/master/hphp/tools/import_zend_test.py#L650 to php core. Most of these changes were just filenames that were shared between tests, but I did more surgery on the fixed ports. I can apreciate port 31337 as much as the next nerd, but random ports are better for tests.
35 lines
595 B
PHP
35 lines
595 B
PHP
--TEST--
|
|
Test function readgzfile() reading a plain relative file
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$plaintxt = b<<<EOT
|
|
hello world
|
|
is a very common test
|
|
for all languages
|
|
|
|
EOT;
|
|
$dirname = 'readgzfile_temp';
|
|
$filename = $dirname.'/readgzfile_basic2.txt';
|
|
mkdir($dirname);
|
|
$h = fopen($filename, 'w');
|
|
fwrite($h, $plaintxt);
|
|
fclose($h);
|
|
|
|
|
|
var_dump(readgzfile( $filename ) );
|
|
|
|
unlink($filename);
|
|
rmdir($dirname);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
hello world
|
|
is a very common test
|
|
for all languages
|
|
int(52)
|
|
===DONE===
|