php-src/ext/standard/tests/file/realpath_cache_win32.phpt
Anatoliy Belsky f7d8b274c7 Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
What happens here is trivial long overflow. Despite the bug attracted
attention on windows, the same story is on linux. Just wait for a big
anough bucket->key . The linux test had %i to check the key value
which should be %d all the way.
2012-05-10 15:27:44 +02:00

39 lines
545 B
PHP

--TEST--
realpath_cache_size() and realpath_cache_get()
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip only on Windows');
}
?>
--FILE--
<?php
var_dump(realpath_cache_size());
$data = realpath_cache_get();
var_dump($data[__DIR__]);
echo "Done\n";
?>
--EXPECTF--
int(%d)
array(8) {
["key"]=>
%s(%d)
["is_dir"]=>
bool(true)
["realpath"]=>
string(%d) "%sfile"
["expires"]=>
int(%d)
["is_rvalid"]=>
bool(%s)
["is_wvalid"]=>
bool(%s)
["is_readable"]=>
bool(%s)
["is_writable"]=>
bool(%s)
}
Done