Re: test results for current CVS

From: Date: Mon, 07 May 2001 19:18:50 +0000
Subject: Re: test results for current CVS
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-3172@lists.php.net to get a copy of this message
Hi Andi, the problem is partly that dirname.exp expects nonsensical values (why the hell should dirname(d:\foo\bar.inc) return "."?). Also, PHP is inconsistent about (back)slashes. dirname.php: function check_dirname($path) { print "dirname($path) == " . dirname($path) . "\n"; } check_dirname("/foo/"); check_dirname("/foo"); check_dirname("/foo/bar"); check_dirname("d:\\foo\\bar.inc"); check_dirname("/"); check_dirname(".../foo"); check_dirname("./foo"); check_dirname("foobar///"); check_dirname("c:\foo"); dirname.exp: dirname(/foo/) == / dirname(/foo) == / dirname(/foo/bar) == /foo dirname(d:\foo\bar.inc) == . dirname(/) == / dirname(.../foo) == ... dirname(./foo) == . dirname(foobar///) == . dirname(c:\foo) == . dirname.out: dirname(/foo/) == \ dirname(/foo) == \ dirname(/foo/bar) == /foo dirname(d:\foo\bar.inc) == d:\foo dirname(/) == \ dirname(.../foo) == ... dirname(./foo) == . dirname(foobar///) == . dirname(c:\foo) == c: At 20:59 7.5. 2001, Andi Gutmans wrote the following: -------------------------------------------------------------- >At 08:36 PM 5/7/2001 +0200, Cynic wrote: >>Hi, >> >>I've just run tests on php4-200105070945 (NT5 SP1, MSVC 6.0 SP3), >>and this is the outcome: >> >>TEST RESULT SUMMARY >>============================= >>Number of tests: 52 >>Tests skipped: 0 (0.0%) >>Tests failed: 6 ( 12%) >>Tests passed: 46 ( 88%) >>============================= >>Skipped 0 extensions. >>PHP Version: 4.0.6-dev >> >> >>The failed tests are these: >>* dirname.phpt >> I expected it to fail > >What exactly fails in dirname()? What is the input, what is the expected output and what is the >actual output? > >Thanks, > >Andi ------end of quote------ cynic@mail.cz ------------- And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7

« previous php.qa (#3172) next »