ant             Tue Dec 30 16:49:44 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard/tests/file    disk_free_space_error.phpt 
                                        disk_total_space_variation.phpt 
                                        fflush_error.phpt 
                                        lstat_stat_variation2.phpt 
                                        
symlink_link_linkinfo_is_link_error2.phpt 
                                        disk_free_space_variation.phpt 
                                        disk_total_space_error.phpt 
                                        fseek_ftell_rewind_error3.phpt 
                                        fpassthru_error.phpt 
                                        006_variation2.phpt 006_error.phpt 
                                        flock_variation.phpt 
                                        ftruncate_error.phpt 
                                        disk_free_space_basic.phpt 
                                        fseek_ftell_rewind_error1.phpt 
                                        fseek_ftell_rewind_error2.phpt 
                                        disk.phpt 
                                        disk_total_space_basic.phpt 
                                        fread_error.phpt 
                                        is_dir_variation2.phpt 
    /php-src/ext/standard/tests/array   array_slice_variation1.phpt 
                                        each_variation4.phpt 
                                        rsort_variation4.phpt 
                                        arsort_variation3.phpt 
                                        array_rand_variation4.phpt 
  Log:
  Revert to the previous version for these tests as they were overwritten by 
mistake (checked on Windows but not on Linux... so the six skipped tests may 
not work correctly... but they should be ok and I'll watch the test results).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_error.phpt?r1=1.1.2.1.2.2&r2=1.1.2.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/disk_free_space_error.phpt
diff -u php-src/ext/standard/tests/file/disk_free_space_error.phpt:1.1.2.1.2.2 
php-src/ext/standard/tests/file/disk_free_space_error.phpt:1.1.2.1.2.3
--- php-src/ext/standard/tests/file/disk_free_space_error.phpt:1.1.2.1.2.2      
Wed Nov 26 10:10:17 2008
+++ php-src/ext/standard/tests/file/disk_free_space_error.phpt  Tue Dec 30 
16:49:43 2008
@@ -1,15 +1,15 @@
 --TEST--
-Test disk_free_space and its alias diskfreespace() functions : error conditions
+Test disk_free_space and its alias diskfreespace() functions : error 
conditions.
 --SKIPIF--
 <?php
-if(substr(PHP_OS, 0, 3) == 'WIN' )
-  die("skip Not Valid for Windows");
+if(substr(PHP_OS, 0, 3) == 'WIN')
+  die("skip Not valid on Windows");
 ?>
 --FILE--
 <?php
 /*
  *  Prototype: float disk_free_space( string directory )
- *  Description: Given a string containing a directory, this function will
+ *  Description: Given a string containing a directory, this function will 
  *               return the number of bytes available on the corresponding 
  *               filesystem or disk partition
  */
@@ -27,7 +27,7 @@
 var_dump( diskfreespace( $file_path."/dir1" ));
 
 $fh = fopen( $file_path."/disk_free_space.tmp", "w" );
-fwrite( $fh, " Garbage data for the temporary file" );
+fwrite( $fh, (binary)" Garbage data for the temporary file" );
 var_dump( disk_free_space( $file_path."/disk_free_space.tmp" )); // file input 
instead of directory
 var_dump( diskfreespace( $file_path."/disk_free_space.tmp" ));
 fclose($fh);
@@ -55,12 +55,13 @@
 Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d
 NULL
 
-Warning: disk_free_space(): %s in %s on line %d
+Warning: disk_free_space(): No such file or directory in %s on line %d
 bool(false)
 
-Warning: diskfreespace(): %s in %s on line %d
+Warning: diskfreespace(): No such file or directory in %s on line %d
 bool(false)
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Done --
+
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_variation.phpt?r1=1.1.2.2.2.2&r2=1.1.2.2.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/disk_total_space_variation.phpt
diff -u 
php-src/ext/standard/tests/file/disk_total_space_variation.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/file/disk_total_space_variation.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/file/disk_total_space_variation.phpt:1.1.2.2.2.2 
Wed Nov 26 10:10:17 2008
+++ php-src/ext/standard/tests/file/disk_total_space_variation.phpt     Tue Dec 
30 16:49:43 2008
@@ -1,5 +1,5 @@
 --TEST--
-Test disk_total_space() functions : usage variations
+Testing disk_total_space() functions : Usage Variations.
 --FILE--
 <?php
 /*
@@ -18,9 +18,9 @@
 $return_value = disk_total_space($file_path); 
 var_dump( is_float($return_value) );
 
-echo "\n*** Testing disk_total_space() function with different directory 
combinations ***";
-
+echo "\n*** Testing with different directory combinations ***";
 $dir = "/disk_total_space";
+
 mkdir($file_path.$dir);
 
 $dirs_arr = array(
@@ -29,7 +29,7 @@
   $file_path."/.".$dir,
 
   /* Testing a file trailing slash */
-  $file_path.$dir."/",
+  $file_path."".$dir."/",
   $file_path."/.".$dir."/",
 
   /* Testing file with double trailing slashes */
@@ -44,6 +44,7 @@
   ".".chr(0).$file_path.$dir.chr(0)
 );
 
+
 $count = 1;
 /* loop through to test each element the above array */
 foreach($dirs_arr as $dir1) {
@@ -52,57 +53,63 @@
   $count++;
 }
 
+echo "*** Testing with Binary Input ***\n";
+var_dump( disk_total_space(b"$file_path") ); 
+
 echo"\n--- Done ---";
 ?>
 
 --CLEAN--
 <?php
 $file_path = dirname(__FILE__);
-$dir = "/disk_total_space";
-rmdir($file_path.$dir);
+rmdir($file_path."/disk_total_space");
 ?>
+
+
 --EXPECTF--
 *** Testing with a directory ***
-float(%f)
+float(%d)
 
 Testing for the return type ***
 bool(true)
 
-*** Testing disk_total_space() function with different directory combinations 
***
+*** Testing with different directory combinations ***
 -- Iteration 1 --
-float(%f)
+float(%d)
 
 -- Iteration 2 --
-float(%f)
+float(%d)
 
 -- Iteration 3 --
-float(%f)
+float(%d)
 
 -- Iteration 4 --
-float(%f)
+float(%d)
 
 -- Iteration 5 --
-float(%f)
+float(%d)
 
 -- Iteration 6 --
-float(%f)
+float(%d)
 
 -- Iteration 7 --
-float(%f)
+float(%d)
 
 -- Iteration 8 --
-float(%f)
+float(%d)
 
 -- Iteration 9 --
-float(%f)
+float(%d)
 
 -- Iteration 10 --
-float(%f)
+float(%d)
 
 -- Iteration 11 --
-float(%f)
+float(%d)
 
 -- Iteration 12 --
-float(%f)
+float(%d)
+*** Testing with Binary Input ***
+float(%d)
 
 --- Done ---
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_error.phpt?r1=1.1.2.1.2.3&r2=1.1.2.1.2.4&diff_format=u
Index: php-src/ext/standard/tests/file/fflush_error.phpt
diff -u php-src/ext/standard/tests/file/fflush_error.phpt:1.1.2.1.2.3 
php-src/ext/standard/tests/file/fflush_error.phpt:1.1.2.1.2.4
--- php-src/ext/standard/tests/file/fflush_error.phpt:1.1.2.1.2.3       Wed Nov 
26 10:10:17 2008
+++ php-src/ext/standard/tests/file/fflush_error.phpt   Tue Dec 30 16:49:43 2008
@@ -24,10 +24,9 @@
    
 var_dump( fflush($file_handle, $file_handle) );
 fclose($file_handle);
-fflush($file_handle);
 
 // test invalid arguments : non-resources
-echo "\n-- Testing fflush(): with invalid arguments --\n";
+echo "-- Testing fflush(): with invalid arguments --\n";
 $invalid_args = array (
   "string",
   10,
@@ -42,7 +41,7 @@
   echo "-- Iteration $loop_counter --\n";
   var_dump( fflush($invalid_args[$loop_counter - 1]) );
 }
-echo "Done\n";
+echo "\n*** Done ***";
 ?>
 
 --CLEAN--
@@ -61,9 +60,6 @@
 
 Warning: fflush() expects exactly 1 parameter, 2 given in %s on line %d
 bool(false)
-
-Warning: fflush(): %d is not a valid stream resource in %s on line %d
-
 -- Testing fflush(): with invalid arguments --
 -- Iteration 1 --
 
@@ -89,5 +85,6 @@
 
 Warning: fflush() expects parameter 1 to be resource, object given in %s on 
line %d
 bool(false)
-Done
+
+*** Done ***
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation2.phpt?r1=1.1.2.3.2.2&r2=1.1.2.3.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/lstat_stat_variation2.phpt
diff -u php-src/ext/standard/tests/file/lstat_stat_variation2.phpt:1.1.2.3.2.2 
php-src/ext/standard/tests/file/lstat_stat_variation2.phpt:1.1.2.3.2.3
--- php-src/ext/standard/tests/file/lstat_stat_variation2.phpt:1.1.2.3.2.2      
Wed Nov 26 10:10:16 2008
+++ php-src/ext/standard/tests/file/lstat_stat_variation2.phpt  Tue Dec 30 
16:49:43 2008
@@ -21,12 +21,13 @@
 require("file.inc");
 
 /* create temp directory */
-mkdir("$file_path/lstat_stat_variation1/");  // temp dir
+...@rmdir("$file_path/lstat_stat_variation2/");  //ensure that dir doesn't 
exists 
+mkdir("$file_path/lstat_stat_variation2/");  // temp dir
 
 // renaming a directory and check stat
 echo "*** Testing stat() for directory after being renamed ***\n";
-$old_dirname = "$file_path/lstat_stat_variation1";
-$new_dirname = "$file_path/lstat_stat_variation1a";
+$old_dirname = "$file_path/lstat_stat_variation2";
+$new_dirname = "$file_path/lstat_stat_variation2a";
 $old_stat = stat($old_dirname);
 clearstatcache();
 var_dump( rename($old_dirname, $new_dirname) );
@@ -36,11 +37,8 @@
 var_dump( compare_self_stat($old_stat) );
 var_dump( compare_self_stat($new_stat) );
 
-// compare the two stats - all except ctime
-$keys_to_compare = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 
-                       "dev", "ino", "mode", "nlink", "uid", "gid",
-                       "rdev", "size", "atime", "mtime", "blksize", "blocks");
-var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) );
+// compare the two stats
+var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys) );
 // clear the cache
 clearstatcache();
 
@@ -50,7 +48,7 @@
 --CLEAN--
 <?php
 $file_path = dirname(__FILE__);
-rmdir("$file_path/lstat_stat_variation1a");
+rmdir("$file_path/lstat_stat_variation2a");
 ?>
 --EXPECTF--
 *** Testing stat() for directory after being renamed ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt?r1=1.1.2.2.2.3&r2=1.1.2.2.2.4&diff_format=u
Index: php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
diff -u 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.1.2.2.2.3
 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.1.2.2.2.4
--- 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.1.2.2.2.3
       Wed Nov 26 10:10:17 2008
+++ php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt   
Tue Dec 30 16:49:43 2008
@@ -5,7 +5,7 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
     die('skip no symlinks on Windows');
 }
-if (PHP_INT_SIZE != 4) {
+if (PHP_INT_SIZE != 4 ) {
   die("skip this test is for 32bit platform only");
 }
 ?>
@@ -42,7 +42,6 @@
 //invalid arguments
 var_dump( link(NULL, $linkname) );  // NULL as filename
 var_dump( link('', $linkname) );  // empty string as filename
-var_dump( link(' ', $linkname) );  // space as filename
 var_dump( link(false, $linkname) );  // boolean false as filename
 var_dump( link($filename, NULL) );  // NULL as linkname
 var_dump( link($filename, '') );  // '' as linkname
@@ -58,7 +57,6 @@
 //invalid arguments
 var_dump( is_link(NULL) );  // NULL as linkname
 var_dump( is_link('') );  // empty string as linkname
-var_dump( is_link(' ') );  // space as linkname
 var_dump( is_link(false) );  // boolean false as linkname
 var_dump( is_link($filename) );  // file given to is_link
 
@@ -77,25 +75,22 @@
 Warning: link() expects exactly 2 parameters, 3 given in %s on line %d
 NULL
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
-bool(false)
-
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
 *** Testing is_link() for error conditions ***
@@ -109,6 +104,4 @@
 bool(false)
 bool(false)
 bool(false)
-bool(false)
 Done
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_variation.phpt?r1=1.1.2.2.2.2&r2=1.1.2.2.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/disk_free_space_variation.phpt
diff -u 
php-src/ext/standard/tests/file/disk_free_space_variation.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/file/disk_free_space_variation.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/file/disk_free_space_variation.phpt:1.1.2.2.2.2  
Wed Nov 26 10:10:16 2008
+++ php-src/ext/standard/tests/file/disk_free_space_variation.phpt      Tue Dec 
30 16:49:43 2008
@@ -1,5 +1,5 @@
 --TEST--
-Test disk_free_space and its alias diskfreespace() functions : usage variations
+Test disk_free_space and its alias diskfreespace() functions : Usage Variations
 --FILE--
 <?php
 /*
@@ -11,16 +11,15 @@
 
 $file_path = dirname(__FILE__);
 
-echo "*** Testing disk_free_space() function with a directory ***\n";
+echo "*** Testing with a directory ***\n";
 var_dump( disk_free_space($file_path."/..") ); 
 var_dump( diskfreespace($file_path."/..") ); 
 
-echo "\n*** Testing for the return type ***\n";
+echo "\nTesting for the return type ***\n";
 $return_value = disk_free_space($file_path); 
 var_dump( is_float($return_value) );
 
-echo "\n*** Testing disk_free_space() function with different styles of file 
and directory ***";
-
+echo "\n*** Testing with different directory combinations ***";
 $dir = "/disk_free_space";
 mkdir($file_path.$dir);
 
@@ -42,15 +41,15 @@
   $file_path.$dir.chr(0),
   $file_path."/.".$dir.chr(0),
   ".".chr(0).$file_path.$dir,
-  ".".chr(0).$file_path.$dir.chr(0) 
+  ".".chr(0).$file_path.$dir.chr(0)
 );
 
 $count = 1;
 /* loop through to test each element the above array */
-foreach($dirs_arr as $dir) {
+foreach($dirs_arr as $dir1) {
   echo "\n-- Iteration $count --\n";
-  var_dump( disk_free_space( $dir ) );
-  var_dump( diskfreespace( $dir ) );
+  var_dump( disk_free_space( $dir1 ) );
+  var_dump( diskfreespace( $dir1 ) );
   $count++;
 }
 
@@ -59,65 +58,66 @@
 
 --CLEAN--
 <?php
-$file_path = dirname(__FILE__)."/disk_free_space";
-rmdir($file_path);
+$file_path = dirname(__FILE__);
+rmdir($file_path."/disk_free_space");
 ?>
 
+
 --EXPECTF--
-*** Testing disk_free_space() function with a directory ***
-float(%f)
-float(%f)
+*** Testing with a directory ***
+float(%d)
+float(%d)
 
-*** Testing for the return type ***
+Testing for the return type ***
 bool(true)
 
-*** Testing disk_free_space() function with different styles of file and 
directory ***
+*** Testing with different directory combinations ***
 -- Iteration 1 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 2 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 3 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 4 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 5 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 6 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 7 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 8 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 9 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 10 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 11 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 -- Iteration 12 --
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 --- Done ---
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_error.phpt?r1=1.1.2.1.2.2&r2=1.1.2.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/disk_total_space_error.phpt
diff -u php-src/ext/standard/tests/file/disk_total_space_error.phpt:1.1.2.1.2.2 
php-src/ext/standard/tests/file/disk_total_space_error.phpt:1.1.2.1.2.3
--- php-src/ext/standard/tests/file/disk_total_space_error.phpt:1.1.2.1.2.2     
Wed Nov 26 10:10:19 2008
+++ php-src/ext/standard/tests/file/disk_total_space_error.phpt Tue Dec 30 
16:49:43 2008
@@ -2,14 +2,14 @@
 Test disk_total_space() function : error conditions
 --SKIPIF--
 <?php
-if(substr(PHP_OS, 0, 3) == 'WIN' )
-  die("skip Not Valid for Windows");
+if(substr(PHP_OS, 0, 3) == 'WIN')
+  die("skip Not valid on Windows");
 ?>
 --FILE--
 <?php
 /*
  *  Prototype: float disk_total_space( string $directory );
- *  Description: given a string containing a directory, this function
+ *  Description: given a string containing a directory, this function 
  *               will return the total number of bytes on the corresponding 
  *               filesystem or disk partition
  */
@@ -24,7 +24,7 @@
 var_dump( disk_total_space( $file_path."/dir1" )); // Invalid directory
 
 $fh = fopen( $file_path."/disk_total_space.tmp", "w" );
-fwrite( $fh, " Garbage data for the temporary file" );
+fwrite( $fh, (binary)" Garbage data for the temporary file" );
 var_dump( disk_total_space( $file_path."/disk_total_space.tmp" )); // file 
input instead of directory
 fclose($fh);
 
@@ -46,6 +46,7 @@
 
 Warning: disk_total_space(): No such file or directory in %s on line %d
 bool(false)
-float(%f)
+float(%d)
 
 --- Done ---
+
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt?r1=1.1.2.2.2.2&r2=1.1.2.2.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt
diff -u 
php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt:1.1.2.2.2.2  
Wed Nov 26 10:10:17 2008
+++ php-src/ext/standard/tests/file/fseek_ftell_rewind_error3.phpt      Tue Dec 
30 16:49:43 2008
@@ -87,10 +87,9 @@
 Warning: rewind() expects parameter 1 to be resource, object given in %s on 
line %d
 bool(false)
 -- Testing rewind() with closed/unset file handle --
-Warning: rewind(): %d is not a valid stream resource in %s on line %d
+Warning: rewind(): 5 is not a valid stream resource in %s on line %d
 bool(false)
 
 Warning: rewind() expects parameter 1 to be resource, null given in %s on line 
%d
 bool(false)
 Done
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fpassthru_error.phpt?r1=1.1.2.1.2.2&r2=1.1.2.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/fpassthru_error.phpt
diff -u php-src/ext/standard/tests/file/fpassthru_error.phpt:1.1.2.1.2.2 
php-src/ext/standard/tests/file/fpassthru_error.phpt:1.1.2.1.2.3
--- php-src/ext/standard/tests/file/fpassthru_error.phpt:1.1.2.1.2.2    Wed Nov 
26 10:10:17 2008
+++ php-src/ext/standard/tests/file/fpassthru_error.phpt        Tue Dec 30 
16:49:43 2008
@@ -20,11 +20,6 @@
 /* No.of args greaer than expected */
 var_dump( fpassthru("", "") );
 
-/* fpassthru on a closed file */
-$h = fopen(__FILE__,'r');
-fclose($h);
-fpassthru($h);
-
 echo "\n*** Done ***\n";
 
 ?>
@@ -42,7 +37,4 @@
 Warning: fpassthru() expects exactly 1 parameter, 2 given in %s on line %d
 bool(false)
 
-Warning: fpassthru(): 5 is not a valid stream resource in %s on line %d
-
 *** Done ***
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/006_variation2.phpt?r1=1.1.2.3.2.2&r2=1.1.2.3.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/006_variation2.phpt
diff -u php-src/ext/standard/tests/file/006_variation2.phpt:1.1.2.3.2.2 
php-src/ext/standard/tests/file/006_variation2.phpt:1.1.2.3.2.3
--- php-src/ext/standard/tests/file/006_variation2.phpt:1.1.2.3.2.2     Wed Nov 
26 10:10:18 2008
+++ php-src/ext/standard/tests/file/006_variation2.phpt Tue Dec 30 16:49:43 2008
@@ -11,7 +11,7 @@
 fclose($fp);
 if(fileowner($filename) == 0) {
         unlink ($filename);
-        die('skip...cannot be run as root\n');
+        die('skip cannot be run as root');
 }
 
 unlink($filename);
@@ -94,94 +94,93 @@
 *** Testing fileperms(), chmod() with miscellaneous permissions ***
 -- Iteration 1 --
 bool(true)
-%d
+107777
 bool(true)
-%d
+47777
 -- Iteration 2 --
 bool(true)
-%d
+100000
 bool(true)
-%d
+40000
 -- Iteration 3 --
 bool(true)
-%d
+101000
 bool(true)
-%d
+41000
 -- Iteration 4 --
 bool(true)
-%d
+101111
 bool(true)
-%d
+41111
 -- Iteration 5 --
 bool(true)
-%d
+107001
 bool(true)
-%d
+47001
 -- Iteration 6 --
 bool(true)
-%d
+100001
 bool(true)
-%d
+40001
 -- Iteration 7 --
 bool(true)
-%d
+101411
 bool(true)
-%d
+41411
 -- Iteration 8 --
 bool(true)
-%d
+107141
 bool(true)
-%d
+47141
 -- Iteration 9 --
 bool(true)
-%d
+100637
 bool(true)
-%d
+40637
 -- Iteration 10 --
 bool(true)
-%d
+103567
 bool(true)
-%d
+43567
 -- Iteration 11 --
 bool(true)
-%d
+103567
 bool(true)
-%d
+43567
 -- Iteration 12 --
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+103567
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+43567
 -- Iteration 13 --
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+103567
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+43567
 -- Iteration 14 --
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+103567
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+43567
 -- Iteration 15 --
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+103567
 
 Warning: chmod() expects parameter 2 to be long, string given in %s on line %d
 NULL
-%d
+43567
 *** Done ***
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/006_error.phpt?r1=1.1.2.3.2.3&r2=1.1.2.3.2.4&diff_format=u
Index: php-src/ext/standard/tests/file/006_error.phpt
diff -u php-src/ext/standard/tests/file/006_error.phpt:1.1.2.3.2.3 
php-src/ext/standard/tests/file/006_error.phpt:1.1.2.3.2.4
--- php-src/ext/standard/tests/file/006_error.phpt:1.1.2.3.2.3  Wed Nov 26 
10:10:19 2008
+++ php-src/ext/standard/tests/file/006_error.phpt      Tue Dec 30 16:49:43 2008
@@ -11,7 +11,7 @@
 fclose($fp);
 if(fileowner($filename) == 0) {
         unlink ($filename);
-        die('skip...cannot be run as root\n');
+        die('skip cannot be run as root');
 }
 
 unlink($filename);
@@ -68,13 +68,13 @@
 --EXPECTF--
 *** Testing error conditions for fileperms(), chmod() ***
 
-Warning: chmod(): Operation not permitted in %s on line %d
+Warning: chmod(): %s in %s on line %d
 bool(false)
-%d
+100%d44
 
-Warning: chmod(): Operation not permitted in %s on line %d
+Warning: chmod(): %s in %s on line %d
 bool(false)
-%d
+40755
 
 Warning: chmod(): No such file or directory in %s on line %d
 bool(false)
@@ -105,4 +105,3 @@
 NULL
 
 *** Done ***
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/flock_variation.phpt?r1=1.1.2.1.2.2&r2=1.1.2.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/flock_variation.phpt
diff -u php-src/ext/standard/tests/file/flock_variation.phpt:1.1.2.1.2.2 
php-src/ext/standard/tests/file/flock_variation.phpt:1.1.2.1.2.3
--- php-src/ext/standard/tests/file/flock_variation.phpt:1.1.2.1.2.2    Wed Nov 
26 10:10:19 2008
+++ php-src/ext/standard/tests/file/flock_variation.phpt        Tue Dec 30 
16:49:43 2008
@@ -1,45 +1,371 @@
 --TEST--
-Test flock() function: usage variations
+Test flock() function: Variations
 --FILE--
 <?php
 /* 
 Prototype: bool flock(resource $handle, int $operation [, int &$wouldblock]);
-Description: PHP supports a portable way of locking complete files in an 
advisory way
+Description: PHP supports a portable way of locking complete files 
+  in an advisory way
 */
 
-echo "*** Test flock() function: with the operations given as numeric values 
***\n";
+echo "*** Testing flock() fun with the various operation and 
+            wouldblock values                                ***\n";
+$file = dirname(__FILE__)."/flock.tmp";
+$fp = fopen($file, "w");
 
-$filename = dirname(__FILE__)."/flock_variation.tmp";
-$file_handle = fopen($filename, "w");
-
-/* array of operations */
+/* array of operatons */
 $operations = array(
-  1,  //nothing but LOCK_SH
-  2,  //nothing but LOCK_EX
-  2.234,  //nothing but LOCK_EX
-  TRUE  //nothing but LOCK_SH
+  LOCK_SH,
+  LOCK_EX,
+  LOCK_SH|LOCK_NB,
+  LOCK_EX|LOCK_NB,
+  LOCK_SH|LOCK_EX,
+  LOCK_UN,
+  1, 
+  2,
+  2.234,
+  TRUE
+);
+
+/* array of wouldblocks */
+$wouldblocks = array(
+  0,
+  1,
+  2,
+  1.234,
+  TRUE,
+  FALSE,
+  NULL,
+  array(1,2,3),
+  array(),
+  "string",
+  "",
+  /* binary input */
+  b"string",
+  b"",
+  "\0"
 );
 
 $i = 0;
 foreach($operations as $operation) {
-  var_dump(flock($file_handle, $operation));
-  var_dump(flock($file_handle, 3));  //nothing but LOCK_UN
+  echo "--- Outer iteration $i ---\n";
+  var_dump(flock($fp, $operation));
+  $j = 0;
+  foreach($wouldblocks as $wouldblock) {
+    echo "-- Inner iteration $j in $i --\n";
+    var_dump(flock($fp, $operation, $wouldblock));
+    $j++;
+  }
   $i++;
 }
 
-fclose($file_handle);
-unlink($filename);
+fclose($fp);
+...@unlink($file);
 
-echo "*** Done ***\n";
+echo "\n*** Done ***\n";
 ?>
 --EXPECTF--    
-*** Test flock() function: with the operations given as numeric values ***
+*** Testing flock() fun with the various operation and 
+            wouldblock values                                ***
+--- Outer iteration 0 ---
+bool(true)
+-- Inner iteration 0 in 0 --
+bool(true)
+-- Inner iteration 1 in 0 --
+bool(true)
+-- Inner iteration 2 in 0 --
+bool(true)
+-- Inner iteration 3 in 0 --
+bool(true)
+-- Inner iteration 4 in 0 --
+bool(true)
+-- Inner iteration 5 in 0 --
+bool(true)
+-- Inner iteration 6 in 0 --
+bool(true)
+-- Inner iteration 7 in 0 --
+bool(true)
+-- Inner iteration 8 in 0 --
+bool(true)
+-- Inner iteration 9 in 0 --
+bool(true)
+-- Inner iteration 10 in 0 --
+bool(true)
+-- Inner iteration 11 in 0 --
+bool(true)
+-- Inner iteration 12 in 0 --
+bool(true)
+-- Inner iteration 13 in 0 --
+bool(true)
+--- Outer iteration 1 ---
+bool(true)
+-- Inner iteration 0 in 1 --
+bool(true)
+-- Inner iteration 1 in 1 --
+bool(true)
+-- Inner iteration 2 in 1 --
+bool(true)
+-- Inner iteration 3 in 1 --
+bool(true)
+-- Inner iteration 4 in 1 --
+bool(true)
+-- Inner iteration 5 in 1 --
+bool(true)
+-- Inner iteration 6 in 1 --
+bool(true)
+-- Inner iteration 7 in 1 --
+bool(true)
+-- Inner iteration 8 in 1 --
+bool(true)
+-- Inner iteration 9 in 1 --
+bool(true)
+-- Inner iteration 10 in 1 --
+bool(true)
+-- Inner iteration 11 in 1 --
+bool(true)
+-- Inner iteration 12 in 1 --
+bool(true)
+-- Inner iteration 13 in 1 --
+bool(true)
+--- Outer iteration 2 ---
+bool(true)
+-- Inner iteration 0 in 2 --
+bool(true)
+-- Inner iteration 1 in 2 --
+bool(true)
+-- Inner iteration 2 in 2 --
+bool(true)
+-- Inner iteration 3 in 2 --
+bool(true)
+-- Inner iteration 4 in 2 --
+bool(true)
+-- Inner iteration 5 in 2 --
+bool(true)
+-- Inner iteration 6 in 2 --
+bool(true)
+-- Inner iteration 7 in 2 --
+bool(true)
+-- Inner iteration 8 in 2 --
+bool(true)
+-- Inner iteration 9 in 2 --
+bool(true)
+-- Inner iteration 10 in 2 --
+bool(true)
+-- Inner iteration 11 in 2 --
+bool(true)
+-- Inner iteration 12 in 2 --
+bool(true)
+-- Inner iteration 13 in 2 --
+bool(true)
+--- Outer iteration 3 ---
+bool(true)
+-- Inner iteration 0 in 3 --
+bool(true)
+-- Inner iteration 1 in 3 --
+bool(true)
+-- Inner iteration 2 in 3 --
+bool(true)
+-- Inner iteration 3 in 3 --
+bool(true)
+-- Inner iteration 4 in 3 --
+bool(true)
+-- Inner iteration 5 in 3 --
+bool(true)
+-- Inner iteration 6 in 3 --
+bool(true)
+-- Inner iteration 7 in 3 --
+bool(true)
+-- Inner iteration 8 in 3 --
+bool(true)
+-- Inner iteration 9 in 3 --
+bool(true)
+-- Inner iteration 10 in 3 --
+bool(true)
+-- Inner iteration 11 in 3 --
+bool(true)
+-- Inner iteration 12 in 3 --
+bool(true)
+-- Inner iteration 13 in 3 --
+bool(true)
+--- Outer iteration 4 ---
+bool(true)
+-- Inner iteration 0 in 4 --
+bool(true)
+-- Inner iteration 1 in 4 --
+bool(true)
+-- Inner iteration 2 in 4 --
+bool(true)
+-- Inner iteration 3 in 4 --
+bool(true)
+-- Inner iteration 4 in 4 --
+bool(true)
+-- Inner iteration 5 in 4 --
+bool(true)
+-- Inner iteration 6 in 4 --
+bool(true)
+-- Inner iteration 7 in 4 --
+bool(true)
+-- Inner iteration 8 in 4 --
+bool(true)
+-- Inner iteration 9 in 4 --
 bool(true)
+-- Inner iteration 10 in 4 --
 bool(true)
+-- Inner iteration 11 in 4 --
 bool(true)
+-- Inner iteration 12 in 4 --
 bool(true)
+-- Inner iteration 13 in 4 --
 bool(true)
+--- Outer iteration 5 ---
 bool(true)
+-- Inner iteration 0 in 5 --
 bool(true)
+-- Inner iteration 1 in 5 --
 bool(true)
+-- Inner iteration 2 in 5 --
+bool(true)
+-- Inner iteration 3 in 5 --
+bool(true)
+-- Inner iteration 4 in 5 --
+bool(true)
+-- Inner iteration 5 in 5 --
+bool(true)
+-- Inner iteration 6 in 5 --
+bool(true)
+-- Inner iteration 7 in 5 --
+bool(true)
+-- Inner iteration 8 in 5 --
+bool(true)
+-- Inner iteration 9 in 5 --
+bool(true)
+-- Inner iteration 10 in 5 --
+bool(true)
+-- Inner iteration 11 in 5 --
+bool(true)
+-- Inner iteration 12 in 5 --
+bool(true)
+-- Inner iteration 13 in 5 --
+bool(true)
+--- Outer iteration 6 ---
+bool(true)
+-- Inner iteration 0 in 6 --
+bool(true)
+-- Inner iteration 1 in 6 --
+bool(true)
+-- Inner iteration 2 in 6 --
+bool(true)
+-- Inner iteration 3 in 6 --
+bool(true)
+-- Inner iteration 4 in 6 --
+bool(true)
+-- Inner iteration 5 in 6 --
+bool(true)
+-- Inner iteration 6 in 6 --
+bool(true)
+-- Inner iteration 7 in 6 --
+bool(true)
+-- Inner iteration 8 in 6 --
+bool(true)
+-- Inner iteration 9 in 6 --
+bool(true)
+-- Inner iteration 10 in 6 --
+bool(true)
+-- Inner iteration 11 in 6 --
+bool(true)
+-- Inner iteration 12 in 6 --
+bool(true)
+-- Inner iteration 13 in 6 --
+bool(true)
+--- Outer iteration 7 ---
+bool(true)
+-- Inner iteration 0 in 7 --
+bool(true)
+-- Inner iteration 1 in 7 --
+bool(true)
+-- Inner iteration 2 in 7 --
+bool(true)
+-- Inner iteration 3 in 7 --
+bool(true)
+-- Inner iteration 4 in 7 --
+bool(true)
+-- Inner iteration 5 in 7 --
+bool(true)
+-- Inner iteration 6 in 7 --
+bool(true)
+-- Inner iteration 7 in 7 --
+bool(true)
+-- Inner iteration 8 in 7 --
+bool(true)
+-- Inner iteration 9 in 7 --
+bool(true)
+-- Inner iteration 10 in 7 --
+bool(true)
+-- Inner iteration 11 in 7 --
+bool(true)
+-- Inner iteration 12 in 7 --
+bool(true)
+-- Inner iteration 13 in 7 --
+bool(true)
+--- Outer iteration 8 ---
+bool(true)
+-- Inner iteration 0 in 8 --
+bool(true)
+-- Inner iteration 1 in 8 --
+bool(true)
+-- Inner iteration 2 in 8 --
+bool(true)
+-- Inner iteration 3 in 8 --
+bool(true)
+-- Inner iteration 4 in 8 --
+bool(true)
+-- Inner iteration 5 in 8 --
+bool(true)
+-- Inner iteration 6 in 8 --
+bool(true)
+-- Inner iteration 7 in 8 --
+bool(true)
+-- Inner iteration 8 in 8 --
+bool(true)
+-- Inner iteration 9 in 8 --
+bool(true)
+-- Inner iteration 10 in 8 --
+bool(true)
+-- Inner iteration 11 in 8 --
+bool(true)
+-- Inner iteration 12 in 8 --
+bool(true)
+-- Inner iteration 13 in 8 --
+bool(true)
+--- Outer iteration 9 ---
+bool(true)
+-- Inner iteration 0 in 9 --
+bool(true)
+-- Inner iteration 1 in 9 --
+bool(true)
+-- Inner iteration 2 in 9 --
+bool(true)
+-- Inner iteration 3 in 9 --
+bool(true)
+-- Inner iteration 4 in 9 --
+bool(true)
+-- Inner iteration 5 in 9 --
+bool(true)
+-- Inner iteration 6 in 9 --
+bool(true)
+-- Inner iteration 7 in 9 --
+bool(true)
+-- Inner iteration 8 in 9 --
+bool(true)
+-- Inner iteration 9 in 9 --
+bool(true)
+-- Inner iteration 10 in 9 --
+bool(true)
+-- Inner iteration 11 in 9 --
+bool(true)
+-- Inner iteration 12 in 9 --
+bool(true)
+-- Inner iteration 13 in 9 --
+bool(true)
+
 *** Done ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/ftruncate_error.phpt?r1=1.1.2.2.2.3&r2=1.1.2.2.2.4&diff_format=u
Index: php-src/ext/standard/tests/file/ftruncate_error.phpt
diff -u php-src/ext/standard/tests/file/ftruncate_error.phpt:1.1.2.2.2.3 
php-src/ext/standard/tests/file/ftruncate_error.phpt:1.1.2.2.2.4
--- php-src/ext/standard/tests/file/ftruncate_error.phpt:1.1.2.2.2.3    Wed Nov 
26 10:10:17 2008
+++ php-src/ext/standard/tests/file/ftruncate_error.phpt        Tue Dec 30 
16:49:43 2008
@@ -11,7 +11,7 @@
 
 $filename = dirname(__FILE__)."/ftruncate_error.tmp";
 $file_handle = fopen($filename, "w" );
-fwrite($file_handle, "Testing ftruncate error conditions \n");
+fwrite($file_handle, (binary)"Testing ftruncate error conditions \n");
 fflush($file_handle);
 echo "\n Initial file size = ".filesize($filename)."\n";
 
@@ -23,14 +23,12 @@
 // arguments less than expected numbers
 var_dump( ftruncate( $file_handle ) );
 // check the first size 
-clearstatcache();
 var_dump( filesize($filename) );
 
 echo "-- Testing ftruncate() with more than expected number of arguments --\n";
 // more than expected number of arguments 
 var_dump( ftruncate($file_handle, 10, 20) );
-// check the first size
-clearstatcache(); 
+// check the first size 
 var_dump( filesize($filename) );
 
 // test invalid arguments : non-resources
@@ -55,16 +53,14 @@
 // ftruncate on close file handle
 fclose($file_handle);
 var_dump( ftruncate($file_handle,10) );
-// check the first size
-clearstatcache(); 
+// check the first size 
 var_dump( filesize($filename) );
 
 // ftruncate on a file handle which is unset
 $fp = fopen($filename, "w");
 unset($fp); //unset file handle
 var_dump( ftruncate(@$fp,10));
-// check the first size
-clearstatcache(); 
+// check the first size 
 var_dump( filesize($filename) );
 
 echo "Done\n";
@@ -118,12 +114,11 @@
 bool(false)
 -- Testing ftruncate() with closed/unset file handle --
 
-Warning: ftruncate(): %d is not a valid stream resource in %s on line %d
+Warning: ftruncate(): 5 is not a valid stream resource in %s on line %d
 bool(false)
 int(36)
 
 Warning: ftruncate() expects parameter 1 to be resource, null given in %s on 
line %d
 bool(false)
-int(0)
+int(36)
 Done
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_basic.phpt?r1=1.1.2.3.2.2&r2=1.1.2.3.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/disk_free_space_basic.phpt
diff -u php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.3.2.2 
php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.3.2.3
--- php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.3.2.2      
Wed Nov 26 10:10:17 2008
+++ php-src/ext/standard/tests/file/disk_free_space_basic.phpt  Tue Dec 30 
16:49:43 2008
@@ -7,26 +7,27 @@
 /*
  *  Prototype: float disk_free_space( string directory )
  *  Description: Given a string containing a directory, this function 
- *  will return the number of bytes available on the corresponding 
- *  filesystem or disk partition
+ *               will return the number of bytes available on the 
corresponding 
+ *               filesystem or disk partition
  */
 
 $file_path = dirname(__FILE__);
-include($file_path."/file.inc");
 
 echo "*** Testing with existing directory ***\n";
 var_dump( disk_free_space($file_path) ); 
 var_dump( diskfreespace($file_path) ); 
-$dir = "/disk_free_space";
 
 echo "*** Testing with newly created directory ***\n";
+$dir = "/disk_free_space";
 mkdir($file_path.$dir);
 echo" \n Free Space before writing to a file\n";
 $space1 =  disk_free_space($file_path.$dir); 
-var_dump($space1); 
+var_dump( $space1 ); 
 
-fill_buffer($buffer, "text", 3000000);
-file_put_contents($file_path.$dir."/disk_free_space.tmp", $buffer);
+$fh = fopen($file_path.$dir."/disk_free_space.tmp", "a");
+for( $i=1; $i<=1000; $i++)
+fwrite($fh, (binary)"x");
+fclose($fh);
 
 echo "\n Free Space after writing to a file\n";
 $space2 =  disk_free_space($file_path.$dir); 
@@ -37,29 +38,33 @@
 else
   echo "\n Free Space Value Is Incorrect\n";
 
-echo"\n-- Done --";
+echo "*** Testing with Binary Input ***\n";
+var_dump( disk_free_space(b"$file_path") ); 
+
+echo"\n--- Done ---";
 ?>
 
 --CLEAN--
 <?php
 $file_path = dirname(__FILE__);
-$dir = "/disk_free_space";
-unlink($file_path.$dir."/disk_free_space.tmp");
-rmdir($file_path.$dir);
+unlink($file_path."/disk_free_space/disk_free_space.tmp");
+rmdir($file_path."/disk_free_space");
 ?>
 
 --EXPECTF--
 *** Testing with existing directory ***
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 *** Testing with newly created directory ***
  
  Free Space before writing to a file
-float(%f)
+float(%d)
 
  Free Space after writing to a file
-float(%f)
+float(%d)
 
  Free Space Value Is Correct
+*** Testing with Binary Input ***
+float(%d)
 
--- Done --
+--- Done ---
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt?r1=1.1.2.2.2.2&r2=1.1.2.2.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt
diff -u 
php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt:1.1.2.2.2.2  
Wed Nov 26 10:10:17 2008
+++ php-src/ext/standard/tests/file/fseek_ftell_rewind_error1.phpt      Tue Dec 
30 16:49:43 2008
@@ -91,10 +91,9 @@
 Warning: fseek() expects parameter 1 to be resource, object given in %s on 
line %d
 bool(false)
 -- Testing fseek() with closed/unset file handle --
-Warning: fseek(): %d is not a valid stream resource in %s on line %d
+Warning: fseek(): 5 is not a valid stream resource in %s on line %d
 bool(false)
 
 Warning: fseek() expects parameter 1 to be resource, null given in %s on line 
%d
 bool(false)
 Done
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt?r1=1.1.2.2.2.2&r2=1.1.2.2.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt
diff -u 
php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt:1.1.2.2.2.2  
Wed Nov 26 10:10:16 2008
+++ php-src/ext/standard/tests/file/fseek_ftell_rewind_error2.phpt      Tue Dec 
30 16:49:43 2008
@@ -87,10 +87,9 @@
 Warning: ftell() expects parameter 1 to be resource, object given in %s on 
line %d
 bool(false)
 -- Testing ftell with closed/unset file handle --
-Warning: ftell(): %d is not a valid stream resource in %s on line %d
+Warning: ftell(): 5 is not a valid stream resource in %s on line %d
 bool(false)
 
 Warning: ftell() expects parameter 1 to be resource, null given in %s on line 
%d
 bool(false)
 Done
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk.phpt?r1=1.1.2.4.2.1&r2=1.1.2.4.2.2&diff_format=u
Index: php-src/ext/standard/tests/file/disk.phpt
diff -u php-src/ext/standard/tests/file/disk.phpt:1.1.2.4.2.1 
php-src/ext/standard/tests/file/disk.phpt:1.1.2.4.2.2
--- php-src/ext/standard/tests/file/disk.phpt:1.1.2.4.2.1       Wed Nov 26 
10:10:16 2008
+++ php-src/ext/standard/tests/file/disk.phpt   Tue Dec 30 16:49:43 2008
@@ -37,8 +37,8 @@
 
 Warning: disk_total_space(): No such file or directory in %s on line %d
 bool(false)
-float(%f)
-float(%f)
+float(%d)
+float(%d)
 
 Warning: disk_free_space(): No such file or directory in %s on line %d
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_basic.phpt?r1=1.1.2.2.2.2&r2=1.1.2.2.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/disk_total_space_basic.phpt
diff -u php-src/ext/standard/tests/file/disk_total_space_basic.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/file/disk_total_space_basic.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/file/disk_total_space_basic.phpt:1.1.2.2.2.2     
Wed Nov 26 10:10:17 2008
+++ php-src/ext/standard/tests/file/disk_total_space_basic.phpt Tue Dec 30 
16:49:43 2008
@@ -4,31 +4,31 @@
 <?php
 /*
  *  Prototype: float disk_total_space( string $directory );
- *  Description: given a string containing a directory, this 
- *               function will return the total number of bytes 
- *               on the corresponding filesyatem or disk partition.
+ *  Description: given a string containing a directory, this function will 
+ *               return the total number of bytes on the corresponding 
filesyatem
+ *               or disk partition.
  */
 
 $file_path = dirname(__FILE__);
 
-echo "*** Testing with existing directory ***\n";
+echo "*** Testing with normal directory ***\n";
 var_dump( disk_total_space($file_path) );
 
 echo "*** Testing with newly created directory ***\n";
-mkdir($file_path."/disk_total_space");
-var_dump( disk_total_space($file_path."/disk_total_space") );
+$dir = "/disk_total_space";
 
-$fh = fopen($file_path."/disk_total_space/disk_total_space.tmp", "w");
-fwrite($fh, "Garbage Data Garbage Data Garbage Data Garbage Data Garbage Data 
Garbage Data Garbage Data");
+mkdir($file_path.$dir);
+var_dump( disk_total_space($file_path.$dir) );
+$fh = fopen($file_path.$dir."/disk_total_space.tmp", "w");
+fwrite($fh, (binary)"Garbage Data Garbage Data Garbage Data Garbage Data 
Garbage Data Garbage Data Garbage Data");
 
 fclose($fh);
 
-echo" \n Total Space after writing to a file\n";
-var_dump( disk_total_space($file_path."/disk_total_space") );
+echo"\nTotal Space after writing to a file\n";
+var_dump( disk_total_space($file_path.$dir) );
 
-echo"\n--- Done ---";
+echo"\n-- Done --";
 ?>
-
 --CLEAN--
 <?php
 $file_path = dirname(__FILE__);
@@ -37,12 +37,12 @@
 ?>
 
 --EXPECTF--
-*** Testing with existing directory ***
-float(%f)
+*** Testing with normal directory ***
+float(%d)
 *** Testing with newly created directory ***
-float(%f)
- 
- Total Space after writing to a file
-float(%f)
+float(%d)
+
+Total Space after writing to a file
+float(%d)
 
---- Done ---
+-- Done --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_error.phpt?r1=1.1.2.1.2.2&r2=1.1.2.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/file/fread_error.phpt
diff -u php-src/ext/standard/tests/file/fread_error.phpt:1.1.2.1.2.2 
php-src/ext/standard/tests/file/fread_error.phpt:1.1.2.1.2.3
--- php-src/ext/standard/tests/file/fread_error.phpt:1.1.2.1.2.2        Wed Nov 
26 10:10:17 2008
+++ php-src/ext/standard/tests/file/fread_error.phpt    Tue Dec 30 16:49:43 2008
@@ -103,7 +103,7 @@
 
 Notice: Undefined variable: file_content_type in %s on line %d
 
-Warning: fread(): %d is not a valid stream resource in %s on line %d
+Warning: fread(): 5 is not a valid stream resource in %s on line %d
 bool(false)
 
 Warning: fread() expects parameter 1 to be resource, null given in %s on line 
%d
@@ -112,4 +112,3 @@
 Warning: fclose() expects parameter 1 to be resource, null given in %s on line 
%d
 bool(false)
 Done
-
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation2.phpt?r1=1.1.2.2.2.3&r2=1.1.2.2.2.4&diff_format=u
Index: php-src/ext/standard/tests/file/is_dir_variation2.phpt
diff -u php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.1.2.2.2.3 
php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.1.2.2.2.4
--- php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.1.2.2.2.3  Wed Nov 
26 10:10:17 2008
+++ php-src/ext/standard/tests/file/is_dir_variation2.phpt      Tue Dec 30 
16:49:43 2008
@@ -14,7 +14,7 @@
 
 /* Testing is_dir() with dir, soft & hard link to dir,
      and with file, soft & hard link to file */
-      
+
 $file_path = dirname(__FILE__);
 
 echo "*** Testing is_dir() with dir and links to dir ***\n";
@@ -70,7 +70,7 @@
 -- With symlink --
 bool(true)
 -- With hardlink --
-Warning: link(): %s
+Warning: link(): %s in %s on line %d
 bool(false)
 
 *** Testing is_dir() with file and links to a file ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_slice_variation1.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/array/array_slice_variation1.phpt
diff -u php-src/ext/standard/tests/array/array_slice_variation1.phpt:1.1.2.2 
php-src/ext/standard/tests/array/array_slice_variation1.phpt:1.1.2.3
--- php-src/ext/standard/tests/array/array_slice_variation1.phpt:1.1.2.2        
Tue Dec  2 13:32:53 2008
+++ php-src/ext/standard/tests/array/array_slice_variation1.phpt        Tue Dec 
30 16:49:43 2008
@@ -1,227 +1,61 @@
 --TEST--
-Test array_slice() function : usage variations - Pass different data types as 
$input arg
+Test array_slice() - Third parameter (NULL vs 0)
 --FILE--
 <?php
-/* Prototype  : array array_slice(array $input, int $offset [, int $length [, 
bool $preserve_keys]])
- * Description: Returns elements specified by offset and length 
- * Source code: ext/standard/array.c
- */
-
-/*
- * Pass different arguments as $input argument to array_slice() to test 
behaviour
- */
-
-echo "*** Testing array_slice() : usage variations ***\n";
-
-// Initialise function arguments not being substituted
-$offset = 2;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-// get a class
-class classA
-{
-  public function __toString() {
-    return "Class A object";
-  }
-}
-
-// heredoc string
-$heredoc = <<<EOT
-hello world
-EOT;
-
-// get a resource variable
-$fp = fopen(__FILE__, "r");
-
-// unexpected values to be passed to $input argument
-$inputs = array(
-
-       // int data
-/*1*/  0,
-       1,
-       12345,
-       -2345,
-
-       // float data
-/*5*/  10.5,
-       -10.5,
-       12.3456789000e10,
-       12.3456789000E-10,
-       .5,
-
-       // null data
-/*10*/ NULL,
-       null,
-
-       // boolean data
-/*12*/ true,
-       false,
-       TRUE,
-       FALSE,
-       
-       // empty data
-/*16*/ "",
-       '',
-       array(),
-
-       // string data
-/*19*/ "string",
-       'string',
-       $heredoc,
-       
-       // object data
-/*22*/ new classA(),
-
-       // undefined data
-/*23*/ @$undefined_var,
-
-       // unset data
-/*24*/ @$unset_var,
-
-       // resource variable
-/*25*/ $fp
-);
-
-// loop through each element of $inputs to check the behavior of array_slice()
-$iterator = 1;
-foreach($inputs as $input) {
-  echo "\n-- Iteration $iterator --\n";
-  var_dump( array_slice($input, $offset) );
-  $iterator++;
-};
 
-fclose($fp);
+var_dump(array_slice(range(1, 3), 0, NULL, 1));
+var_dump(array_slice(range(1, 3), 0, 0, 1));
+var_dump(array_slice(range(1, 3), 0, NULL));
+var_dump(array_slice(range(1, 3), 0, 0));
+
+var_dump(array_slice(range(1, 3), -1, 0));
+var_dump(array_slice(range(1, 3), -1, 0, 1));
+var_dump(array_slice(range(1, 3), -1, NULL));
+var_dump(array_slice(range(1, 3), -1, NULL, 1));
 
-echo "Done";
-?>
-
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on 
line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on 
line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on 
line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on 
line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on 
line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on 
line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on 
line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on 
line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on 
line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on 
line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on 
line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on 
line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on 
line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on 
line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on 
line %d
-NULL
 
--- Iteration 16 --
+$a = 'foo';
+var_dump(array_slice(range(1, 3), 0, $a));
+var_dump(array_slice(range(1, 3), 0, $a));
+var_dump($a);
 
-Warning: array_slice() expects parameter 1 to be array, string given in %s on 
line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on 
line %d
-NULL
+?>
 
--- Iteration 18 --
+--EXPECTF--
+array(3) {
+  [0]=>
+  int(1)
+  [1]=>
+  int(2)
+  [2]=>
+  int(3)
+}
 array(0) {
 }
-
--- Iteration 19 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on 
line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on 
line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on 
line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_slice() expects parameter 1 to be array, object given in %s on 
line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on 
line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on 
line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_slice() expects parameter 1 to be array, resource given in %s 
on line %d
-NULL
-Done
\ No newline at end of file
+array(3) {
+  [0]=>
+  int(1)
+  [1]=>
+  int(2)
+  [2]=>
+  int(3)
+}
+array(0) {
+}
+array(0) {
+}
+array(0) {
+}
+array(1) {
+  [0]=>
+  int(3)
+}
+array(1) {
+  [2]=>
+  int(3)
+}
+array(0) {
+}
+array(0) {
+}
+string(3) "foo"
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/each_variation4.phpt?r1=1.1.4.4&r2=1.1.4.5&diff_format=u
Index: php-src/ext/standard/tests/array/each_variation4.phpt
diff -u php-src/ext/standard/tests/array/each_variation4.phpt:1.1.4.4 
php-src/ext/standard/tests/array/each_variation4.phpt:1.1.4.5
--- php-src/ext/standard/tests/array/each_variation4.phpt:1.1.4.4       Tue Dec 
 2 13:32:52 2008
+++ php-src/ext/standard/tests/array/each_variation4.phpt       Tue Dec 30 
16:49:43 2008
@@ -1,5 +1,7 @@
 --TEST--
 Test each() function : usage variations - Referenced variables
+--INI--
+allow_call_time_pass_reference=on
 --FILE--
 <?php
 /* Prototype  : array each(array $arr)
@@ -85,4 +87,4 @@
   [2]=>
   string(3) "two"
 }
-Done
\ No newline at end of file
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/rsort_variation4.phpt?r1=1.1.4.4&r2=1.1.4.5&diff_format=u
Index: php-src/ext/standard/tests/array/rsort_variation4.phpt
diff -u php-src/ext/standard/tests/array/rsort_variation4.phpt:1.1.4.4 
php-src/ext/standard/tests/array/rsort_variation4.phpt:1.1.4.5
--- php-src/ext/standard/tests/array/rsort_variation4.phpt:1.1.4.4      Tue Dec 
 2 13:32:53 2008
+++ php-src/ext/standard/tests/array/rsort_variation4.phpt      Tue Dec 30 
16:49:43 2008
@@ -1,5 +1,7 @@
 --TEST--
 Test rsort() function : usage variations - referenced variables
+--INI--
+allow_call_time_pass_reference=on
 --FILE--
 <?php
 /* Prototype  : bool rsort(array &$array_arg [, int $sort_flags])
@@ -75,4 +77,4 @@
   [2]=>
   &int(33)
 }
-Done
\ No newline at end of file
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/arsort_variation3.phpt?r1=1.1.4.5&r2=1.1.4.6&diff_format=u
Index: php-src/ext/standard/tests/array/arsort_variation3.phpt
diff -u php-src/ext/standard/tests/array/arsort_variation3.phpt:1.1.4.5 
php-src/ext/standard/tests/array/arsort_variation3.phpt:1.1.4.6
--- php-src/ext/standard/tests/array/arsort_variation3.phpt:1.1.4.5     Tue Dec 
 2 13:32:52 2008
+++ php-src/ext/standard/tests/array/arsort_variation3.phpt     Tue Dec 30 
16:49:43 2008
@@ -1,9 +1,5 @@
 --TEST--
 Test arsort() function : usage variations - sort integer/float values
---SKIPIF--
-<?php
-if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
-?>
 --FILE--
 <?php
 /* Prototype  : bool arsort ( array &$array [, int $sort_flags] )
@@ -63,7 +59,7 @@
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing arsort() : usage variations ***
 
 -- Testing arsort() by supplying various integer/float arrays --
@@ -277,7 +273,7 @@
 bool(true)
 array(7) {
   [2]=>
-  float(2147483648)
+  %s(2147483648)
   [1]=>
   int(2147483647)
   [6]=>
@@ -287,15 +283,15 @@
   [3]=>
   int(-2147483647)
   [4]=>
-  float(-2147483648)
+  %s(-2147483648)
   [7]=>
-  float(-2147483649)
+  %s(-2147483649)
 }
 - Sort_flag = SORT_REGULAR -
 bool(true)
 array(7) {
   [2]=>
-  float(2147483648)
+  %s(2147483648)
   [1]=>
   int(2147483647)
   [6]=>
@@ -305,15 +301,15 @@
   [3]=>
   int(-2147483647)
   [4]=>
-  float(-2147483648)
+  %s(-2147483648)
   [7]=>
-  float(-2147483649)
+  %s(-2147483649)
 }
 - Sort_flag = SORT_NUMERIC -
 bool(true)
 array(7) {
   [2]=>
-  float(2147483648)
+  %s(2147483648)
   [1]=>
   int(2147483647)
   [6]=>
@@ -323,8 +319,8 @@
   [3]=>
   int(-2147483647)
   [4]=>
-  float(-2147483648)
+  %s(-2147483648)
   [7]=>
-  float(-2147483649)
+  %s(-2147483649)
 }
 Done
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_rand_variation4.phpt?r1=1.1.4.4&r2=1.1.4.5&diff_format=u
Index: php-src/ext/standard/tests/array/array_rand_variation4.phpt
diff -u php-src/ext/standard/tests/array/array_rand_variation4.phpt:1.1.4.4 
php-src/ext/standard/tests/array/array_rand_variation4.phpt:1.1.4.5
--- php-src/ext/standard/tests/array/array_rand_variation4.phpt:1.1.4.4 Tue Dec 
 2 13:32:53 2008
+++ php-src/ext/standard/tests/array/array_rand_variation4.phpt Tue Dec 30 
16:49:43 2008
@@ -38,7 +38,7 @@
 
        // array with special chars as keys
 /*6*/  array('##' => "key1", '&$r' => 'key2', '!' => "key3", '<>' =>'key4',
-             "NULL" => 'key5', 
+             "NULL" => 'key5', "\n" => 'newline as key',
              "\t" => "tab as key", "'" => 'single quote as key',
              '"' => 'double quote as key', "\0" => "null char as key")
 );
@@ -165,3 +165,4 @@
   string\([0-9]*\) "[#&!N  <\n\t'"\0]*[U#$>]*[rL]*[L]*"
 }
 Done
+

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

Reply via email to