Re: cvs: php-src(PHP_5_3) /ext/standard/tests/dir readdir_variation2.phpt rewinddir_variation2.phpt

From: Date: Mon, 18 Aug 2008 23:23:18 +0000
Subject: Re: cvs: php-src(PHP_5_3) /ext/standard/tests/dir readdir_variation2.phpt rewinddir_variation2.phpt
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-52508@lists.php.net to get a copy of this message
Hi, On Monday 18 August 2008 12:25:25 Jani Taskinen wrote: > Arnaud Le Blanc wrote: > > lbarnaud Mon Aug 18 04:45:49 2008 UTC > > > > Modified files: (Branch: PHP_5_3) > > /php-src/ext/standard/tests/dir rewinddir_variation2.phpt > > readdir_variation2.phpt > > Log: > > MFH: Fix tests (closes #45841) > > > > > > http://cvs.php.net/viewvc.cgi/php- src/ext/standard/tests/dir/rewinddir_variation2.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u > > Index: php-src/ext/standard/tests/dir/rewinddir_variation2.phpt > > diff -u php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.4.2 php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.4.3 > > --- php-src/ext/standard/tests/dir/rewinddir_variation2.phpt:1.1.4.2 Fri Mar 7 16:12:03 2008 > > +++ php-src/ext/standard/tests/dir/rewinddir_variation2.phpt Mon Aug 18 04:45:49 2008 > > @@ -36,7 +36,7 @@ > > > > -- Create the directory handle, read and close the directory -- > > resource(%d) of type (stream) > > -string(1) "." > > +string(%d) "%s" > > Why not ".%s" for both lines? :) > I'm not sure if %s allows empty string though.. It would have been simpler, but as you said %s does not allow empty strings ;) > > --Jani > > > > -- Call to rewinddir() -- > > > > http://cvs.php.net/viewvc.cgi/php- src/ext/standard/tests/dir/readdir_variation2.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u > > Index: php-src/ext/standard/tests/dir/readdir_variation2.phpt > > diff -u php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.4.2 php- src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.4.3 > > --- php-src/ext/standard/tests/dir/readdir_variation2.phpt:1.1.4.2 Tue Mar 4 17:09:24 2008 > > +++ php-src/ext/standard/tests/dir/readdir_variation2.phpt Mon Aug 18 04:45:49 2008 > > @@ -18,11 +18,20 @@ > > $dir_handle = opendir($path); > > > > echo "\n-- Pass an empty directory to readdir() --\n"; > > +function mysort($a,$b) { > > + return strlen($a) > strlen($b) ? 1 : -1; > > +} > > +$entries = array(); > > while(FALSE !== ($file = readdir($dir_handle))){ > > - var_dump($file); > > + $entries[] = $file; > > } > > > > closedir($dir_handle); > > + > > +usort($entries, "mysort"); > > +foreach($entries as $entry) { > > + var_dump($entry); > > +} > > ?> > > ===DONE=== > > --CLEAN-- > > > > > > > > Regards, Arnaud

« previous php.cvs (#52508) next »