summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-03-06 16:38:18 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-03-06 16:38:49 +0100
commitdc4f42508dc109d6e8d86ab279b8438bb341f112 (patch)
treeaffae5a6e23088ba7e3a72ade1881c2c8a63b702
parentb84277297ae18f11055a5731a881a347df8d76b9 (diff)
downloadphp-git-dc4f42508dc109d6e8d86ab279b8438bb341f112.tar.gz
Skip test on Windows if privileges are insufficient
-rw-r--r--ext/spl/tests/bug68825.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/spl/tests/bug68825.phpt b/ext/spl/tests/bug68825.phpt
index b1ed5fb60f..5eec04ea16 100644
--- a/ext/spl/tests/bug68825.phpt
+++ b/ext/spl/tests/bug68825.phpt
@@ -1,5 +1,16 @@
--TEST--
Bug #68825 (Exception in DirectoryIterator::getLinkTarget())
+--SKIPIF--
+<?php
+if (PHP_OS_FAMILY === 'Windows') {
+ $fn = "bug68825.lnk";
+ $ret = exec("mklink $fn " . __FILE__ .' 2>&1', $out);
+ @unlink($fn);
+ if (strpos($ret, 'privilege')) {
+ die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
+ }
+}
+?>
--FILE--
<?php
$dir = __DIR__ . '/bug68825';