Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Bug #12741 Failed to test on Linux and FreeBSD
Submitted: 2007-12-21 03:52 UTC
From: inomata Assigned: dufuz
Status: Closed Package: File_Util
PHP Version: 5.2.5 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2007-12-21 03:52 UTC] inomata (Mit Inomata)
Description: ------------ tests/FileTest.php fails on some tests. TestCase FileTest->testrelativePath() failed: expected D:\Data, actual ..\..\D:\Data in /tmp/File-1.3.0/tests/FileTest.php:206 TestCase FileTest->testrealpath() failed: expected /a/weird/path/is, actual /a\weird/path\is in /tmp/File-1.3.0/tests/FileTest.php:218 TestCase FileTest->testrealpath() failed: expected /a/weird/path/is/that, actual /a\weird/path\is/that in /tmp/File-1.3.0/tests/FileTest.php:219 Other tests are succeeded. Test script: --------------- $ php tests/FileTest.php Actual result: -------------- TestCase FileTest->testlocking() passed TestCase FileTest->testclose() passed TestCase FileTest->testreadAll() passed TestCase FileTest->testread() passed TestCase FileTest->testwrite() passed TestCase FileTest->testreadChar() passed TestCase FileTest->testwriteChar() passed TestCase FileTest->testreadLine() passed TestCase FileTest->testwriteLine() passed TestCase FileTest->testrewind() passed TestCase FileTest->testbuildPath() passed TestCase FileTest->testskipRoot() passed TestCase FileTest->testgetTempDir() passed TestCase FileTest->testgetTempFile() passed TestCase FileTest->testisAbsolute() passed TestCase FileTest->testrelativePath() failed: expected D:\Data, actual ..\..\D:\Data in /tmp/File-1.3.0/tests/FileTest.php:206 TestCase FileTest->testrealpath() failed: expected /a/weird/path/is, actual /a\weird/path\is in /tmp/File-1.3.0/tests/FileTest.php:218 TestCase FileTest->testrealpath() failed: expected /a/weird/path/is/that, actual /a\weird/path\is/that in /tmp/File-1.3.0/tests/FileTest.php:219

Comments

 [2008-01-02 00:57 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Just a note to my self, everything passes on Windows Vista (have to boot into linux to test this, one of these days)
 [2008-11-01 09:22 UTC] doconnor (Daniel O'Connor)
Verified in current CVS. TestCase FileTest->testrelativePath() failed: expected D:\Data, actual ..\..\D:\Data in /home/clockwerx/pear/File/tests/FileTest.php:206 TestCase FileTest->testrealpath() failed: expected /a/weird/path/is, actual /a\weird/path\is in /home/clockwerx/pear/File/tests/FileTest.php:218 TestCase FileTest->testrealpath() failed: expected /a/weird/path/is/that, actual /a\weird/path\is/that in /home/clockwerx/pear/File/tests/FileTest.php:219
 [2008-11-01 09:22 UTC] doconnor (Daniel O'Connor)
Side note: after this is resolved, how would you feel about bumping to PHPUnit 3 :P
 [2008-11-01 09:31 UTC] doconnor (Daniel O'Connor)
Looking closer at this, I wouldn't expect it to work the way the test case expects it to. For example, bash doesn't like it if I do: clockwerx@clockwerx-desktop:~$ cd pear\File\tests bash: cd: pearFiletests: No such file or directory clockwerx@clockwerx-desktop:~$ cd pear/File\tests bash: cd: pear/Filetests: No such file or directory clockwerx@clockwerx-desktop:~$ cd pear/File/tests clockwerx@clockwerx-desktop:~/pear/File/tests$ If we wanted to make the test pass at the moment, we'd want to do a str_replace() of any \ before we do anything else in the path; and that starts getting scary.
 [2010-04-26 02:33 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Package: File +Package: File_Util
 [2011-03-15 07:35 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Status: Verified +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.