diff options
author | Pierre Joye <pajoye@php.net> | 2010-02-01 15:18:55 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-02-01 15:18:55 +0000 |
commit | e1cdfbeb1d603adbffeef7d31d31c15892f8742a (patch) | |
tree | 48083c8994f2c36a5bf0426c48980667b79af708 /ext/standard | |
parent | d839e3b9a40586b11560c887805f3dc71183fb81 (diff) | |
download | php-git-e1cdfbeb1d603adbffeef7d31d31c15892f8742a.tar.gz |
- fix system/version dependent msg, add skip cases, sync
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/tests/file/005_variation2-win32.phpt | 10 | ||||
-rw-r--r-- | ext/standard/tests/file/chmod_variation3.phpt | 16 | ||||
-rw-r--r-- | ext/standard/tests/file/fopen_variation10-win32.phpt | 5 | ||||
-rw-r--r-- | ext/standard/tests/file/fopen_variation11-win32.phpt | 4 | ||||
-rw-r--r-- | ext/standard/tests/file/fpassthru_basic.phpt | 4 | ||||
-rw-r--r-- | ext/standard/tests/file/mkdir_variation1-win32.phpt | 16 | ||||
-rw-r--r-- | ext/standard/tests/file/rename_variation13-win32.phpt | bin | 4553 -> 3947 bytes | |||
-rw-r--r-- | ext/standard/tests/file/rename_variation3-win32.phpt | 3 | ||||
-rw-r--r-- | ext/standard/tests/file/rmdir_variation1-win32.phpt | 16 | ||||
-rw-r--r-- | ext/standard/tests/file/rmdir_variation1.phpt | 2 | ||||
-rw-r--r-- | ext/standard/tests/file/tempnam_variation3-win32.phpt | 2 | ||||
-rw-r--r-- | ext/standard/tests/file/tempnam_variation7-win32.phpt | 2 | ||||
-rw-r--r-- | ext/standard/tests/file/unlink_error-win32.phpt | 6 |
13 files changed, 50 insertions, 36 deletions
diff --git a/ext/standard/tests/file/005_variation2-win32.phpt b/ext/standard/tests/file/005_variation2-win32.phpt index 513182ddeb..45dcbc5f07 100644 --- a/ext/standard/tests/file/005_variation2-win32.phpt +++ b/ext/standard/tests/file/005_variation2-win32.phpt @@ -108,18 +108,18 @@ Warning: filectime(): stat failed for | in %s on line %d *** testing touch *** -Warning: touch(): Unable to create file because %s in %s on line %d +Warning: touch(): %s in %s on line %d bool(false) -Warning: touch(): Unable to create file because %s in %s on line %d +Warning: touch(): %s in %s on line %d bool(false) -Warning: touch(): Unable to create file because %s in %s on line %d +Warning: touch(): %s in %s on line %d bool(false) -Warning: touch(): Unable to create file because %s in %s on line %d +Warning: touch(): %s in %s on line %d bool(false) -Warning: touch(): Unable to create file | because %s in %s on line %d +Warning: touch(): %s in %s on line %d bool(false) Done diff --git a/ext/standard/tests/file/chmod_variation3.phpt b/ext/standard/tests/file/chmod_variation3.phpt index c2dd607fe2..df18ccf986 100644 --- a/ext/standard/tests/file/chmod_variation3.phpt +++ b/ext/standard/tests/file/chmod_variation3.phpt @@ -159,11 +159,11 @@ Error: 2 - chmod() expects parameter 1 to be string, array given, %s(%d) NULL --uppercase NULL-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) --lowercase null-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) --lowercase true-- @@ -171,7 +171,7 @@ Error: 2 - chmod(): No such file or directory, %s(%d) bool(false) --lowercase false-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) --uppercase TRUE-- @@ -179,15 +179,15 @@ Error: 2 - chmod(): No such file or directory, %s(%d) bool(false) --uppercase FALSE-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) --empty string DQ-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) --empty string SQ-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) --instance of classWithToString-- @@ -199,11 +199,11 @@ Error: 2 - chmod() expects parameter 1 to be string, object given, %s(%d) NULL --undefined var-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) --unset var-- -Error: 2 - chmod(): No such file or directory, %s(%d) +Error: 2 - chmod(): %s, %s(%d) bool(false) ===DONE=== diff --git a/ext/standard/tests/file/fopen_variation10-win32.phpt b/ext/standard/tests/file/fopen_variation10-win32.phpt index bf8d3889fa..c949f86fa2 100644 --- a/ext/standard/tests/file/fopen_variation10-win32.phpt +++ b/ext/standard/tests/file/fopen_variation10-win32.phpt @@ -6,6 +6,11 @@ Dave Kelsey <d_kelsey@uk.ibm.com> <?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Run only on Windows"); + +if (!is_writable('c:\\fopen_variation10.tmp')) { + die('skip. C:\\ not writable.'); +} + ?> --FILE-- <?php diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt index cc33a4eb49..61a2f60ecf 100644 --- a/ext/standard/tests/file/fopen_variation11-win32.phpt +++ b/ext/standard/tests/file/fopen_variation11-win32.phpt @@ -6,6 +6,10 @@ Dave Kelsey <d_kelsey@uk.ibm.com> <?php if(substr(PHP_OS, 0, 3) != "WIN") die("skip Run only on Windows"); +if (!is_writable('c:\\fopen_variation10.tmp')) { + die('skip. C:\\ not writable.'); +} + ?> --FILE-- <?php diff --git a/ext/standard/tests/file/fpassthru_basic.phpt b/ext/standard/tests/file/fpassthru_basic.phpt index db03abc490..8924b27dd2 100644 --- a/ext/standard/tests/file/fpassthru_basic.phpt +++ b/ext/standard/tests/file/fpassthru_basic.phpt @@ -13,7 +13,9 @@ $write_handle = fopen($file_name, "w"); $string = "Hello, world\n, abcdefg\tadsdsfdf\n8u2394723947\t$%$%#$%#$%#^#%^ Hello, world\n, abcdefg\tadsdsfdf\n8u2394723947\t$%$%#$%#$%#^#%^\n"; - +if(substr(PHP_OS, 0, 3) == "WIN") { + $string = str_replace("\r",'', $string); +} fwrite($write_handle, $string); fclose($write_handle); diff --git a/ext/standard/tests/file/mkdir_variation1-win32.phpt b/ext/standard/tests/file/mkdir_variation1-win32.phpt index 6dfe3be62a..17f54926cb 100644 --- a/ext/standard/tests/file/mkdir_variation1-win32.phpt +++ b/ext/standard/tests/file/mkdir_variation1-win32.phpt @@ -94,28 +94,28 @@ foreach($inputs as $key =>$value) { *** Testing mkdir() : usage variation *** --uppercase NULL-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --lowercase null-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --lowercase false-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --uppercase FALSE-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --empty string DQ-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --empty string SQ-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --undefined var-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --unset var-- -Error: 2 - mkdir(): No such file or directory, %s(%d) +Error: 2 - mkdir(): %s, %s(%d) --single space-- Error: 2 - mkdir(): %s, %s(%d) diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt Binary files differindex ccbb621850..a86025889d 100644 --- a/ext/standard/tests/file/rename_variation13-win32.phpt +++ b/ext/standard/tests/file/rename_variation13-win32.phpt diff --git a/ext/standard/tests/file/rename_variation3-win32.phpt b/ext/standard/tests/file/rename_variation3-win32.phpt index 209635af32..b5da587811 100644 --- a/ext/standard/tests/file/rename_variation3-win32.phpt +++ b/ext/standard/tests/file/rename_variation3-win32.phpt @@ -24,6 +24,9 @@ mkdir($dirname); $filename = "$file_path/rename_variation3.tmp"; $fp = fopen($filename, "w"); +if (!$fp) { + die("Cannot create $filename\n"); +} fclose($fp); echo "\n-- Renaming file to same file name --\n"; diff --git a/ext/standard/tests/file/rmdir_variation1-win32.phpt b/ext/standard/tests/file/rmdir_variation1-win32.phpt index 0732821c54..2516e6162e 100644 --- a/ext/standard/tests/file/rmdir_variation1-win32.phpt +++ b/ext/standard/tests/file/rmdir_variation1-win32.phpt @@ -90,35 +90,35 @@ foreach($inputs as $key =>$value) { *** Testing rmdir() : usage variation *** --uppercase NULL-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --lowercase null-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --lowercase false-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --uppercase FALSE-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --empty string DQ-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --empty string SQ-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --undefined var-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --unset var-- -Error: 2 - rmdir(): No such file or directory, %s(%d) +Error: 2 - rmdir(): %s, %s(%d) bool(false) --single space-- diff --git a/ext/standard/tests/file/rmdir_variation1.phpt b/ext/standard/tests/file/rmdir_variation1.phpt index a7a4990072..04fee0ee2a 100644 --- a/ext/standard/tests/file/rmdir_variation1.phpt +++ b/ext/standard/tests/file/rmdir_variation1.phpt @@ -81,7 +81,7 @@ $inputs = array( foreach($inputs as $key =>$value) { echo "\n--$key--\n"; - var_dump( rmdir($value) ); + var_dump(rmdir($value)); }; ?> diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index 00f5e1c0e9..2530736ce6 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -3,7 +3,7 @@ Test tempnam() function: usage variations - obscure prefixes --SKIPIF-- <?php if(substr(PHP_OS, 0, 3) != "WIN") - die("skip run only on Windows"); + die("skip run only on Windows"); ?> --FILE-- <?php diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index 2bc69dba53..34e352a497 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -97,7 +97,7 @@ File created in => temp dir Warning: tempnam() expects parameter 1 to be string, array given in %s on line %d -- File is not created -- -Warning: unlink(): No such file or directory in %s on line %d +Warning: unlink(): %s in %s on line %d -- Iteration 8 -- File name is => %s%et%s File permissions are => 100666 diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt index 2c913aeb57..e55f6ed5cd 100644 --- a/ext/standard/tests/file/unlink_error-win32.phpt +++ b/ext/standard/tests/file/unlink_error-win32.phpt @@ -77,15 +77,15 @@ bool(true) -- Testing unlink() on invalid arguments -- -Warning: unlink(): No such file or directory in %s on line %d +Warning: unlink(): %s in %s on line %d bool(false) bool(false) -Warning: unlink(): No such file or directory in %s on line %d +Warning: unlink(): %s in %s on line %d bool(false) bool(false) -Warning: unlink(): No such file or directory in %s on line %d +Warning: unlink(): %s in %s on line %d bool(false) bool(false) |