From: andy wharmby Date: Mon, 12 Jan 2009 15:58:41 +0000 (+0000) Subject: Fix Windows tests after #47037 X-Git-Tag: php-5.4.0alpha1~191^2~4547 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=def5c80e778eb420a19fa40d51047a16b89c2b58;p=php Fix Windows tests after #47037 --- diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt index de471d30a2..38cbe5d775 100644 --- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt @@ -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 --SKIPIF-- @@ -18,67 +16,84 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ 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$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 diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt index b762deea85..c13b0f7311 100644 Binary files a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt and b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt differ diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt index d9073a76f3..1a86c2aa4e 100644 Binary files a/ext/standard/tests/file/readfile_variation10-win32.phpt and b/ext/standard/tests/file/readfile_variation10-win32.phpt differ