Annotation of embedaddon/php/ext/phar/tests/019.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Phar: opendir test, subdirectory
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("phar")) die("skip"); ?>
! 5: --INI--
! 6: phar.require_hash=0
! 7: --FILE--
! 8: <?php
! 9:
! 10: $fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
! 11: $pname = 'phar://' . $fname;
! 12: $file = b"<?php
! 13: Phar::mapPhar('hio');
! 14: __HALT_COMPILER(); ?>";
! 15:
! 16: $files = array();
! 17: $files['a'] = 'a';
! 18: $files['b/a'] = 'b';
! 19: $files['b/c/d'] = 'c';
! 20: $files['bad/c'] = 'd';
! 21:
! 22: include 'files/phar_test.inc';
! 23: include $fname;
! 24:
! 25: $dir = opendir('phar://hio/b');
! 26:
! 27: if ($dir) {
! 28: while (false !== ($a = readdir($dir))) {
! 29: var_dump($a);
! 30: var_dump(is_dir('phar://hio/b/' . $a));
! 31: }
! 32: }
! 33:
! 34: ?>
! 35: --CLEAN--
! 36: <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
! 37: --EXPECTF--
! 38: %s(1) "a"
! 39: bool(false)
! 40: %s(1) "c"
! 41: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>