com php-src: Fixed test fails for bug68557: ext/spl/tests/bug68557-win32.phpt ext/spl/tests/bug68557.phpt

From: Date: Mon, 23 Feb 2015 09:35:16 +0000
Subject: com php-src: Fixed test fails for bug68557: ext/spl/tests/bug68557-win32.phpt ext/spl/tests/bug68557.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85062@lists.php.net to get a copy of this message
Commit: d5a1a3342b0a9a0e571896d19e275435903bcce6 Author: Xinchen Hui <laruence@php.net> Sat, 21 Feb 2015 12:36:38 +0800 Committer: Julien Pauli <jpauli@php.net> Mon, 23 Feb 2015 10:35:16 +0100 Parents: 591dbcabe57a32550fb73223521fa1323773628f Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d5a1a3342b0a9a0e571896d19e275435903bcce6 Log: Fixed test fails for bug68557 Bugs: https://bugs.php.net/68557 Changed paths: D ext/spl/tests/bug68557-win32.phpt M ext/spl/tests/bug68557.phpt Diff: diff --git a/ext/spl/tests/bug68557-win32.phpt b/ext/spl/tests/bug68557-win32.phpt deleted file mode 100644 index 95502a5..0000000 --- a/ext/spl/tests/bug68557-win32.phpt +++ /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" - diff --git a/ext/spl/tests/bug68557.phpt b/ext/spl/tests/bug68557.phpt index c862bda..c1ac952 100644 --- a/ext/spl/tests/bug68557.phpt +++ b/ext/spl/tests/bug68557.phpt @@ -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)

« previous php.cvs (#85062) next »