]> granicus.if.org Git - php/commitdiff
Fixed test fails for bug68557
authorXinchen Hui <laruence@php.net>
Sat, 21 Feb 2015 04:36:38 +0000 (12:36 +0800)
committerXinchen Hui <laruence@php.net>
Sat, 21 Feb 2015 04:36:38 +0000 (12:36 +0800)
ext/spl/tests/bug68557-win32.phpt [deleted file]
ext/spl/tests/bug68557.phpt

diff --git a/ext/spl/tests/bug68557-win32.phpt b/ext/spl/tests/bug68557-win32.phpt
deleted file mode 100644 (file)
index 95502a5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
---TEST--
-Bug #68557 (SplFileInfo::getPathname() may be broken)
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
-    die('skip.. only for Windows');
-}
-?>
---FILE--
-<?php
-mkdir(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
-touch(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'a');
-touch(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'b');
-
-$d = new DirectoryIterator(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
-
-$d->seek(0);
-var_dump($d->current()->getPathname());
-
-$d->seek(1);
-var_dump($d->current()->getPathname());
-
-$d->seek(0);
-var_dump($d->current()->getPathname());
-
-$d->seek(1);
-var_dump($d->current()->getPathname());
-
-$d->seek(2);
-var_dump($d->current()->getPathname());
-?>
---CLEAN--
-<?php
-unlink(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'a');
-unlink(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'b');
-rmdir(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
-?>
---EXPECTF--
-string(%d) "%s\tmp\."
-string(%d) "%s\tmp\.."
-string(%d) "%s\tmp\."
-string(%d) "%s\tmp\.."
-string(%d) "%s\tmp\a"
-
index c862bda7cf69627c3098b2c7dc5fbbab2e0384e1..c1ac95257b164645cb00b285d0183aa54823e774 100644 (file)
@@ -1,11 +1,5 @@
 --TEST--
 Bug #68557 (SplFileInfo::getPathname() may be broken)
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-    die('skip.. Not for Windows');
-}
-?>
 --FILE--
 <?php
 mkdir(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
@@ -15,19 +9,25 @@ touch(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'b');
 $d = new DirectoryIterator(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
 
 $d->seek(0);
-var_dump($d->current()->getPathname());
+$path0 = $d->current()->getPathname();
 
 $d->seek(1);
-var_dump($d->current()->getPathname());
+$path1 = $d->current()->getPathname();
+
+$d->seek(2);
+$path2 = $d->current()->getPathname();
 
 $d->seek(0);
-var_dump($d->current()->getPathname());
+var_dump($path0 === $d->current()->getPathname());
 
 $d->seek(1);
-var_dump($d->current()->getPathname());
+var_dump($path1 === $d->current()->getPathname());
 
 $d->seek(2);
-var_dump($d->current()->getPathname());
+var_dump($path2 === $d->current()->getPathname());
+
+$d->seek(0);
+var_dump($path0 === $d->current()->getPathname());
 ?>
 --CLEAN--
 <?php
@@ -36,9 +36,7 @@ unlink(__DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'b');
 rmdir(__DIR__ . DIRECTORY_SEPARATOR . 'tmp');
 ?>
 --EXPECTF--
-string(%d) "%s/tmp/b"
-string(%d) "%s/tmp/a"
-string(%d) "%s/tmp/b"
-string(%d) "%s/tmp/a"
-string(%d) "%s/tmp/.."
-
+bool(true)
+bool(true)
+bool(true)
+bool(true)