Annotation of embedaddon/php/ext/standard/tests/dir/opendir_error2-win32.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test opendir() function : error conditions - Non-existent directory
        !             3: --SKIPIF--
        !             4: <?php
        !             5: if (substr(PHP_OS, 0, 3) != 'WIN') {
        !             6:   die("skip Valid only on Windows");
        !             7: }
        !             8: ?>
        !             9: --FILE--
        !            10: <?php
        !            11: /* Prototype  : mixed opendir(string $path[, resource $context])
        !            12:  * Description: Open a directory and return a dir_handle 
        !            13:  * Source code: ext/standard/dir.c
        !            14:  */
        !            15: 
        !            16: /*
        !            17:  * Pass a non-existent directory as $path argument to opendir() to test behaviour
        !            18:  */
        !            19: 
        !            20: echo "*** Testing opendir() : error conditions ***\n";
        !            21: 
        !            22: echo "\n-- Pass a non-existent absolute path: --\n";
        !            23: $path = dirname(__FILE__) . "/idonotexist";
        !            24: var_dump(opendir($path));
        !            25: 
        !            26: echo "\n-- Pass a non-existent relative path: --\n";
        !            27: chdir(dirname(__FILE__));
        !            28: var_dump(opendir('idonotexist'));
        !            29: ?>
        !            30: ===DONE===
        !            31: --EXPECTF--
        !            32: *** Testing opendir() : error conditions ***
        !            33: 
        !            34: -- Pass a non-existent absolute path: --
        !            35: 
        !            36: Warning: opendir(%s/idonotexist,%s/idonotexist): The system cannot find the file specified. (code: %d) in %s on line %d
        !            37: 
        !            38: Warning: opendir(%s/idonotexist): failed to open dir: %s in %s on line %d
        !            39: bool(false)
        !            40: 
        !            41: -- Pass a non-existent relative path: --
        !            42: 
        !            43: Warning: opendir(idonotexist,idonotexist): The system cannot find the file specified. (code: %d) in %s on line %d
        !            44: 
        !            45: Warning: opendir(idonotexist): failed to open dir: %s in %s on line %d
        !            46: bool(false)
        !            47: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>