Annotation of embedaddon/php/ext/standard/tests/file/windows_links/bug48746_3.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug#48746 - Junction not working properly
        !             3: 
        !             4: --CREDIT--
        !             5: Venkat Raman Don (don.raman@microsoft.com)
        !             6: 
        !             7: --SKIPIF--
        !             8: <?php
        !             9: if(substr(PHP_OS, 0, 3) != 'WIN' ) {
        !            10:        die('skip windows only test');
        !            11: }
        !            12: $ret = exec('junction /? 2>&1', $out);
        !            13: if (strpos($out[0], 'recognized')) {
        !            14:        die('skip. junction.exe not found in PATH.');
        !            15: }
        !            16: 
        !            17: ?>
        !            18: --FILE--
        !            19: <?php
        !            20: $old_dir = __DIR__;
        !            21: $dirname = __DIR__ . "\\mnt\\test\\directory";
        !            22: exec("mkdir " . $dirname, $output, $ret_val);
        !            23: chdir(__DIR__ . "\\mnt\\test");
        !            24: exec("junction junction directory", $output, $ret_val);
        !            25: file_put_contents("junction\\a.php", "<?php echo \"I am included.\n\" ?>");
        !            26: file_put_contents("junction\\b.php", "<?php echo \"I am included.\n\" ?>");
        !            27: include "junction/a.php";
        !            28: require_once "junction\\b.php";
        !            29: print_r(scandir("junction"));
        !            30: unlink("junction\\a.php");
        !            31: unlink("junction\\b.php");
        !            32: chdir($old_dir);
        !            33: rmdir(__DIR__ . "\\mnt\\test\\directory");
        !            34: rmdir(__DIR__ . "\\mnt\\test\\junction");
        !            35: rmdir(__DIR__ . "\\mnt\\test");
        !            36: rmdir(__DIR__ . "\\mnt");
        !            37: 
        !            38: ?>
        !            39: --EXPECT--
        !            40: I am included.
        !            41: I am included.
        !            42: Array
        !            43: (
        !            44:     [0] => .
        !            45:     [1] => ..
        !            46:     [2] => a.php
        !            47:     [3] => b.php
        !            48: )

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