From ea94be490a5e620a86883963fa5dfa421a2477dc Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sat, 21 Feb 2015 12:36:38 +0800 Subject: [PATCH] Fixed test fails for bug68557 --- ext/spl/tests/bug68557-win32.phpt | 44 ------------------------------- ext/spl/tests/bug68557.phpt | 32 +++++++++++----------- 2 files changed, 15 insertions(+), 61 deletions(-) delete mode 100644 ext/spl/tests/bug68557-win32.phpt diff --git a/ext/spl/tests/bug68557-win32.phpt b/ext/spl/tests/bug68557-win32.phpt deleted file mode 100644 index 95502a53e8..0000000000 --- a/ext/spl/tests/bug68557-win32.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Bug #68557 (SplFileInfo::getPathname() may be broken) ---SKIPIF-- - ---FILE-- -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-- - ---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 c862bda7cf..c1ac95257b 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-- - --FILE-- 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-- --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) -- 2.40.0