wharmby         Mon Jan 12 15:58:41 2009 UTC

  Modified files:              
    /php-src/ext/standard/tests/file    
                                        file_get_contents_variation8-win32.phpt 
                                        readfile_variation10-win32.phpt 
                                        file_put_contents_variation8-win32.phpt 
  Log:
  Fix Windows tests after #47037
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_get_contents_variation8-win32.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/file/file_get_contents_variation8-win32.phpt
diff -u 
php-src/ext/standard/tests/file/file_get_contents_variation8-win32.phpt:1.2 
php-src/ext/standard/tests/file/file_get_contents_variation8-win32.phpt:1.3
--- php-src/ext/standard/tests/file/file_get_contents_variation8-win32.phpt:1.2 
Wed Nov 26 17:48:40 2008
+++ php-src/ext/standard/tests/file/file_get_contents_variation8-win32.phpt     
Mon Jan 12 15:58:41 2009
@@ -1,7 +1,5 @@
 --TEST--
 Test file_get_contents() function : variation - obscure filenames
---XFAIL--
-Return values are inconsistent (and have changed from previous versions)
 --CREDITS--
 Dave Kelsey <d_kel...@uk.ibm.com>
 --SKIPIF--
@@ -18,67 +16,84 @@
  */
 
 echo "*** Testing file_get_contents() : variation ***\n";
+
 /* An array of filenames */ 
 $names_arr = array(
   /* Invalid args */ 
-  -1,
-  TRUE,
-  FALSE,
-  NULL,
-  "",
-  " ",
-  "\0",
-  array(),
-
-  /* prefix with path separator of a non existing directory*/
-  "/no/such/file/dir", 
-  "php/php"
+  "-1" => -1,
+  "TRUE" => TRUE,
+  "FALSE" => FALSE,
+  "NULL" => NULL,
+  "\"\"" => "",
+  "\" \"" => " ",
+  "\\0" => "\0",
+  "array()" => array(),
+
+  /* prefix with path separator of a non existing directory*/ 
+  "/no/such/file/dir" => "/no/such/file/dir", 
+  "php/php"=> "php/php"
 
 );
 
-for( $i=0; $i<count($names_arr); $i++ ) {
-  echo "-- Iteration $i --\n";
-  var_dump(file_get_contents($names_arr[$i]));
+foreach($names_arr as $key =>$value) {
+  echo "\n-- Filename: $key --\n";
+  var_dump(file_get_contents($value));
 }
 
-echo "\n*** Done ***\n";
 ?>
+===Done===
 --EXPECTF--
 *** Testing file_get_contents() : variation ***
--- Iteration 0 --
+
+-- Filename: -1 --
 
 Warning: file_get_contents(-1): failed to open stream: No such file or 
directory in %s on line %d
 bool(false)
--- Iteration 1 --
+
+-- Filename: TRUE --
 
 Warning: file_get_contents(1): failed to open stream: No such file or 
directory in %s on line %d
 bool(false)
--- Iteration 2 --
+
+-- Filename: FALSE --
+
+Warning: file_get_contents(): Filename cannot be empty in %s on line %d
 bool(false)
--- Iteration 3 --
+
+-- Filename: NULL --
+
+Warning: file_get_contents(): Filename cannot be empty in %s on line %d
 bool(false)
--- Iteration 4 --
+
+-- Filename: "" --
+
+Warning: file_get_contents(): Filename cannot be empty in %s on line %d
 bool(false)
--- Iteration 5 --
+
+-- Filename: " " --
 
 Warning: file_get_contents( ): failed to open stream: Permission denied in %s 
on line %d
 bool(false)
--- Iteration 6 --
+
+-- Filename: \0 --
+
+Warning: file_get_contents(): Filename cannot be empty in %s on line %d
 bool(false)
--- Iteration 7 --
+
+-- Filename: array() --
 
 Notice: Array to string conversion in %s on line %d
 
 Warning: file_get_contents(Array): failed to open stream: No such file or 
directory in %s on line %d
 bool(false)
--- Iteration 8 --
+
+-- Filename: /no/such/file/dir --
 
 Warning: file_get_contents(/no/such/file/dir): failed to open stream: No such 
file or directory in %s on line %d
 bool(false)
--- Iteration 9 --
+
+-- Filename: php/php --
 
 Warning: file_get_contents(php/php): failed to open stream: No such file or 
directory in %s on line %d
 bool(false)
-
-*** Done ***
-
+===Done===
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_variation10-win32.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/file/readfile_variation10-win32.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_put_contents_variation8-win32.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/file/file_put_contents_variation8-win32.phpt



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

Reply via email to