diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-03-06 16:38:18 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-03-06 16:38:49 +0100 |
commit | dc4f42508dc109d6e8d86ab279b8438bb341f112 (patch) | |
tree | affae5a6e23088ba7e3a72ade1881c2c8a63b702 | |
parent | b84277297ae18f11055a5731a881a347df8d76b9 (diff) | |
download | php-git-dc4f42508dc109d6e8d86ab279b8438bb341f112.tar.gz |
Skip test on Windows if privileges are insufficient
-rw-r--r-- | ext/spl/tests/bug68825.phpt | 11 |
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'; |