1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00

regression test for #24482 GLOB_ONLYDIR is not working (on BSD)

This commit is contained in:
Hartmut Holzgraefe
2003-07-04 14:38:07 +00:00
parent f49b1d2da0
commit 3c34e4edaf

View File

@@ -0,0 +1,31 @@
--TEST--
Bug #24482: GLOB_ONLYDIR not working
--FILE--
<?php
$globdirs = glob("*", GLOB_ONLYDIR);
$dirs = array();
$dh = opendir(".");
while (is_string($file = readdir($dh))) {
if ($file{0} === ".") continue;
if (!is_dir($file)) continue;
$dirs[] = $file;
}
closedir($dh);
if (count($dirs) != count($globdirs)) {
echo "Directory count mismatch\n";
echo "glob found:\n";
sort($globdirs);
var_dump($globdirs);
echo "opendir/readdir/isdir found:\n";
sort($dirs);
var_dump($dirs);
} else {
echo "OK\n";
}
?>
--EXPECT--
OK