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

From: Date: Sat, 21 Feb 2015 04:36:38 +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-85039@lists.php.net to get a copy of this message
Commit: ea94be490a5e620a86883963fa5dfa421a2477dc Author: Xinchen Hui <laruence@php.net> Sat, 21 Feb 2015 12:36:38 +0800 Parents: 4629f8978e86aa20e6254e7282e6c5a4fb26796c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ea94be490a5e620a86883963fa5dfa421a2477dc 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 (#85039) next »