summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-13 11:21:27 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-13 11:21:27 +0200
commit3f72c77ce47ee0906905b83161d9c1d24e425d89 (patch)
tree58d19308558ed7e3f9384e0006ce6af0cb83ec56 /ext/standard/tests/file
parent2845f859c19965691855c66bc18d94a4e06ff329 (diff)
downloadphp-git-3f72c77ce47ee0906905b83161d9c1d24e425d89.tar.gz
Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
Diffstat (limited to 'ext/standard/tests/file')
-rw-r--r--ext/standard/tests/file/bug43353-win32.phpt50
-rw-r--r--ext/standard/tests/file/bug49047.phpt34
-rw-r--r--ext/standard/tests/file/bug53241.phpt46
-rw-r--r--ext/standard/tests/file/bug55124.phpt36
-rw-r--r--ext/standard/tests/file/bug60120.phpt148
-rw-r--r--ext/standard/tests/file/rename_variation8-win32.phpt140
-rw-r--r--ext/standard/tests/file/stream_enclosed.phpt40
-rw-r--r--ext/standard/tests/file/windows_links/bug48746.phpt116
-rw-r--r--ext/standard/tests/file/windows_links/bug48746_1.phpt118
-rw-r--r--ext/standard/tests/file/windows_links/bug48746_2.phpt138
-rw-r--r--ext/standard/tests/file/windows_links/bug48746_3.phpt100
-rw-r--r--ext/standard/tests/file/windows_links/bug73962.phpt154
12 files changed, 560 insertions, 560 deletions
diff --git a/ext/standard/tests/file/bug43353-win32.phpt b/ext/standard/tests/file/bug43353-win32.phpt
index 2faabb92c0..76605d97a8 100644
--- a/ext/standard/tests/file/bug43353-win32.phpt
+++ b/ext/standard/tests/file/bug43353-win32.phpt
@@ -1,25 +1,25 @@
---TEST--
-Bug #43353 wrong detection of 'data' wrapper
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != "WIN")
- die("skip Run only on Windows");
-?>
---INI--
-allow_url_fopen=1
---FILE--
-<?php
-
-var_dump(is_dir('file:///datafoo:test'));
-var_dump(is_dir('datafoo:test'));
-var_dump(file_get_contents('data:text/plain,foo'));
-var_dump(file_get_contents('datafoo:text/plain,foo'));
-
-?>
---EXPECTF--
-bool(false)
-bool(false)
-string(3) "foo"
-
-Warning: file_get_contents(datafoo:text/plain,foo): failed to open stream: No such file or directory in %s
-bool(false)
+--TEST--
+Bug #43353 wrong detection of 'data' wrapper
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != "WIN")
+ die("skip Run only on Windows");
+?>
+--INI--
+allow_url_fopen=1
+--FILE--
+<?php
+
+var_dump(is_dir('file:///datafoo:test'));
+var_dump(is_dir('datafoo:test'));
+var_dump(file_get_contents('data:text/plain,foo'));
+var_dump(file_get_contents('datafoo:text/plain,foo'));
+
+?>
+--EXPECTF--
+bool(false)
+bool(false)
+string(3) "foo"
+
+Warning: file_get_contents(datafoo:text/plain,foo): failed to open stream: No such file or directory in %s
+bool(false)
diff --git a/ext/standard/tests/file/bug49047.phpt b/ext/standard/tests/file/bug49047.phpt
index 1ccc94e287..d0805a16fd 100644
--- a/ext/standard/tests/file/bug49047.phpt
+++ b/ext/standard/tests/file/bug49047.phpt
@@ -1,17 +1,17 @@
---TEST--
-Test fopen() function : variation: interesting paths, no use include path
---FILE--
-<?php
-// fopen with interesting windows paths.
-$testdir = __DIR__ . '/bug47177.tmpdir';
-mkdir($testdir);
-$t = time() - 3600;
-touch($testdir, $t);
-clearstatcache();
-$t2 = filemtime($testdir);
-if ($t2 != $t) echo "failed (got $t2, expecting $t)\n";
-rmdir($testdir);
-echo "Ok.";
-?>
---EXPECTF--
-Ok.
+--TEST--
+Test fopen() function : variation: interesting paths, no use include path
+--FILE--
+<?php
+// fopen with interesting windows paths.
+$testdir = __DIR__ . '/bug47177.tmpdir';
+mkdir($testdir);
+$t = time() - 3600;
+touch($testdir, $t);
+clearstatcache();
+$t2 = filemtime($testdir);
+if ($t2 != $t) echo "failed (got $t2, expecting $t)\n";
+rmdir($testdir);
+echo "Ok.";
+?>
+--EXPECTF--
+Ok.
diff --git a/ext/standard/tests/file/bug53241.phpt b/ext/standard/tests/file/bug53241.phpt
index 685bf14620..7ccf2be109 100644
--- a/ext/standard/tests/file/bug53241.phpt
+++ b/ext/standard/tests/file/bug53241.phpt
@@ -1,23 +1,23 @@
---TEST--
-Bug #53241 (stream casting that relies on fdopen/fopencookie fails with 'xb' mode)
---SKIPIF--
-<?php
-/* unfortunately no standard function does a cast to FILE*, so we need
- * curl to test this */
-if (!extension_loaded("curl")) exit("skip curl extension not loaded");
---FILE--
-<?php
-$fn = __DIR__ . "/test.tmp";
-@unlink($fn);
-$fh = fopen($fn, 'xb');
-$ch = curl_init('http://www.yahoo.com/');
-var_dump(curl_setopt($ch, CURLOPT_FILE, $fh));
-echo "Done.\n";
---CLEAN--
-<?php
-$fn = __DIR__ . "/test.tmp";
-@unlink($fn);
-?>
---EXPECT--
-bool(true)
-Done.
+--TEST--
+Bug #53241 (stream casting that relies on fdopen/fopencookie fails with 'xb' mode)
+--SKIPIF--
+<?php
+/* unfortunately no standard function does a cast to FILE*, so we need
+ * curl to test this */
+if (!extension_loaded("curl")) exit("skip curl extension not loaded");
+--FILE--
+<?php
+$fn = __DIR__ . "/test.tmp";
+@unlink($fn);
+$fh = fopen($fn, 'xb');
+$ch = curl_init('http://www.yahoo.com/');
+var_dump(curl_setopt($ch, CURLOPT_FILE, $fh));
+echo "Done.\n";
+--CLEAN--
+<?php
+$fn = __DIR__ . "/test.tmp";
+@unlink($fn);
+?>
+--EXPECT--
+bool(true)
+Done.
diff --git a/ext/standard/tests/file/bug55124.phpt b/ext/standard/tests/file/bug55124.phpt
index 1915b7f209..7938196dbc 100644
--- a/ext/standard/tests/file/bug55124.phpt
+++ b/ext/standard/tests/file/bug55124.phpt
@@ -1,18 +1,18 @@
---TEST--
-Bug #55124 (recursive mkdir fails with current (dot) directory in path)
---FILE--
-<?php
-$old_dir_path = getcwd();
-chdir(__DIR__);
-mkdir('a/./b', 0755, true);
-if (is_dir('a/b')) {
- rmdir('a/b');
-}
-if (is_dir('./a')) {
- rmdir('a');
-}
-chdir($old_dir_path);
-echo "OK";
-?>
---EXPECT--
-OK
+--TEST--
+Bug #55124 (recursive mkdir fails with current (dot) directory in path)
+--FILE--
+<?php
+$old_dir_path = getcwd();
+chdir(__DIR__);
+mkdir('a/./b', 0755, true);
+if (is_dir('a/b')) {
+ rmdir('a/b');
+}
+if (is_dir('./a')) {
+ rmdir('a');
+}
+chdir($old_dir_path);
+echo "OK";
+?>
+--EXPECT--
+OK
diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt
index 8915bb833c..51dbac9c1e 100644
--- a/ext/standard/tests/file/bug60120.phpt
+++ b/ext/standard/tests/file/bug60120.phpt
@@ -1,74 +1,74 @@
---TEST--
-Bug #60120 (proc_open hangs when data in stdin/out/err is getting larger or equal to 2048)
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip only for Windows');
-}
-$php = getenv('TEST_PHP_EXECUTABLE');
-if (!$php) {
- die("No php executable defined\n");
-}
-?>
---FILE--
-<?php
-
-error_reporting(E_ALL);
-
-$php = getenv('TEST_PHP_EXECUTABLE');
-if (!$php) {
- die("No php executable defined\n");
-}
-$cmd = 'php -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"';
-$descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w'));
-$stdin = str_repeat('*', 1024 * 16) . '!';
-$stdin = str_repeat('*', 2049 );
-
-$options = array_merge(array('suppress_errors' => true, 'binary_pipes' => true, 'bypass_shell' => false));
-$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array(), $options);
-
-foreach ($pipes as $pipe) {
- stream_set_blocking($pipe, false);
-}
-$writePipes = array($pipes[0]);
-$stdinLen = strlen($stdin);
-$stdinOffset = 0;
-
-unset($pipes[0]);
-
-while ($pipes || $writePipes) {
- $r = $pipes;
- $w = $writePipes;
- $e = null;
- $n = stream_select($r, $w, $e, 60);
-
- if (false === $n) {
- break;
- } elseif ($n === 0) {
- proc_terminate($process);
-
- }
- if ($w) {
- $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192);
- if (false !== $written) {
- $stdinOffset += $written;
- }
- if ($stdinOffset >= $stdinLen) {
- fclose($writePipes[0]);
- $writePipes = null;
- }
- }
-
- foreach ($r as $pipe) {
- $type = array_search($pipe, $pipes);
- $data = fread($pipe, 8192);
- if (false === $data || feof($pipe)) {
- fclose($pipe);
- unset($pipes[$type]);
- }
- }
-}
-echo "OK.";
-?>
---EXPECT--
-OK.
+--TEST--
+Bug #60120 (proc_open hangs when data in stdin/out/err is getting larger or equal to 2048)
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip only for Windows');
+}
+$php = getenv('TEST_PHP_EXECUTABLE');
+if (!$php) {
+ die("No php executable defined\n");
+}
+?>
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+$php = getenv('TEST_PHP_EXECUTABLE');
+if (!$php) {
+ die("No php executable defined\n");
+}
+$cmd = 'php -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"';
+$descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w'));
+$stdin = str_repeat('*', 1024 * 16) . '!';
+$stdin = str_repeat('*', 2049 );
+
+$options = array_merge(array('suppress_errors' => true, 'binary_pipes' => true, 'bypass_shell' => false));
+$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array(), $options);
+
+foreach ($pipes as $pipe) {
+ stream_set_blocking($pipe, false);
+}
+$writePipes = array($pipes[0]);
+$stdinLen = strlen($stdin);
+$stdinOffset = 0;
+
+unset($pipes[0]);
+
+while ($pipes || $writePipes) {
+ $r = $pipes;
+ $w = $writePipes;
+ $e = null;
+ $n = stream_select($r, $w, $e, 60);
+
+ if (false === $n) {
+ break;
+ } elseif ($n === 0) {
+ proc_terminate($process);
+
+ }
+ if ($w) {
+ $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192);
+ if (false !== $written) {
+ $stdinOffset += $written;
+ }
+ if ($stdinOffset >= $stdinLen) {
+ fclose($writePipes[0]);
+ $writePipes = null;
+ }
+ }
+
+ foreach ($r as $pipe) {
+ $type = array_search($pipe, $pipes);
+ $data = fread($pipe, 8192);
+ if (false === $data || feof($pipe)) {
+ fclose($pipe);
+ unset($pipes[$type]);
+ }
+ }
+}
+echo "OK.";
+?>
+--EXPECT--
+OK.
diff --git a/ext/standard/tests/file/rename_variation8-win32.phpt b/ext/standard/tests/file/rename_variation8-win32.phpt
index 1d25a12e04..7be25949f6 100644
--- a/ext/standard/tests/file/rename_variation8-win32.phpt
+++ b/ext/standard/tests/file/rename_variation8-win32.phpt
@@ -1,70 +1,70 @@
---TEST--
-Test rename() function: variation
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. for Windows');
-?>
---FILE--
-<?php
-/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
- Description: Renames a file or directory
-*/
-
-echo "\n*** Testing rename() on non-existing file ***\n";
-$file_path = dirname(__FILE__);
-
-// try renaming a non existing file
-$src_name = $file_path."/non_existent_file.tmp";
-$dest_name = $file_path."/rename_variation8_new.tmp";
-var_dump( rename($src_name, $dest_name) );
-
-// ensure that $dest_name didn't get created
-var_dump( file_exists($src_name) ); // expecting false
-var_dump( file_exists($dest_name) ); // expecting false
-
-// rename a existing dir to new name
-echo "\n*** Testing rename() on existing directory ***\n";
-$dir_name = $file_path."/rename_basic_dir";
-mkdir($dir_name);
-$new_dir_name = $file_path."/rename_basic_dir1";
-var_dump( rename($dir_name, $new_dir_name) );
-//ensure that $new_dir_name got created
-var_dump( file_exists($dir_name) ); // expecting false
-var_dump( file_exists($new_dir_name) ); // expecting true
-
-// try to rename an non_existing dir
-echo "\n*** Testing rename() on non-existing directory ***\n";
-$non_existent_dir_name = $file_path."/non_existent_dir";
-$new_dir_name = "$file_path/rename_basic_dir2";
-var_dump( rename($non_existent_dir_name, $new_dir_name) );
-// ensure that $new_dir_name didn't get created
-var_dump( file_exists($non_existent_dir_name) ); // expecting flase
-var_dump( file_exists($new_dir_name) ); // expecting false
-
-echo "Done\n";
-?>
---CLEAN--
-<?php
-rmdir(dirname(__FILE__)."/rename_basic_dir1");
-?>
---EXPECTF--
-*** Testing rename() on non-existing file ***
-
-Warning: rename(%s/non_existent_file.tmp,%s/rename_variation8_new.tmp): The system cannot find the file specified. (code: 2) in %s on line %d
-bool(false)
-bool(false)
-bool(false)
-
-*** Testing rename() on existing directory ***
-bool(true)
-bool(false)
-bool(true)
-
-*** Testing rename() on non-existing directory ***
-
-Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): The system cannot find the file specified. (code: 2) in %s on line %d
-bool(false)
-bool(false)
-bool(false)
-Done
-
+--TEST--
+Test rename() function: variation
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. for Windows');
+?>
+--FILE--
+<?php
+/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
+ Description: Renames a file or directory
+*/
+
+echo "\n*** Testing rename() on non-existing file ***\n";
+$file_path = dirname(__FILE__);
+
+// try renaming a non existing file
+$src_name = $file_path."/non_existent_file.tmp";
+$dest_name = $file_path."/rename_variation8_new.tmp";
+var_dump( rename($src_name, $dest_name) );
+
+// ensure that $dest_name didn't get created
+var_dump( file_exists($src_name) ); // expecting false
+var_dump( file_exists($dest_name) ); // expecting false
+
+// rename a existing dir to new name
+echo "\n*** Testing rename() on existing directory ***\n";
+$dir_name = $file_path."/rename_basic_dir";
+mkdir($dir_name);
+$new_dir_name = $file_path."/rename_basic_dir1";
+var_dump( rename($dir_name, $new_dir_name) );
+//ensure that $new_dir_name got created
+var_dump( file_exists($dir_name) ); // expecting false
+var_dump( file_exists($new_dir_name) ); // expecting true
+
+// try to rename an non_existing dir
+echo "\n*** Testing rename() on non-existing directory ***\n";
+$non_existent_dir_name = $file_path."/non_existent_dir";
+$new_dir_name = "$file_path/rename_basic_dir2";
+var_dump( rename($non_existent_dir_name, $new_dir_name) );
+// ensure that $new_dir_name didn't get created
+var_dump( file_exists($non_existent_dir_name) ); // expecting flase
+var_dump( file_exists($new_dir_name) ); // expecting false
+
+echo "Done\n";
+?>
+--CLEAN--
+<?php
+rmdir(dirname(__FILE__)."/rename_basic_dir1");
+?>
+--EXPECTF--
+*** Testing rename() on non-existing file ***
+
+Warning: rename(%s/non_existent_file.tmp,%s/rename_variation8_new.tmp): The system cannot find the file specified. (code: 2) in %s on line %d
+bool(false)
+bool(false)
+bool(false)
+
+*** Testing rename() on existing directory ***
+bool(true)
+bool(false)
+bool(true)
+
+*** Testing rename() on non-existing directory ***
+
+Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): The system cannot find the file specified. (code: 2) in %s on line %d
+bool(false)
+bool(false)
+bool(false)
+Done
+
diff --git a/ext/standard/tests/file/stream_enclosed.phpt b/ext/standard/tests/file/stream_enclosed.phpt
index 9520ecce74..f487ed0744 100644
--- a/ext/standard/tests/file/stream_enclosed.phpt
+++ b/ext/standard/tests/file/stream_enclosed.phpt
@@ -1,20 +1,20 @@
---TEST--
-Unexposed/leaked stream encloses another stream
---SKIPIF--
-<?php
-if (!function_exists('leak_variable')) die("skip only debug builds");
---FILE--
-<?php
-$s = fopen('php://temp/maxmemory=1024','wb+');
-
-$t = fopen('php://temp/maxmemory=1024','wb+');
-
-/* force conversion of inner stream to STDIO. */
-$i = 0;
-while ($i++ < 5000) {
- fwrite($t, str_repeat('a',1024));
-}
-
-leak_variable($s, true);
-leak_variable($t, true);
---EXPECT--
+--TEST--
+Unexposed/leaked stream encloses another stream
+--SKIPIF--
+<?php
+if (!function_exists('leak_variable')) die("skip only debug builds");
+--FILE--
+<?php
+$s = fopen('php://temp/maxmemory=1024','wb+');
+
+$t = fopen('php://temp/maxmemory=1024','wb+');
+
+/* force conversion of inner stream to STDIO. */
+$i = 0;
+while ($i++ < 5000) {
+ fwrite($t, str_repeat('a',1024));
+}
+
+leak_variable($s, true);
+leak_variable($t, true);
+--EXPECT--
diff --git a/ext/standard/tests/file/windows_links/bug48746.phpt b/ext/standard/tests/file/windows_links/bug48746.phpt
index 5978e7f7f1..671c347a61 100644
--- a/ext/standard/tests/file/windows_links/bug48746.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746.phpt
@@ -1,58 +1,58 @@
---TEST--
-Bug#48746 - Junction not working properly
-
---CREDITS--
-Venkat Raman Don (don.raman@microsoft.com)
-
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
-}
-include_once __DIR__ . '/common.inc';
-$cmd = "mklink /?";
-$ret = @exec($cmd, $output, $return_val);
-if (count($output) == 0) {
- die("mklink.exe not found in PATH");
-}
-?>
---FILE--
-<?php
-include_once __DIR__ . '/common.inc';
-$mountvol = get_mountvol();
-$old_dir = __DIR__;
-$dirname = __DIR__ . "\\mnt\\test\\directory";
-mkdir($dirname, 0700, true);
-chdir(__DIR__ . "\\mnt\\test");
-$drive = substr(__DIR__, 0, 2);
-$pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
-exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
-$fullpath = "mounted_volume" . $pathwithoutdrive;
-exec("mklink /j mklink_junction directory", $output, $ret_val);
-var_dump(file_exists("directory"));
-var_dump(file_exists("mklink_junction"));
-var_dump(file_exists("mounted_volume"));
-var_dump(file_exists("$fullpath"));
-var_dump(is_dir("mklink_junction"));
-var_dump(is_dir("$fullpath"));
-var_dump(is_readable("mklink_junction"));
-var_dump(is_writeable("$fullpath"));
-chdir($old_dir);
-
-rmdir(__DIR__ . "\\mnt\\test\\directory");
-rmdir(__DIR__ . "\\mnt\\test\\mklink_junction");
-rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
-rmdir(__DIR__ . "\\mnt\\test");
-rmdir(__DIR__ . "\\mnt");
-
-?>
---EXPECT--
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
+--TEST--
+Bug#48746 - Junction not working properly
+
+--CREDITS--
+Venkat Raman Don (don.raman@microsoft.com)
+
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+include_once __DIR__ . '/common.inc';
+$cmd = "mklink /?";
+$ret = @exec($cmd, $output, $return_val);
+if (count($output) == 0) {
+ die("mklink.exe not found in PATH");
+}
+?>
+--FILE--
+<?php
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
+$old_dir = __DIR__;
+$dirname = __DIR__ . "\\mnt\\test\\directory";
+mkdir($dirname, 0700, true);
+chdir(__DIR__ . "\\mnt\\test");
+$drive = substr(__DIR__, 0, 2);
+$pathwithoutdrive = substr(__DIR__, 2);
+$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
+exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
+$fullpath = "mounted_volume" . $pathwithoutdrive;
+exec("mklink /j mklink_junction directory", $output, $ret_val);
+var_dump(file_exists("directory"));
+var_dump(file_exists("mklink_junction"));
+var_dump(file_exists("mounted_volume"));
+var_dump(file_exists("$fullpath"));
+var_dump(is_dir("mklink_junction"));
+var_dump(is_dir("$fullpath"));
+var_dump(is_readable("mklink_junction"));
+var_dump(is_writeable("$fullpath"));
+chdir($old_dir);
+
+rmdir(__DIR__ . "\\mnt\\test\\directory");
+rmdir(__DIR__ . "\\mnt\\test\\mklink_junction");
+rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
+rmdir(__DIR__ . "\\mnt\\test");
+rmdir(__DIR__ . "\\mnt");
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/standard/tests/file/windows_links/bug48746_1.phpt b/ext/standard/tests/file/windows_links/bug48746_1.phpt
index a4277a47a1..56764bcf5f 100644
--- a/ext/standard/tests/file/windows_links/bug48746_1.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_1.phpt
@@ -1,59 +1,59 @@
---TEST--
-Bug#48746 - Junction not working properly
-
---CREDITS--
-Venkat Raman Don (don.raman@microsoft.com)
-
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
-}
-include_once __DIR__ . '/common.inc';
-$cmd = "mklink /?";
-$ret = @exec($cmd, $output, $return_val);
-if (count($output) == 0) {
- die("mklink.exe not found in PATH");
-}
-?>
---FILE--
-<?php
-include_once __DIR__ . '/common.inc';
-$mountvol = get_mountvol();
-$old_dir = __DIR__;
-$dirname = __DIR__ . "\\mnt\\test\\directory";
-exec("mkdir " . $dirname, $output, $ret_val);
-chdir(__DIR__ . "\\mnt\\test");
-$drive = substr(__DIR__, 0, 2);
-$pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
-exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
-$fullpath = "mounted_volume" . $pathwithoutdrive;
-exec("mklink /j mklink_junction directory", $output, $ret_val);
-file_put_contents("mklink_junction\\a.php", "<?php echo \"I am included.\n\" ?>");
-include_once "mklink_junction\\a.php";
-file_put_contents("$fullpath\\mnt\\test\\directory\\b.php", "<?php echo \"I am included.\n\" ?>");
-require "$fullpath\\mnt\\test\\directory\\b.php";
-file_put_contents("$fullpath\\mnt\\test\\mklink_junction\\c.php", "<?php echo \"I am included.\n\" ?>");
-require_once "$fullpath\\mnt\\test\\mklink_junction\\c.php";
-var_dump(is_file("mklink_junction\\a.php"));
-var_dump(is_file("$fullpath\\mnt\\test\\directory\\b.php"));
-var_dump(is_file("$fullpath\\mnt\\test\\mklink_junction\\c.php"));
-unlink("$fullpath\\mnt\\test\\directory\\b.php");
-unlink("$fullpath\\mnt\\test\\mklink_junction\\c.php");
-unlink("mklink_junction\\a.php");
-chdir($old_dir);
-rmdir(__DIR__ . "\\mnt\\test\\directory");
-rmdir(__DIR__ . "\\mnt\\test\\mklink_junction");
-rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
-rmdir(__DIR__ . "\\mnt\\test");
-rmdir(__DIR__ . "\\mnt");
-
-?>
---EXPECT--
-I am included.
-I am included.
-I am included.
-bool(true)
-bool(true)
-bool(true)
+--TEST--
+Bug#48746 - Junction not working properly
+
+--CREDITS--
+Venkat Raman Don (don.raman@microsoft.com)
+
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+include_once __DIR__ . '/common.inc';
+$cmd = "mklink /?";
+$ret = @exec($cmd, $output, $return_val);
+if (count($output) == 0) {
+ die("mklink.exe not found in PATH");
+}
+?>
+--FILE--
+<?php
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
+$old_dir = __DIR__;
+$dirname = __DIR__ . "\\mnt\\test\\directory";
+exec("mkdir " . $dirname, $output, $ret_val);
+chdir(__DIR__ . "\\mnt\\test");
+$drive = substr(__DIR__, 0, 2);
+$pathwithoutdrive = substr(__DIR__, 2);
+$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
+exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
+$fullpath = "mounted_volume" . $pathwithoutdrive;
+exec("mklink /j mklink_junction directory", $output, $ret_val);
+file_put_contents("mklink_junction\\a.php", "<?php echo \"I am included.\n\" ?>");
+include_once "mklink_junction\\a.php";
+file_put_contents("$fullpath\\mnt\\test\\directory\\b.php", "<?php echo \"I am included.\n\" ?>");
+require "$fullpath\\mnt\\test\\directory\\b.php";
+file_put_contents("$fullpath\\mnt\\test\\mklink_junction\\c.php", "<?php echo \"I am included.\n\" ?>");
+require_once "$fullpath\\mnt\\test\\mklink_junction\\c.php";
+var_dump(is_file("mklink_junction\\a.php"));
+var_dump(is_file("$fullpath\\mnt\\test\\directory\\b.php"));
+var_dump(is_file("$fullpath\\mnt\\test\\mklink_junction\\c.php"));
+unlink("$fullpath\\mnt\\test\\directory\\b.php");
+unlink("$fullpath\\mnt\\test\\mklink_junction\\c.php");
+unlink("mklink_junction\\a.php");
+chdir($old_dir);
+rmdir(__DIR__ . "\\mnt\\test\\directory");
+rmdir(__DIR__ . "\\mnt\\test\\mklink_junction");
+rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
+rmdir(__DIR__ . "\\mnt\\test");
+rmdir(__DIR__ . "\\mnt");
+
+?>
+--EXPECT--
+I am included.
+I am included.
+I am included.
+bool(true)
+bool(true)
+bool(true)
diff --git a/ext/standard/tests/file/windows_links/bug48746_2.phpt b/ext/standard/tests/file/windows_links/bug48746_2.phpt
index 509610f8a4..9f2ff850b6 100644
--- a/ext/standard/tests/file/windows_links/bug48746_2.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_2.phpt
@@ -1,69 +1,69 @@
---TEST--
-Bug#48746 - Junction not working properly
-
---CREDITS--
-Venkat Raman Don (don.raman@microsoft.com)
-
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
-}
-include_once __DIR__ . '/common.inc';
-$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);
-if (strpos($ret, 'privilege')) {
- die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
-}
-unlink('bug48746_tmp.lnk');
-?>
---FILE--
-<?php
-include_once __DIR__ . '/common.inc';
-$mountvol = get_mountvol();
-$old_dir = __DIR__;
-$dirname = __DIR__ . "\\mnt\\test\\directory";
-exec("mkdir " . $dirname, $output, $ret_val);
-chdir(__DIR__ . "\\mnt\\test");
-$drive = substr(__DIR__, 0, 2);
-$pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
-exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
-$fullpath = "mounted_volume" . $pathwithoutdrive;
-exec("mklink /j mklink_junction directory", $output, $ret_val);
-file_put_contents("mklink_junction\\a.php", "<?php echo \"I am included.\n\" ?>");
-file_put_contents("$fullpath\\mnt\\test\\directory\\b.php", "<?php echo \"I am included.\n\" ?>");
-print_r(scandir("mklink_junction"));
-print_r(scandir("$fullpath\\mnt\\test\\directory"));
-print_r(scandir("$fullpath\\mnt\\test\\mklink_junction"));
-unlink("$fullpath\\mnt\\test\\directory\\b.php");
-unlink("mklink_junction\\a.php");
-chdir($old_dir);
-rmdir(__DIR__ . "\\mnt\\test\\directory");
-rmdir(__DIR__ . "\\mnt\\test\\mklink_junction");
-rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
-rmdir(__DIR__ . "\\mnt\\test");
-rmdir(__DIR__ . "\\mnt");
-
-?>
---EXPECT--
-Array
-(
- [0] => .
- [1] => ..
- [2] => a.php
- [3] => b.php
-)
-Array
-(
- [0] => .
- [1] => ..
- [2] => a.php
- [3] => b.php
-)
-Array
-(
- [0] => .
- [1] => ..
- [2] => a.php
- [3] => b.php
-)
+--TEST--
+Bug#48746 - Junction not working properly
+
+--CREDITS--
+Venkat Raman Don (don.raman@microsoft.com)
+
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+include_once __DIR__ . '/common.inc';
+$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);
+if (strpos($ret, 'privilege')) {
+ die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
+}
+unlink('bug48746_tmp.lnk');
+?>
+--FILE--
+<?php
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
+$old_dir = __DIR__;
+$dirname = __DIR__ . "\\mnt\\test\\directory";
+exec("mkdir " . $dirname, $output, $ret_val);
+chdir(__DIR__ . "\\mnt\\test");
+$drive = substr(__DIR__, 0, 2);
+$pathwithoutdrive = substr(__DIR__, 2);
+$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
+exec("mklink /j mounted_volume " . $ret, $output, $ret_val);
+$fullpath = "mounted_volume" . $pathwithoutdrive;
+exec("mklink /j mklink_junction directory", $output, $ret_val);
+file_put_contents("mklink_junction\\a.php", "<?php echo \"I am included.\n\" ?>");
+file_put_contents("$fullpath\\mnt\\test\\directory\\b.php", "<?php echo \"I am included.\n\" ?>");
+print_r(scandir("mklink_junction"));
+print_r(scandir("$fullpath\\mnt\\test\\directory"));
+print_r(scandir("$fullpath\\mnt\\test\\mklink_junction"));
+unlink("$fullpath\\mnt\\test\\directory\\b.php");
+unlink("mklink_junction\\a.php");
+chdir($old_dir);
+rmdir(__DIR__ . "\\mnt\\test\\directory");
+rmdir(__DIR__ . "\\mnt\\test\\mklink_junction");
+rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
+rmdir(__DIR__ . "\\mnt\\test");
+rmdir(__DIR__ . "\\mnt");
+
+?>
+--EXPECT--
+Array
+(
+ [0] => .
+ [1] => ..
+ [2] => a.php
+ [3] => b.php
+)
+Array
+(
+ [0] => .
+ [1] => ..
+ [2] => a.php
+ [3] => b.php
+)
+Array
+(
+ [0] => .
+ [1] => ..
+ [2] => a.php
+ [3] => b.php
+)
diff --git a/ext/standard/tests/file/windows_links/bug48746_3.phpt b/ext/standard/tests/file/windows_links/bug48746_3.phpt
index 98e81787b8..83bdea3a8c 100644
--- a/ext/standard/tests/file/windows_links/bug48746_3.phpt
+++ b/ext/standard/tests/file/windows_links/bug48746_3.phpt
@@ -1,50 +1,50 @@
---TEST--
-Bug#48746 - Junction not working properly
-
---CREDITS--
-Venkat Raman Don (don.raman@microsoft.com)
-
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
-}
-include_once __DIR__ . '/common.inc';
-$ret = exec(get_junction().' /? 2>&1', $out);
-if (strpos($out[0], 'recognized')) {
- die('skip. junction.exe not found in PATH.');
-}
-
-?>
---FILE--
-<?php
-include_once __DIR__ . '/common.inc';
-$old_dir = __DIR__;
-$dirname = __DIR__ . "\\mnt\\test\\directory";
-exec("mkdir " . $dirname, $output, $ret_val);
-chdir(__DIR__ . "\\mnt\\test");
-exec(get_junction()." junction directory", $output, $ret_val);
-file_put_contents("junction\\a.php", "<?php echo \"I am included.\n\" ?>");
-file_put_contents("junction\\b.php", "<?php echo \"I am included.\n\" ?>");
-include "junction/a.php";
-require_once "junction\\b.php";
-print_r(scandir("junction"));
-unlink("junction\\a.php");
-unlink("junction\\b.php");
-chdir($old_dir);
-rmdir(__DIR__ . "\\mnt\\test\\directory");
-rmdir(__DIR__ . "\\mnt\\test\\junction");
-rmdir(__DIR__ . "\\mnt\\test");
-rmdir(__DIR__ . "\\mnt");
-
-?>
---EXPECT--
-I am included.
-I am included.
-Array
-(
- [0] => .
- [1] => ..
- [2] => a.php
- [3] => b.php
-)
+--TEST--
+Bug#48746 - Junction not working properly
+
+--CREDITS--
+Venkat Raman Don (don.raman@microsoft.com)
+
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+include_once __DIR__ . '/common.inc';
+$ret = exec(get_junction().' /? 2>&1', $out);
+if (strpos($out[0], 'recognized')) {
+ die('skip. junction.exe not found in PATH.');
+}
+
+?>
+--FILE--
+<?php
+include_once __DIR__ . '/common.inc';
+$old_dir = __DIR__;
+$dirname = __DIR__ . "\\mnt\\test\\directory";
+exec("mkdir " . $dirname, $output, $ret_val);
+chdir(__DIR__ . "\\mnt\\test");
+exec(get_junction()." junction directory", $output, $ret_val);
+file_put_contents("junction\\a.php", "<?php echo \"I am included.\n\" ?>");
+file_put_contents("junction\\b.php", "<?php echo \"I am included.\n\" ?>");
+include "junction/a.php";
+require_once "junction\\b.php";
+print_r(scandir("junction"));
+unlink("junction\\a.php");
+unlink("junction\\b.php");
+chdir($old_dir);
+rmdir(__DIR__ . "\\mnt\\test\\directory");
+rmdir(__DIR__ . "\\mnt\\test\\junction");
+rmdir(__DIR__ . "\\mnt\\test");
+rmdir(__DIR__ . "\\mnt");
+
+?>
+--EXPECT--
+I am included.
+I am included.
+Array
+(
+ [0] => .
+ [1] => ..
+ [2] => a.php
+ [3] => b.php
+)
diff --git a/ext/standard/tests/file/windows_links/bug73962.phpt b/ext/standard/tests/file/windows_links/bug73962.phpt
index 6d578386e6..9be48c7eeb 100644
--- a/ext/standard/tests/file/windows_links/bug73962.phpt
+++ b/ext/standard/tests/file/windows_links/bug73962.phpt
@@ -1,77 +1,77 @@
---TEST--
-Bug #73962 bug with symlink related to cyrillic directory
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
-}
-include_once __DIR__ . '/common.inc';
-$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);
-if (strpos($ret, 'privilege')) {
- die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
-}
-unlink('bug48746_tmp.lnk');
-?>
---FILE--
-<?php
-include_once __DIR__ . '/common.inc';
-$mountvol = get_mountvol();
-$old_dir = __DIR__;
-$dirname = '"' . __DIR__ . "\\mnt\\test\\новая папка" . '"';
-exec("mkdir " . $dirname, $output, $ret_val);
-chdir(__DIR__ . "\\mnt\\test");
-$drive = substr(__DIR__, 0, 2);
-$pathwithoutdrive = substr(__DIR__, 2);
-$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
-exec("mklink /d mounted_volume " . $ret, $output, $ret_val);
-$fullpath = "mounted_volume" . $pathwithoutdrive;
-exec("mklink /d mklink_symlink \"новая папка\"", $output, $ret_val);
-file_put_contents("mklink_symlink\\a.php", "<?php echo \"I am included.\n\" ?>");
-file_put_contents("$fullpath\\mnt\\test\\новая папка\\b.php", "<?php echo \"I am included.\n\" ?>");
-var_dump(scandir("mklink_symlink"));
-var_dump(scandir("$fullpath\\mnt\\test\\новая папка"));
-var_dump(scandir("$fullpath\\mnt\\test\\mklink_symlink"));
-var_dump(is_readable("$fullpath\\mnt\\test\\mklink_symlink\b.php"));
-unlink("$fullpath\\mnt\\test\\новая папка\\b.php");
-unlink("mklink_symlink\\a.php");
-chdir($old_dir);
-rmdir(__DIR__ . "\\mnt\\test\\новая папка");
-rmdir(__DIR__ . "\\mnt\\test\\mklink_symlink");
-rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
-rmdir(__DIR__ . "\\mnt\\test");
-rmdir(__DIR__ . "\\mnt");
-
-?>
---EXPECT--
-array(4) {
- [0]=>
- string(1) "."
- [1]=>
- string(2) ".."
- [2]=>
- string(5) "a.php"
- [3]=>
- string(5) "b.php"
-}
-array(4) {
- [0]=>
- string(1) "."
- [1]=>
- string(2) ".."
- [2]=>
- string(5) "a.php"
- [3]=>
- string(5) "b.php"
-}
-array(4) {
- [0]=>
- string(1) "."
- [1]=>
- string(2) ".."
- [2]=>
- string(5) "a.php"
- [3]=>
- string(5) "b.php"
-}
-bool(true)
-
+--TEST--
+Bug #73962 bug with symlink related to cyrillic directory
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) != 'WIN' ) {
+ die('skip windows only test');
+}
+include_once __DIR__ . '/common.inc';
+$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);
+if (strpos($ret, 'privilege')) {
+ die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
+}
+unlink('bug48746_tmp.lnk');
+?>
+--FILE--
+<?php
+include_once __DIR__ . '/common.inc';
+$mountvol = get_mountvol();
+$old_dir = __DIR__;
+$dirname = '"' . __DIR__ . "\\mnt\\test\\новая папка" . '"';
+exec("mkdir " . $dirname, $output, $ret_val);
+chdir(__DIR__ . "\\mnt\\test");
+$drive = substr(__DIR__, 0, 2);
+$pathwithoutdrive = substr(__DIR__, 2);
+$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val);
+exec("mklink /d mounted_volume " . $ret, $output, $ret_val);
+$fullpath = "mounted_volume" . $pathwithoutdrive;
+exec("mklink /d mklink_symlink \"новая папка\"", $output, $ret_val);
+file_put_contents("mklink_symlink\\a.php", "<?php echo \"I am included.\n\" ?>");
+file_put_contents("$fullpath\\mnt\\test\\новая папка\\b.php", "<?php echo \"I am included.\n\" ?>");
+var_dump(scandir("mklink_symlink"));
+var_dump(scandir("$fullpath\\mnt\\test\\новая папка"));
+var_dump(scandir("$fullpath\\mnt\\test\\mklink_symlink"));
+var_dump(is_readable("$fullpath\\mnt\\test\\mklink_symlink\b.php"));
+unlink("$fullpath\\mnt\\test\\новая папка\\b.php");
+unlink("mklink_symlink\\a.php");
+chdir($old_dir);
+rmdir(__DIR__ . "\\mnt\\test\\новая папка");
+rmdir(__DIR__ . "\\mnt\\test\\mklink_symlink");
+rmdir(__DIR__ . "\\mnt\\test\\mounted_volume");
+rmdir(__DIR__ . "\\mnt\\test");
+rmdir(__DIR__ . "\\mnt");
+
+?>
+--EXPECT--
+array(4) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(5) "a.php"
+ [3]=>
+ string(5) "b.php"
+}
+array(4) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(5) "a.php"
+ [3]=>
+ string(5) "b.php"
+}
+array(4) {
+ [0]=>
+ string(1) "."
+ [1]=>
+ string(2) ".."
+ [2]=>
+ string(5) "a.php"
+ [3]=>
+ string(5) "b.php"
+}
+bool(true)
+