Skip to content

Commit dc4f425

Browse files
committed
Skip test on Windows if privileges are insufficient
1 parent b842772 commit dc4f425

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ext/spl/tests/bug68825.phpt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
--TEST--
22
Bug #68825 (Exception in DirectoryIterator::getLinkTarget())
3+
--SKIPIF--
4+
<?php
5+
if (PHP_OS_FAMILY === 'Windows') {
6+
$fn = "bug68825.lnk";
7+
$ret = exec("mklink $fn " . __FILE__ .' 2>&1', $out);
8+
@unlink($fn);
9+
if (strpos($ret, 'privilege')) {
10+
die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');
11+
}
12+
}
13+
?>
314
--FILE--
415
<?php
516
$dir = __DIR__ . '/bug68825';

0 commit comments

Comments
 (0)