jani            Tue Apr  8 10:35:37 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard/tests/dir     rewinddir_basic.phpt 
  Log:
  MFH: Fixed test on systems where order is not guaranteed
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_basic.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_basic.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_basic.phpt:1.1.2.1 
php-src/ext/standard/tests/dir/rewinddir_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/dir/rewinddir_basic.phpt:1.1.2.1 Fri Mar  7 
16:08:58 2008
+++ php-src/ext/standard/tests/dir/rewinddir_basic.phpt Tue Apr  8 10:35:36 2008
@@ -27,18 +27,24 @@
 var_dump($dh1 = opendir($dir_path1));
 var_dump($dh2 = opendir($dir_path2));
 
+$data = array();
 echo "\n-- Read and rewind first directory (argument supplied) --\n";
 while(FALSE !== $file1 = readdir($dh1)) {
-       var_dump($file1);
+       $data[] = $file1;
 }
+sort($data);
+var_dump($data);
 
 var_dump(rewinddir($dh1));
 var_dump(readdir($dh1));
 
+$data = array();
 echo "\n-- Read and rewind second directory (no argument supplied) --\n";
 while(FALSE !== $file2 = readdir()) {
-       var_dump($file2);
+       $data[] = $file2;
 }
+sort($data);
+var_dump($data);
 
 var_dump(rewinddir());
 var_dump(readdir());
@@ -63,16 +69,26 @@
 resource(%d) of type (stream)
 
 -- Read and rewind first directory (argument supplied) --
-string(1) "."
-string(2) ".."
-string(9) "file1.tmp"
+array(3) {
+  [0]=>
+  string(1) "."
+  [1]=>
+  string(2) ".."
+  [2]=>
+  string(9) "file1.tmp"
+}
 NULL
 string(1) "."
 
 -- Read and rewind second directory (no argument supplied) --
-string(1) "."
-string(2) ".."
-string(9) "file2.tmp"
+array(3) {
+  [0]=>
+  string(1) "."
+  [1]=>
+  string(2) ".."
+  [2]=>
+  string(9) "file2.tmp"
+}
 NULL
 string(1) "."
 ===DONE===



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

Reply via email to