Skip to content

Commit ee2f749

Browse files
author
Julien Pauli
committed
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fixed test fails for bug68557
2 parents 97d809a + d5a1a33 commit ee2f749

File tree

2 files changed

+15
-61
lines changed

2 files changed

+15
-61
lines changed

ext/spl/tests/bug68557-win32.phpt

Lines changed: 0 additions & 44 deletions
This file was deleted.

ext/spl/tests/bug68557.phpt

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Bug #68557 (SplFileInfo::getPathname() may be broken)
3-
--SKIPIF--
4-
<?php
5-
if (substr(PHP_OS, 0, 3) == 'WIN') {
6-
die('skip.. Not for Windows');
7-
}
8-
?>
93
--FILE--
104
<?php
115
mkdir(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
@@ -15,19 +9,25 @@ touch(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'b');
159
$d = new DirectoryIterator(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
1610

1711
$d->seek(0);
18-
var_dump($d->current()->getPathname());
12+
$path0 = $d->current()->getPathname();
1913

2014
$d->seek(1);
21-
var_dump($d->current()->getPathname());
15+
$path1 = $d->current()->getPathname();
16+
17+
$d->seek(2);
18+
$path2 = $d->current()->getPathname();
2219

2320
$d->seek(0);
24-
var_dump($d->current()->getPathname());
21+
var_dump($path0 === $d->current()->getPathname());
2522

2623
$d->seek(1);
27-
var_dump($d->current()->getPathname());
24+
var_dump($path1 === $d->current()->getPathname());
2825

2926
$d->seek(2);
30-
var_dump($d->current()->getPathname());
27+
var_dump($path2 === $d->current()->getPathname());
28+
29+
$d->seek(0);
30+
var_dump($path0 === $d->current()->getPathname());
3131
?>
3232
--CLEAN--
3333
<?php
@@ -36,9 +36,7 @@ unlink(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'b');
3636
rmdir(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
3737
?>
3838
--EXPECTF--
39-
string(%d) "%s/tmp/b"
40-
string(%d) "%s/tmp/a"
41-
string(%d) "%s/tmp/b"
42-
string(%d) "%s/tmp/a"
43-
string(%d) "%s/tmp/.."
44-
39+
bool(true)
40+
bool(true)
41+
bool(true)
42+
bool(true)

0 commit comments

Comments
 (0)