1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00

Fix conflicts in windows ACL tests

Closes GH-4898.
This commit is contained in:
Fabien Villepinte
2019-11-09 13:55:42 +01:00
parent 9c4b989c75
commit ce41795a9f
4 changed files with 9 additions and 35 deletions
@@ -7,6 +7,7 @@ skipif();
?>
--FILE--
<?php
$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
include_once __DIR__ . '/common.inc';
fix_acls();
@@ -19,7 +20,7 @@ $iteration = array(
echo "Testing file:\n";
$i = 1;
$path = __DIR__ . '/a.txt';
$path = $uniqueBasePath . '_file.txt';
foreach ($iteration as $perms => $exp) {
create_file($path, $perms);
clearstatcache(true, $path);
@@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) {
}
echo "Testing directory:\n";
$path = __DIR__ . '/adir';
$path = $uniqueBasePath . '_dir';
$i = 1;
foreach ($iteration as $perms => $exp) {
create_dir($path, $perms);
@@ -7,6 +7,7 @@ skipif();
?>
--FILE--
<?php
$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.'));
include_once __DIR__ . '/common.inc';
fix_acls();
@@ -19,7 +20,7 @@ $iteration = array(
echo "Testing file:\n";
$i = 1;
$path = __DIR__ . '/a.txt';
$path = $uniqueBasePath . '_file.txt';
foreach ($iteration as $perms => $exp) {
create_file($path, $perms);
clearstatcache(true, $path);
@@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) {
}
echo "Testing directory:\n";
$path = __DIR__ . '/adir';
$path = $uniqueBasePath . '_dir';
$i = 1;
foreach ($iteration as $perms => $exp) {
create_dir($path, $perms);
@@ -9,6 +9,7 @@ skipif();
?>
--FILE--
<?php
$uniqueBaseName = basename(substr(__FILE__, 0, strrpos(__FILE__, '.')));
include_once __DIR__ . '/common.inc';
fix_acls();
@@ -21,7 +22,7 @@ $iteration = array(
echo "Testing file with relative path:\n";
$i = 1;
$path = './a.txt';
$path = './' . $uniqueBaseName . '_file.txt';
foreach ($iteration as $perms => $exp) {
create_file($path, $perms);
clearstatcache(true, $path);
@@ -36,7 +37,7 @@ foreach ($iteration as $perms => $exp) {
}
echo "Testing directory with relative path:\n";
$path = 'adir';
$path = $uniqueBaseName . '_dir';
$i = 1;
foreach ($iteration as $perms => $exp) {
create_dir($path, $perms);
@@ -168,32 +168,3 @@ function delete_dir($path) {
return;
}
}
if (0) {
$path = __DIR__ . '/a.txt';
create_file($path, PHPT_ACL_NONE);
if (!is_writable($path)) {
echo "PHPT_ACL_NONE success!!\n";
} else {
echo "PHPT_ACL_NONE failed!!\n";
}
delete_file($path);
$path = __DIR__ . '/a.txt';
create_file($path, PHPT_ACL_READ);
if (!is_writable($path)) {
echo "PHPT_ACL_READ success!!\n";
} else {
echo "PHPT_ACL_READ failed!!\n";
}
delete_file($path);
$path = __DIR__ . '/adir';
create_dir($path, PHPT_ACL_READ);
if (!is_writable($path)) {
echo "PHPT_ACL_READ dir success!!\n";
} else {
echo "PHPT_ACL_READ dir failed!!\n";
}
delete_dir($path);
}