com php-src: Use separate directories for win32 dir tests: ext/standard/tests/dir/chdir_basic-win32-mb.phpt ext/
standard/tests/dir/chdir_variation2-win32-mb.phpt e xt/standard/tests/dir/opendir_basic-win32-mb.phpt ext
/standard/tests/dir/opendir_variation4-win32-mb.phpt ext/standard/tests/dir/scandir_variation4-win32-mb .phpt
| From: | Nikita Popov | Date: | Mon, 04 Mar 2019 09:36:55 +0000 |
| Subject: | com php-src: Use separate directories for win32 dir tests: ext/standard/tests/dir/chdir_basic-win32-mb.phpt ext/ standard/tests/dir/chdir_variation2-win32-mb.phpt e xt/standard/tests/dir/opendir_basic-win32-mb.phpt ext /standard/tests/dir/opendir_variation4-win32-mb.phpt ext/standard/tests/dir/scandir_variation4-win32-mb .phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104973@lists.php.net to get a copy of this message | ||
Commit: 15711a4db0805999ee1e372b96f909b3db1a0b1e
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 1 Mar 2019 15:15:31 +0100
Parents: 071e18c6971c4cf64297378b30b945a1b85d682a
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=15711a4db0805999ee1e372b96f909b3db1a0b1e
Log:
Use separate directories for win32 dir tests
Also remove one redundant piece of cleanup code.
Changed paths:
M ext/standard/tests/dir/chdir_basic-win32-mb.phpt
M ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
M ext/standard/tests/dir/opendir_basic-win32-mb.phpt
M ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
M ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
Diff:
diff --git a/ext/standard/tests/dir/chdir_basic-win32-mb.phpt
b/ext/standard/tests/dir/chdir_basic-win32-mb.phpt
index 3cd5d71..d2d590f 100644
--- a/ext/standard/tests/dir/chdir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/chdir_basic-win32-mb.phpt
@@ -18,7 +18,8 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
*/
echo "*** Testing chdir() : basic functionality ***\n";
-$base_dir_path = dirname(__FILE__);
+$base_dir_path = __DIR__ . '/chdir_basic-win32-mb';
+@mkdir($base_dir_path);
$level_one_dir_name = "私はガラスを食べられますlevel_one";
$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
@@ -42,10 +43,11 @@ var_dump(getcwd());
===DONE===
--CLEAN--
<?php
-$file_path = dirname(__FILE__);
-chdir($file_path);
-rmdir("$file_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
-rmdir("$file_path/私はガラスを食べられますlevel_one");
+$base_dir_path = __DIR__ . '/chdir_basic-win32-mb';
+chdir(__DIR__);
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one");
+rmdir($base_dir_path);
?>
--EXPECTF--
*** Testing chdir() : basic functionality ***
diff --git a/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
b/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
index 0d67b0f..9b1d8f1 100644
--- a/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
+++ b/ext/standard/tests/dir/chdir_variation2-win32-mb.phpt
@@ -19,7 +19,8 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
echo "*** Testing chdir() : usage variations ***\n";
-$base_dir_path = dirname(__FILE__);
+$base_dir_path = __DIR__ . '/chdir_variation2-win32-mb';
+@mkdir($base_dir_path);
$level_one_dir_name = "私はガラスを食べられますlevel_one";
$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
@@ -63,19 +64,15 @@ echo "\n-- \$directory =
'../../'私はガラスを食べられますlevel_one':
var_dump(chdir($level_two_dir_path));
var_dump(chdir("../../$level_one_dir_name"));
var_dump(getcwd());
-
-$file_path = dirname(__FILE__);
-chdir($file_path);/* not that PWD is accidentialy one of the dirs to be deleted. */
-rmdir("$file_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
-rmdir("$file_path/私はガラスを食べられますlevel_one");
?>
===DONE===
--CLEAN--
<?php
-$file_path = dirname(__FILE__);
-chdir($file_path);/* not that PWD is accidentialy one of the dirs to be deleted. */
-rmdir("$file_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
-rmdir("$file_path/私はガラスを食べられますlevel_one");
+$base_dir_path = __DIR__ . '/chdir_variation2-win32-mb';
+chdir(__DIR__); /* not that PWD is accidentialy one of the dirs to be deleted. */
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one");
+rmdir($base_dir_path);
?>
--EXPECTF--
*** Testing chdir() : usage variations ***
diff --git a/ext/standard/tests/dir/opendir_basic-win32-mb.phpt
b/ext/standard/tests/dir/opendir_basic-win32-mb.phpt
index ab332d0..8bdba8a 100644
--- a/ext/standard/tests/dir/opendir_basic-win32-mb.phpt
+++ b/ext/standard/tests/dir/opendir_basic-win32-mb.phpt
@@ -19,7 +19,8 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
echo "*** Testing opendir() : basic functionality ***\n";
-$base_dir_path = dirname(__FILE__);
+$base_dir_path = __DIR__ . '/opendir_basic-win32-mb';
+@mkdir($base_dir_path);
$level_one_dir_name = "私はガラスを食べられますlevel_one";
$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
@@ -48,9 +49,10 @@ var_dump($dh2);
===DONE===
--CLEAN--
<?php
-$file_path = dirname(__FILE__);
-rmdir("$file_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
-rmdir("$file_path/私はガラスを食べられますlevel_one");
+$base_dir_path = __DIR__ . '/opendir_basic-win32-mb';
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one");
+rmdir($base_dir_path);
?>
--EXPECTF--
*** Testing opendir() : basic functionality ***
diff --git a/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
b/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
index d77b115..ec9f2b3 100644
--- a/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
+++ b/ext/standard/tests/dir/opendir_variation4-win32-mb.phpt
@@ -19,7 +19,8 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
echo "*** Testing opendir() : usage variation ***\n";
-$base_dir_path = dirname(__FILE__);
+$base_dir_path = __DIR__ . '/opendir_variation4-win32-mb';
+@mkdir($base_dir_path);
$level_one_dir_name = "私はガラスを食べられますlevel_one";
$level_one_dir_path = "$base_dir_path/$level_one_dir_name";
@@ -78,9 +79,10 @@ function clean_dh($dh){
===DONE===
--CLEAN--
<?php
-$file_path = dirname(__FILE__);
-rmdir("$file_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
-rmdir("$file_path/私はガラスを食べられますlevel_one");
+$base_dir_path = __DIR__ . '/opendir_variation4-win32-mb';
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one");
+rmdir($base_dir_path);
?>
--EXPECTF--
*** Testing opendir() : usage variation ***
diff --git a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
index f415f13..24fc04d 100644
--- a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
+++ b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt
@@ -22,7 +22,8 @@ echo "*** Testing scandir() : usage variations ***\n";
// include for create_files/delete_files functions
include (dirname(__FILE__) . '/../file/file.inc');
-$base_dir_path = dirname(__FILE__);
+$base_dir_path = __DIR__ . '/scandir_variation4-win32-mb';
+@mkdir($base_dir_path);
$level_one_dir_path = "$base_dir_path/私はガラスを食べられますlevel_one";
$level_two_dir_path =
"$level_one_dir_path/私はガラスを食べられますlevel_two";
@@ -67,9 +68,10 @@
var_dump(scandir('../../私はガラスを食べられますlevel_one'));
===DONE===
--CLEAN--
<?php
-$dir_path = dirname(__FILE__);
-rmdir("$dir_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
-rmdir("$dir_path/私はガラスを食べられますlevel_one");
+$base_dir_path = __DIR__ . '/scandir_variation4-win32-mb';
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one/私はガラスを食べられますlevel_two");
+rmdir("$base_dir_path/私はガラスを食べられますlevel_one");
+rmdir($base_dir_path);
?>
--EXPECT--
*** Testing scandir() : usage variations ***