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..

--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--





--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to