Annotation of embedaddon/php/ext/standard/tests/file/bug24482.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #24482 (GLOB_ONLYDIR not working)
3: --SKIPIF--
4: <?php
5: if (!function_exists("glob")) {
6: die('skip glob() not available');
7: }
8: ?>
9: --FILE--
10: <?php
11: $globdirs = glob("*", GLOB_ONLYDIR);
12:
13: $dirs = array();
14: $dh = opendir(".");
15: while (is_string($file = readdir($dh))) {
16: if ($file[0] === ".") continue;
17: if (!is_dir($file)) continue;
18: $dirs[] = $file;
19: }
20: closedir($dh);
21:
22: if (count($dirs) != count($globdirs)) {
23: echo "Directory count mismatch\n";
24:
25: echo "glob found:\n";
26: sort($globdirs);
27: var_dump($globdirs);
28:
29: echo "opendir/readdir/isdir found:\n";
30: sort($dirs);
31: var_dump($dirs);
32: } else {
33: echo "OK\n";
34: }
35: ?>
36: --EXPECT--
37: OK
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>