Annotation of embedaddon/php/ext/standard/tests/file/windows_links/bug48746_3.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug#48746 - Junction not working properly
3:
1.1.1.2 ! misho 4: --CREDITS--
1.1 misho 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: }
1.1.1.2 ! misho 12: include_once __DIR__ . '/common.inc';
! 13: $ret = exec(get_junction().' /? 2>&1', $out);
1.1 misho 14: if (strpos($out[0], 'recognized')) {
15: die('skip. junction.exe not found in PATH.');
16: }
17:
18: ?>
19: --FILE--
20: <?php
1.1.1.2 ! misho 21: include_once __DIR__ . '/common.inc';
1.1 misho 22: $old_dir = __DIR__;
23: $dirname = __DIR__ . "\\mnt\\test\\directory";
24: exec("mkdir " . $dirname, $output, $ret_val);
25: chdir(__DIR__ . "\\mnt\\test");
1.1.1.2 ! misho 26: exec(get_junction()." junction directory", $output, $ret_val);
1.1 misho 27: file_put_contents("junction\\a.php", "<?php echo \"I am included.\n\" ?>");
28: file_put_contents("junction\\b.php", "<?php echo \"I am included.\n\" ?>");
29: include "junction/a.php";
30: require_once "junction\\b.php";
31: print_r(scandir("junction"));
32: unlink("junction\\a.php");
33: unlink("junction\\b.php");
34: chdir($old_dir);
35: rmdir(__DIR__ . "\\mnt\\test\\directory");
36: rmdir(__DIR__ . "\\mnt\\test\\junction");
37: rmdir(__DIR__ . "\\mnt\\test");
38: rmdir(__DIR__ . "\\mnt");
39:
40: ?>
41: --EXPECT--
42: I am included.
43: I am included.
44: Array
45: (
46: [0] => .
47: [1] => ..
48: [2] => a.php
49: [3] => b.php
1.1.1.2 ! misho 50: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>