From b3a334eaf20e4f6b05e9c6a0472d99df98b6dcbb Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Mon, 5 Nov 2007 17:43:21 +0000 Subject: Fix tests (MFH) --- ext/standard/tests/file/005_error.phpt | 37 ++- ext/standard/tests/file/006_error.phpt | 14 +- ext/standard/tests/file/006_variation2.phpt | 48 ++- ext/standard/tests/file/bug37864.phpt | 2 +- ext/standard/tests/file/bug38450.phpt | 6 +- ext/standard/tests/file/bug38450_1.phpt | 6 +- ext/standard/tests/file/bug39551.phpt | 4 - ext/standard/tests/file/bug40374.phpt | 2 +- ext/standard/tests/file/bug41815.phpt | 2 +- ext/standard/tests/file/clearstatcache_error.phpt | 5 +- ext/standard/tests/file/copy_basic.phpt | 1 + ext/standard/tests/file/copy_error.phpt | 7 +- ext/standard/tests/file/copy_variation1.phpt | 2 +- ext/standard/tests/file/copy_variation10.phpt | 2 +- ext/standard/tests/file/copy_variation11.phpt | 2 +- ext/standard/tests/file/copy_variation13.phpt | 2 +- ext/standard/tests/file/copy_variation14.phpt | 2 +- ext/standard/tests/file/copy_variation15.phpt | 2 +- .../tests/file/copy_variation16-win32.phpt | 2 +- ext/standard/tests/file/copy_variation17.phpt | 2 +- ext/standard/tests/file/copy_variation18.phpt | 3 +- ext/standard/tests/file/copy_variation2-win32.phpt | 33 +- ext/standard/tests/file/copy_variation2.phpt | 2 +- ext/standard/tests/file/copy_variation3-win32.phpt | 4 +- ext/standard/tests/file/copy_variation3.phpt | 4 +- ext/standard/tests/file/copy_variation4-win32.phpt | Bin 4276 -> 4277 bytes ext/standard/tests/file/copy_variation4.phpt | Bin 4480 -> 4481 bytes ext/standard/tests/file/copy_variation5-win32.phpt | 2 +- ext/standard/tests/file/copy_variation5.phpt | 3 +- ext/standard/tests/file/copy_variation6.phpt | 2 +- ext/standard/tests/file/copy_variation7.phpt | 2 +- ext/standard/tests/file/copy_variation9.phpt | 2 +- ext/standard/tests/file/disk_free_space_basic.phpt | 29 +- .../tests/file/disk_free_space_error-win32.phpt | 1 + ext/standard/tests/file/disk_free_space_error.phpt | 11 +- .../tests/file/disk_free_space_variation.phpt | 28 +- .../tests/file/disk_total_space_basic.phpt | 32 +- .../tests/file/disk_total_space_error-win32.phpt | 1 + .../tests/file/disk_total_space_error.phpt | 9 +- .../tests/file/disk_total_space_variation.phpt | 21 +- ext/standard/tests/file/fflush_error.phpt | 6 +- .../tests/file/fflush_variation1-win32.phpt | 7 +- ext/standard/tests/file/fflush_variation1.phpt | 18 +- ext/standard/tests/file/fflush_variation2.phpt | 5 +- ext/standard/tests/file/fflush_variation3.phpt | 5 +- ext/standard/tests/file/fflush_variation4.phpt | 5 +- ext/standard/tests/file/file_basic.phpt | 9 +- ext/standard/tests/file/file_error.phpt | 20 +- ext/standard/tests/file/file_variation.phpt | 209 +++--------- ext/standard/tests/file/filegroup_error.phpt | 5 +- ext/standard/tests/file/fileinode_basic.phpt | 1 - ext/standard/tests/file/fileinode_error.phpt | 4 +- ext/standard/tests/file/fileinode_variation.phpt | 11 +- ext/standard/tests/file/fileowner_basic.phpt | 1 + ext/standard/tests/file/fileowner_error.phpt | 5 +- ext/standard/tests/file/filesize_basic.phpt | 1 + ext/standard/tests/file/filesize_error.phpt | 5 +- ext/standard/tests/file/filesize_variation2.phpt | 6 +- .../tests/file/filesize_variation3-win32.phpt | 3 +- .../tests/file/filesize_variation4-win32.phpt | 9 +- ext/standard/tests/file/filesize_variation4.phpt | 2 +- ext/standard/tests/file/filetype_error.phpt | 6 +- ext/standard/tests/file/flock_variation.phpt | 43 +++ ext/standard/tests/file/fnmatch_error.phpt | 14 +- ext/standard/tests/file/fnmatch_variation.phpt | 38 ++- ext/standard/tests/file/fpassthru_basic.phpt | 2 +- ext/standard/tests/file/fputcsv.phpt | 4 +- ext/standard/tests/file/fputcsv_error.phpt | 1 + ext/standard/tests/file/fputcsv_variation1.phpt | 1 + ext/standard/tests/file/fputcsv_variation10.phpt | 1 + ext/standard/tests/file/fputcsv_variation11.phpt | 1 + ext/standard/tests/file/fputcsv_variation12.phpt | 1 + ext/standard/tests/file/fputcsv_variation13.phpt | 1 + ext/standard/tests/file/fputcsv_variation14.phpt | 1 + ext/standard/tests/file/fputcsv_variation2.phpt | 1 + ext/standard/tests/file/fputcsv_variation3.phpt | 1 + ext/standard/tests/file/fputcsv_variation4.phpt | 1 + ext/standard/tests/file/fputcsv_variation5.phpt | 1 + ext/standard/tests/file/fputcsv_variation6.phpt | 1 + ext/standard/tests/file/fputcsv_variation7.phpt | 1 + ext/standard/tests/file/fputcsv_variation8.phpt | 1 + ext/standard/tests/file/fputcsv_variation9.phpt | 1 + ext/standard/tests/file/fscanf.phpt | 14 +- ext/standard/tests/file/fscanf_error.phpt | 1 + ext/standard/tests/file/fscanf_variation1.phpt | 5 +- ext/standard/tests/file/fscanf_variation10.phpt | 5 +- ext/standard/tests/file/fscanf_variation11.phpt | 29 +- ext/standard/tests/file/fscanf_variation12.phpt | 5 +- ext/standard/tests/file/fscanf_variation13.phpt | 5 +- ext/standard/tests/file/fscanf_variation14.phpt | 1 + ext/standard/tests/file/fscanf_variation15.phpt | 1 + ext/standard/tests/file/fscanf_variation16.phpt | 1 + ext/standard/tests/file/fscanf_variation17.phpt | 1 + ext/standard/tests/file/fscanf_variation18.phpt | 1 + ext/standard/tests/file/fscanf_variation19.phpt | 1 + ext/standard/tests/file/fscanf_variation2.phpt | 5 +- ext/standard/tests/file/fscanf_variation20.phpt | 1 + ext/standard/tests/file/fscanf_variation21.phpt | 1 + ext/standard/tests/file/fscanf_variation22.phpt | 1 + ext/standard/tests/file/fscanf_variation23.phpt | 1 + ext/standard/tests/file/fscanf_variation24.phpt | 1 + ext/standard/tests/file/fscanf_variation25.phpt | 1 + ext/standard/tests/file/fscanf_variation26.phpt | 1 + ext/standard/tests/file/fscanf_variation27.phpt | 1 + ext/standard/tests/file/fscanf_variation28.phpt | 2 +- ext/standard/tests/file/fscanf_variation29.phpt | 13 +- ext/standard/tests/file/fscanf_variation3.phpt | 1 + ext/standard/tests/file/fscanf_variation30.phpt | 1 + ext/standard/tests/file/fscanf_variation31.phpt | 1 + ext/standard/tests/file/fscanf_variation32.phpt | 1 + ext/standard/tests/file/fscanf_variation33.phpt | 1 + ext/standard/tests/file/fscanf_variation34.phpt | 1 + ext/standard/tests/file/fscanf_variation35.phpt | 1 + ext/standard/tests/file/fscanf_variation36.phpt | 1 + ext/standard/tests/file/fscanf_variation37.phpt | 1 + ext/standard/tests/file/fscanf_variation38.phpt | 1 + ext/standard/tests/file/fscanf_variation39.phpt | 1 + ext/standard/tests/file/fscanf_variation4.phpt | 5 +- ext/standard/tests/file/fscanf_variation40.phpt | 1 + ext/standard/tests/file/fscanf_variation41.phpt | 1 + ext/standard/tests/file/fscanf_variation42.phpt | 1 + ext/standard/tests/file/fscanf_variation43.phpt | 1 + ext/standard/tests/file/fscanf_variation44.phpt | 1 + ext/standard/tests/file/fscanf_variation45.phpt | 1 + ext/standard/tests/file/fscanf_variation46.phpt | 1 + ext/standard/tests/file/fscanf_variation47.phpt | 1 + ext/standard/tests/file/fscanf_variation49.phpt | 1 + ext/standard/tests/file/fscanf_variation5.phpt | 29 +- ext/standard/tests/file/fscanf_variation50.phpt | 1 + ext/standard/tests/file/fscanf_variation51.phpt | 3 +- ext/standard/tests/file/fscanf_variation52.phpt | 1 + ext/standard/tests/file/fscanf_variation53.phpt | 1 + ext/standard/tests/file/fscanf_variation54.phpt | 3 +- ext/standard/tests/file/fscanf_variation55.phpt | 5 +- ext/standard/tests/file/fscanf_variation6.phpt | 5 +- ext/standard/tests/file/fscanf_variation7.phpt | 5 +- ext/standard/tests/file/fscanf_variation8.phpt | 5 +- ext/standard/tests/file/fscanf_variation9.phpt | 1 + .../tests/file/fseek_ftell_rewind_basic1.phpt | 2 +- .../file/fseek_ftell_rewind_basic2-win32.phpt | 10 +- .../tests/file/fseek_ftell_rewind_basic2.phpt | 9 +- .../tests/file/fseek_ftell_rewind_variation1.phpt | 2 +- .../file/fseek_ftell_rewind_variation2-win32.phpt | 367 --------------------- .../tests/file/fseek_ftell_rewind_variation2.phpt | 9 +- .../tests/file/fseek_ftell_rewind_variation3.phpt | 2 +- .../file/fseek_ftell_rewind_variation4-win32.phpt | 7 +- .../tests/file/fseek_ftell_rewind_variation4.phpt | 9 +- .../tests/file/fseek_ftell_rewind_variation5.phpt | 2 +- .../file/fseek_ftell_rewind_variation6-win32.phpt | 10 +- .../tests/file/fseek_ftell_rewind_variation6.phpt | 9 +- .../tests/file/fseek_ftell_rewind_variation7.phpt | 2 +- .../file/fseek_ftell_rewind_variation8-win32.phpt | 9 +- .../tests/file/fseek_ftell_rewind_variation8.phpt | 9 +- ext/standard/tests/file/ftruncate_error.phpt | 2 +- .../tests/file/ftruncate_variation1-win32.phpt | 2 +- .../tests/file/ftruncate_variation2-win32.phpt | 2 +- .../tests/file/ftruncate_variation3-win32.phpt | 2 +- .../tests/file/ftruncate_variation4-win32.phpt | 2 +- .../tests/file/ftruncate_variation5-win32.phpt | 2 +- .../tests/file/ftruncate_variation6-win32.phpt | 2 +- .../tests/file/ftruncate_variation7-win32.phpt | 2 +- ext/standard/tests/file/htmlentities19.phpt | 1 + ext/standard/tests/file/htmlspecialchars.phpt | 1 + ext/standard/tests/file/is_dir_error.phpt | 6 +- ext/standard/tests/file/is_dir_variation2.phpt | 2 +- ext/standard/tests/file/is_dir_variation3.phpt | 8 +- ext/standard/tests/file/is_executable_basic.phpt | 1 - ext/standard/tests/file/is_executable_error.phpt | 4 +- .../tests/file/is_executable_variation1.phpt | 10 - .../tests/file/is_executable_variation2.phpt | 10 - .../tests/file/is_executable_variation3.phpt | 14 +- ext/standard/tests/file/is_file_error.phpt | 13 +- ext/standard/tests/file/is_file_variation3.phpt | 10 +- ext/standard/tests/file/is_readable_error.phpt | 4 +- .../tests/file/is_readable_variation1.phpt | 10 - .../tests/file/is_readable_variation2.phpt | 10 - .../tests/file/is_readable_variation3.phpt | 14 +- ext/standard/tests/file/is_writable_error.phpt | 8 +- .../tests/file/is_writable_variation1.phpt | 12 +- .../tests/file/is_writable_variation2.phpt | 10 - .../tests/file/is_writable_variation3.phpt | 18 +- ext/standard/tests/file/lstat_stat_error.phpt | 22 +- .../tests/file/lstat_stat_variation14.phpt | 2 +- .../tests/file/lstat_stat_variation18.phpt | 2 +- .../tests/file/lstat_stat_variation19.phpt | 3 +- ext/standard/tests/file/lstat_stat_variation2.phpt | 9 +- .../tests/file/lstat_stat_variation21.phpt | 1 - ext/standard/tests/file/lstat_stat_variation5.phpt | 1 + ext/standard/tests/file/lstat_stat_variation6.phpt | 2 +- ext/standard/tests/file/lstat_stat_variation7.phpt | 2 +- ext/standard/tests/file/lstat_stat_variation8.phpt | 4 +- ext/standard/tests/file/lstat_stat_variation9.phpt | 9 +- ext/standard/tests/file/mkdir_rmdir_error.phpt | 32 -- .../tests/file/mkdir_rmdir_variation2.phpt | 2 - .../tests/file/popen_pclose_basic-win32.phpt | 4 +- ext/standard/tests/file/popen_pclose_basic.phpt | 33 +- .../tests/file/popen_pclose_error-sunos.phpt | 8 +- .../tests/file/popen_pclose_error-win32.phpt | 4 +- ext/standard/tests/file/popen_pclose_error.phpt | 5 +- ext/standard/tests/file/readfile_basic-win32.phpt | 2 +- ext/standard/tests/file/readfile_basic.phpt | 2 +- ext/standard/tests/file/readfile_variation2.phpt | 2 +- ext/standard/tests/file/readfile_variation3.phpt | 2 +- ext/standard/tests/file/realpath_basic-win32.phpt | 10 +- ext/standard/tests/file/realpath_error-win32.phpt | 4 +- .../tests/file/realpath_variation-win32.phpt | 2 +- .../tests/file/rename_variation-win32.phpt | 218 ++++++------ ext/standard/tests/file/stat_basic-win32.phpt | 3 +- ext/standard/tests/file/stat_error-win32.phpt | 13 +- ext/standard/tests/file/stat_variation1-win32.phpt | 1 + ext/standard/tests/file/stat_variation2-win32.phpt | 1 + ext/standard/tests/file/stat_variation3-win32.phpt | 6 +- ext/standard/tests/file/stat_variation4-win32.phpt | 6 +- ext/standard/tests/file/stat_variation5-win32.phpt | 6 +- ext/standard/tests/file/stat_variation6-win32.phpt | 6 +- ext/standard/tests/file/stat_variation7-win32.phpt | 1 + ext/standard/tests/file/stat_variation8-win32.phpt | 6 +- ext/standard/tests/file/stream_get_line.phpt | 2 +- ext/standard/tests/file/stream_rfc2397_001.phpt | 2 +- .../file/symlink_link_linkinfo_is_link_error2.phpt | 4 +- ext/standard/tests/file/tempnam_error.phpt | 16 +- ext/standard/tests/file/tempnam_variation3.phpt | 7 +- ext/standard/tests/file/tempnam_variation7.phpt | 9 +- ext/standard/tests/file/touch.phpt | 2 +- ext/standard/tests/file/umask_basic.phpt | 2 +- ext/standard/tests/file/unlink_error-win32.phpt | 9 +- ext/standard/tests/file/unlink_error.phpt | 12 +- .../tests/file/unlink_variation1-win32.phpt | 2 +- ext/standard/tests/file/unlink_variation1.phpt | 2 +- .../tests/file/unlink_variation2-win32.phpt | 2 +- ext/standard/tests/file/unlink_variation4.phpt | 4 +- ext/standard/tests/file/userdirstream.phpt | 1 - ext/standard/tests/file/userfilters.phpt | 2 +- ext/standard/tests/file/userstreams.phpt | 2 +- .../tests/general_functions/phpcredits.phpt | 2 +- ext/standard/tests/network/bug41347.phpt | 4 - ext/standard/tests/strings/convert_cyr_string.phpt | 28 +- 237 files changed, 856 insertions(+), 1314 deletions(-) (limited to 'ext/standard') diff --git a/ext/standard/tests/file/005_error.phpt b/ext/standard/tests/file/005_error.phpt index 77fd4731c3..fc4852e4ad 100644 --- a/ext/standard/tests/file/005_error.phpt +++ b/ext/standard/tests/file/005_error.phpt @@ -54,7 +54,7 @@ var_dump( filemtime(__FILE__, 100) ); var_dump( filectime(__FILE__, TRUE) ); var_dump( touch(__FILE__, 10, 100, 123) ); -echo "\n*** Done ***\n"; +echo "\nDone"; ?> --EXPECTF-- *** Testing error conditions *** @@ -72,54 +72,55 @@ bool(false) Warning: touch(): Unable to create file /no/such/file/or/dir because No such file or directory in %s on line %d bool(false) -Warning: Wrong parameter count for fileatime() in %s on line %d +Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for filemtime() in %s on line %d +Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for filectime() in %s on line %d +Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for touch() in %s on line %d +Warning: touch() expects at most 3 parameters, 4 given in %s on line %d NULL -- Testing No.of arguments less than expected -- -Warning: Wrong parameter count for fileatime() in %s on line %d +Warning: fileatime() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for filemtime() in %s on line %d +Warning: filemtime() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for filectime() in %s on line %d +Warning: filectime() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for touch() in %s on line %d +Warning: touch() expects at least 1 parameter, 0 given in %s on line %d NULL -- Testing No.of arguments greater than expected -- -Warning: Wrong parameter count for fileatime() in %s on line %d +Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for filemtime() in %s on line %d +Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for filectime() in %s on line %d +Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for touch() in %s on line %d +Warning: touch() expects at most 3 parameters, 4 given in %s on line %d NULL -Warning: Wrong parameter count for fileatime() in %s on line %d +Warning: fileatime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for filemtime() in %s on line %d +Warning: filemtime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for filectime() in %s on line %d +Warning: filectime() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for touch() in %s on line %d +Warning: touch() expects at most 3 parameters, 4 given in %s on line %d NULL -*** Done *** +Done + diff --git a/ext/standard/tests/file/006_error.phpt b/ext/standard/tests/file/006_error.phpt index ac95ca5700..04cc274ecc 100644 --- a/ext/standard/tests/file/006_error.phpt +++ b/ext/standard/tests/file/006_error.phpt @@ -83,25 +83,25 @@ Warning: fileperms(): stat failed for /no/such/file/dir in %s on line %d bool(false) -Warning: Wrong parameter count for chmod() in %s on line %d +Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for chmod() in %s on line %d +Warning: chmod() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for chmod() in %s on line %d +Warning: chmod() expects exactly 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for fileperms() in %s on line %d +Warning: fileperms() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for chmod() in %s on line %d +Warning: chmod() expects exactly 2 parameters, 3 given in %s on line %d NULL -Warning: Wrong parameter count for fileperms() in %s on line %d +Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for fileperms() in %s on line %d +Warning: fileperms() expects exactly 1 parameter, 2 given in %s on line %d NULL *** Done *** diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt index 348e9b869e..d56207a349 100644 --- a/ext/standard/tests/file/006_variation2.phpt +++ b/ext/standard/tests/file/006_variation2.phpt @@ -148,23 +148,39 @@ bool(true) bool(true) 43567 -- Iteration 12 -- -bool(true) -100000 -bool(true) -40000 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 -- Iteration 13 -- -bool(true) -100000 -bool(true) -40000 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 -- Iteration 14 -- -bool(true) -100000 -bool(true) -40000 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 -- Iteration 15 -- -bool(true) -100000 -bool(true) -40000 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +103567 + +Warning: chmod() expects parameter 2 to be long, string given in %s on line %d +NULL +43567 *** Done *** diff --git a/ext/standard/tests/file/bug37864.phpt b/ext/standard/tests/file/bug37864.phpt index d74647cc79..f8743bd5ec 100644 --- a/ext/standard/tests/file/bug37864.phpt +++ b/ext/standard/tests/file/bug37864.phpt @@ -2,7 +2,7 @@ Bug #37864 (file_get_contents() leaks on empty file) --FILE-- --EXPECTF-- Done ---UEXPECTF-- -Done - -Notice: Unknown: 0 character unicode buffer downcoded for binary stream runtime_encoding in Unknown on line 0 diff --git a/ext/standard/tests/file/bug40374.phpt b/ext/standard/tests/file/bug40374.phpt index 2be48008d9..327289eba2 100644 --- a/ext/standard/tests/file/bug40374.phpt +++ b/ext/standard/tests/file/bug40374.phpt @@ -5,7 +5,7 @@ Bug #40374 (php_shutdown_temporary_directory() tries to free local value) $file = tempnam(sys_get_temp_dir(), "test_"); var_dump($file); -$fp = fopen($file, "w"); +$fp = fopen($file, "wt"); fwrite($fp, "test"); fclose($fp); unlink($file); diff --git a/ext/standard/tests/file/bug41815.phpt b/ext/standard/tests/file/bug41815.phpt index 984682d250..f77468d96d 100644 --- a/ext/standard/tests/file/bug41815.phpt +++ b/ext/standard/tests/file/bug41815.phpt @@ -6,7 +6,7 @@ Bug #41815 (Concurrent read/write fails when EOF is reached) $filename = dirname(__FILE__)."/concur_rw.txt"; @unlink($filename); -$writer = fopen($filename, "w"); +$writer = fopen($filename, "wt"); $reader = fopen($filename, "r"); fread($reader, 1); fwrite($writer, "foo"); diff --git a/ext/standard/tests/file/clearstatcache_error.phpt b/ext/standard/tests/file/clearstatcache_error.phpt index 71e458083e..77a97499b1 100644 --- a/ext/standard/tests/file/clearstatcache_error.phpt +++ b/ext/standard/tests/file/clearstatcache_error.phpt @@ -7,12 +7,13 @@ Test clearstatcache() function: error conditions Description: clears files status cache */ -echo "*** Testing clearstatcache() function: error conditions --"; +echo "*** Testing clearstatcache() function: error conditions ***\n"; var_dump( clearstatcache("file") ); //No.of args more than expected echo "*** Done ***\n"; ?> --EXPECTF-- -*** Testing clearstatcache() function: error conditions -- +*** Testing clearstatcache() function: error conditions *** + Warning: Wrong parameter count for clearstatcache() in %s on line %d NULL *** Done *** diff --git a/ext/standard/tests/file/copy_basic.phpt b/ext/standard/tests/file/copy_basic.phpt index 7663dc6019..32788f9f74 100644 --- a/ext/standard/tests/file/copy_basic.phpt +++ b/ext/standard/tests/file/copy_basic.phpt @@ -55,3 +55,4 @@ bool(true) %d %d *** Done *** + diff --git a/ext/standard/tests/file/copy_error.phpt b/ext/standard/tests/file/copy_error.phpt index c0c37121d8..96072ebfba 100644 --- a/ext/standard/tests/file/copy_error.phpt +++ b/ext/standard/tests/file/copy_error.phpt @@ -27,12 +27,13 @@ echo "*** Done ***\n"; Warning: copy(/no/file): failed to open stream: No such file or directory in %s on line %d bool(false) -Warning: Wrong parameter count for copy() in %s on line %d +Warning: copy() expects at least 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for copy() in %s on line %d +Warning: copy() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for copy() in %s on line %d +Warning: copy() expects parameter 3 to be resource, string given in %s on line %d NULL *** Done *** + diff --git a/ext/standard/tests/file/copy_variation1.phpt b/ext/standard/tests/file/copy_variation1.phpt index 7cf20fd749..4d0a97302a 100644 --- a/ext/standard/tests/file/copy_variation1.phpt +++ b/ext/standard/tests/file/copy_variation1.phpt @@ -15,7 +15,7 @@ echo "*** Test copy() function: destination file names containing numerics/strin $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation1.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation10.phpt b/ext/standard/tests/file/copy_variation10.phpt index c5cbc84254..98494af043 100644 --- a/ext/standard/tests/file/copy_variation10.phpt +++ b/ext/standard/tests/file/copy_variation10.phpt @@ -14,7 +14,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n"; $file = $file_path."/copy_variation10.tmp"; $file_handle = fopen($file, "w"); -fwrite($file_handle, str_repeat("Hello2world...\n", 100)); +fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); fclose($file_handle); var_dump( copy($file, $file) ); diff --git a/ext/standard/tests/file/copy_variation11.phpt b/ext/standard/tests/file/copy_variation11.phpt index b01dab0890..adee8e1c65 100644 --- a/ext/standard/tests/file/copy_variation11.phpt +++ b/ext/standard/tests/file/copy_variation11.phpt @@ -14,7 +14,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n"; $file = $file_path."/copy_variation11.tmp"; $file_handle = fopen($file, "w"); -fwrite($file_handle, str_repeat("Hello, world...", 20)); +fwrite($file_handle, str_repeat(b"Hello, world...", 20)); fclose($file_handle); $dir = $file_path."/copy_variation11"; diff --git a/ext/standard/tests/file/copy_variation13.phpt b/ext/standard/tests/file/copy_variation13.phpt index bd1a21dab5..97fc04d5ee 100644 --- a/ext/standard/tests/file/copy_variation13.phpt +++ b/ext/standard/tests/file/copy_variation13.phpt @@ -1,5 +1,5 @@ --TEST-- -Test copy() function: usage variations - src as dir and dest as an existing file(Bug #42243) +Test copy() function: usage variations - src as dir and dest as an existing file (Bug #42243) --FILE-- "; diff --git a/ext/standard/tests/file/copy_variation17.phpt b/ext/standard/tests/file/copy_variation17.phpt index 2dfe94c6e9..97f1665f01 100644 --- a/ext/standard/tests/file/copy_variation17.phpt +++ b/ext/standard/tests/file/copy_variation17.phpt @@ -14,7 +14,7 @@ $file_path = dirname(__FILE__); echo "*** Test copy() function: With source file names containing wild-card chars ***\n"; $src_file = $file_path."/copy_variation17.tmp"; $file_handle = fopen($src_file, "w"); -fwrite($file_handle, str_repeat("Hello2world...\n", 100)); +fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); fclose($file_handle); $dir = $file_path."/copy_variation17"; diff --git a/ext/standard/tests/file/copy_variation18.phpt b/ext/standard/tests/file/copy_variation18.phpt index 18407bd584..65c1dc2ef6 100644 --- a/ext/standard/tests/file/copy_variation18.phpt +++ b/ext/standard/tests/file/copy_variation18.phpt @@ -16,7 +16,7 @@ require($file_path."/file.inc"); echo "*** Test copy() function: stat of file before and after copy ***\n"; $src_file_name = $file_path."/copy_variation18.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite($file_handle, str_repeat("Hello2world...\n", 100)); +fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); fclose($file_handle); $dest_file_name = $file_path."/copy_copy_variation18.tmp"; @@ -43,7 +43,6 @@ echo "*** Done ***\n"; unlink(dirname(__FILE__)."/copy_copy_variation18.tmp"); unlink(dirname(__FILE__)."/copy_variation18.tmp"); ?> - --EXPECTF-- *** Test copy() function: stat of file before and after copy *** Copy operation => bool(true) diff --git a/ext/standard/tests/file/copy_variation2-win32.phpt b/ext/standard/tests/file/copy_variation2-win32.phpt index f51cbaf078..4819d63e36 100644 --- a/ext/standard/tests/file/copy_variation2-win32.phpt +++ b/ext/standard/tests/file/copy_variation2-win32.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing special charac $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ @@ -31,7 +31,6 @@ $dest_files = array( "@copy_variation2.tmp", "#copy_variation2.tmp", "+copy_variation2.tmp", - "*copy_variation2.tmp", "?copy_variation2.tmp", ">copy_variation2.tmp", "!copy_variation2.tmp", @@ -136,90 +135,84 @@ bool(false) Existence of destination file => bool(false) -- Iteration 7 -- -Copy operation => -Warning: copy(%s): %s -bool(false) -Existence of destination file => bool(false) - --- Iteration 8 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/!copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 9 -- +-- Iteration 8 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/©_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 10 -- +-- Iteration 9 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/(copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 11 -- +-- Iteration 10 -- Copy operation => Warning: copy(%s): %s bool(false) Existence of destination file => bool(false) --- Iteration 12 -- +-- Iteration 11 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/;copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 13 -- +-- Iteration 12 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/=copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 14 -- +-- Iteration 13 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/[copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 15 -- +-- Iteration 14 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/^copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 16 -- +-- Iteration 15 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/{copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 17 -- +-- Iteration 16 -- Copy operation => Warning: copy(%s): %s bool(false) Existence of destination file => bool(false) --- Iteration 18 -- +-- Iteration 17 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/~copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) --- Iteration 19 -- +-- Iteration 18 -- Copy operation => bool(true) Existence of destination file => bool(true) Destination file name => %s/$copy_variation2.tmp Size of source file => int(1500) Size of destination file => int(1500) -*** Done *** \ No newline at end of file +*** Done *** diff --git a/ext/standard/tests/file/copy_variation2.phpt b/ext/standard/tests/file/copy_variation2.phpt index a9b36803d9..d99f5a8da3 100644 --- a/ext/standard/tests/file/copy_variation2.phpt +++ b/ext/standard/tests/file/copy_variation2.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing special charac $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation3-win32.phpt b/ext/standard/tests/file/copy_variation3-win32.phpt index a9a445d696..68ce4a1680 100644 --- a/ext/standard/tests/file/copy_variation3-win32.phpt +++ b/ext/standard/tests/file/copy_variation3-win32.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing whitespaces ** $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ @@ -106,4 +106,4 @@ Copy operation => Warning: copy(%s): %s bool(false) Existence of destination file => bool(false) -*** Done *** \ No newline at end of file +*** Done *** diff --git a/ext/standard/tests/file/copy_variation3.phpt b/ext/standard/tests/file/copy_variation3.phpt index 73bf814520..1c45c8c129 100644 --- a/ext/standard/tests/file/copy_variation3.phpt +++ b/ext/standard/tests/file/copy_variation3.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: destination file names containing whitespaces ** $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ @@ -107,4 +107,4 @@ Existence of destination file => bool(true) Destination file name => Size of source file => int(1500) Size of destination file => int(1500) -*** Done *** \ No newline at end of file +*** Done *** diff --git a/ext/standard/tests/file/copy_variation4-win32.phpt b/ext/standard/tests/file/copy_variation4-win32.phpt index 3c5408aeb0..ae2a1ed527 100644 Binary files a/ext/standard/tests/file/copy_variation4-win32.phpt and b/ext/standard/tests/file/copy_variation4-win32.phpt differ diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt index 38363fc89e..e656210fa9 100644 Binary files a/ext/standard/tests/file/copy_variation4.phpt and b/ext/standard/tests/file/copy_variation4.phpt differ diff --git a/ext/standard/tests/file/copy_variation5-win32.phpt b/ext/standard/tests/file/copy_variation5-win32.phpt index 48e85eaf02..baf7be470c 100644 --- a/ext/standard/tests/file/copy_variation5-win32.phpt +++ b/ext/standard/tests/file/copy_variation5-win32.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: checking case sensitivity in creation of destina $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ diff --git a/ext/standard/tests/file/copy_variation5.phpt b/ext/standard/tests/file/copy_variation5.phpt index f4b4f01700..8abc9c961a 100644 --- a/ext/standard/tests/file/copy_variation5.phpt +++ b/ext/standard/tests/file/copy_variation5.phpt @@ -20,7 +20,7 @@ echo "*** Test copy() function: checking case sensitivity in creation of destina $file_path = dirname(__FILE__); $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); -fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); +fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); fclose($file_handle); /* array of destination file names */ @@ -64,7 +64,6 @@ foreach($dest_files as $dest_file) { $count++; } - $count = 1; foreach($dest_files as $dest_file) { unlink($file_path."/".$dest_file); diff --git a/ext/standard/tests/file/copy_variation6.phpt b/ext/standard/tests/file/copy_variation6.phpt index 1220e34283..3213c6b436 100644 --- a/ext/standard/tests/file/copy_variation6.phpt +++ b/ext/standard/tests/file/copy_variation6.phpt @@ -3,7 +3,7 @@ Test copy() function: usage variations - copy empty file across dirs --SKIPIF-- --FILE-- $space2 ) 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-- --EXPECTF-- @@ -61,5 +64,7 @@ float(%d) float(%d) Free Space Value Is Correct +*** Testing with Binary Input *** +float(%d) --- Done -- +--- Done --- diff --git a/ext/standard/tests/file/disk_free_space_error-win32.phpt b/ext/standard/tests/file/disk_free_space_error-win32.phpt index af322f482b..21e7bf653d 100644 --- a/ext/standard/tests/file/disk_free_space_error-win32.phpt +++ b/ext/standard/tests/file/disk_free_space_error-win32.phpt @@ -72,3 +72,4 @@ Warning: diskfreespace(): The directory name is invalid. bool(false) -- Done -- + diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt index ee5abc8e8a..ddd25a35db 100644 --- a/ext/standard/tests/file/disk_free_space_error.phpt +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -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-- --FILE-- + --EXPECTF-- -*** Testing disk_free_space() function with a directory *** +*** 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(%d) float(%d) diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt index caf7452e41..d211f39437 100644 --- a/ext/standard/tests/file/disk_total_space_basic.phpt +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -4,31 +4,31 @@ Test disk_total_space() function : basic functionality - --CLEAN-- --EXPECTF-- -*** Testing with existing directory *** +*** Testing with normal directory *** float(%d) *** Testing with newly created directory *** float(%d) - - Total Space after writing to a file + +Total Space after writing to a file float(%d) ---- Done --- +-- Done -- diff --git a/ext/standard/tests/file/disk_total_space_error-win32.phpt b/ext/standard/tests/file/disk_total_space_error-win32.phpt index 19f3f93bef..a3ea183194 100644 --- a/ext/standard/tests/file/disk_total_space_error-win32.phpt +++ b/ext/standard/tests/file/disk_total_space_error-win32.phpt @@ -53,3 +53,4 @@ Warning: disk_total_space(): The directory name is invalid. bool(false) --- Done --- + diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt index 4050997e8e..d986f779ba 100644 --- a/ext/standard/tests/file/disk_total_space_error.phpt +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -2,14 +2,14 @@ Test disk_total_space() function : error conditions --SKIPIF-- --FILE-- --CLEAN-- + + --EXPECTF-- *** Testing with a directory *** float(%d) @@ -68,7 +73,7 @@ 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(%d) @@ -104,5 +109,7 @@ float(%d) -- Iteration 12 -- float(%d) +*** Testing with Binary Input *** +float(%d) --- Done --- diff --git a/ext/standard/tests/file/fflush_error.phpt b/ext/standard/tests/file/fflush_error.phpt index bfbd6cc1b1..cb183e89c0 100644 --- a/ext/standard/tests/file/fflush_error.phpt +++ b/ext/standard/tests/file/fflush_error.phpt @@ -41,7 +41,7 @@ for($loop_counter = 1; $loop_counter <= count($invalid_args); $loop_counter++) { echo "-- Iteration $loop_counter --\n"; var_dump( fflush($invalid_args[$loop_counter - 1]) ); } -echo "Done\n"; +echo "\n*** Done ***"; ?> --CLEAN-- @@ -85,4 +85,6 @@ bool(false) Warning: fflush(): supplied argument is not a valid stream resource in %s on line %d bool(false) -Done + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation1-win32.phpt b/ext/standard/tests/file/fflush_variation1-win32.phpt index 63cdf1721d..0b6b096a34 100644 --- a/ext/standard/tests/file/fflush_variation1-win32.phpt +++ b/ext/standard/tests/file/fflush_variation1-win32.phpt @@ -37,6 +37,8 @@ foreach( $file_types as $type ) { $file_handle = fopen($file_name, "w"); if($file_handle == false) exit("Error:failed to open file $file_name"); + + // filling the file some data if mode is append mode if( substr($mode, 0, 1) == "a") fill_file($file_handle, $type, 10); fclose($file_handle); @@ -59,7 +61,7 @@ foreach( $file_types as $type ) { $count++; } - +echo "\n*** Done ***"; ?> --EXPECTF-- *** Testing fflush(): with various types of files *** @@ -524,3 +526,6 @@ ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) bool(true) bool(true) ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation1.phpt b/ext/standard/tests/file/fflush_variation1.phpt index dc55fde8eb..2ecf7ea919 100755 --- a/ext/standard/tests/file/fflush_variation1.phpt +++ b/ext/standard/tests/file/fflush_variation1.phpt @@ -35,11 +35,14 @@ foreach( $file_types as $type ) { // creating the file except for x mode if( substr($mode, 0, 1) != "x" ) { $file_handle = fopen($file_name, "w"); - if($file_handle == false) - exit("Error:failed to open file $file_name"); - if( substr($mode, 0, 1) == "a") - fill_file($file_handle, $type, 10); - fclose($file_handle); + if($file_handle == false) + exit("Error:failed to open file $file_name"); + + // filling the file with some data if mode is append mode + if( substr($mode, 0, 1) == "a") + fill_file($file_handle, $type, 10); + fclose($file_handle); + } // opening the file in different modes @@ -59,7 +62,7 @@ foreach( $file_types as $type ) { $count++; } - +echo "\n*** Done ***"; ?> --EXPECTF-- *** Testing fflush(): with various types of files *** @@ -524,3 +527,6 @@ ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) bool(true) bool(true) ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(50) + +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation2.phpt b/ext/standard/tests/file/fflush_variation2.phpt index 9498c978ef..651c716439 100755 --- a/ext/standard/tests/file/fflush_variation2.phpt +++ b/ext/standard/tests/file/fflush_variation2.phpt @@ -63,7 +63,7 @@ foreach( $file_types as $type ) { $count++; } -echo "\n--- Done ---"; +echo "\n*** Done ***"; ?> --EXPECTF-- *** Testing fflush(): with soft links to files opened in diff modes *** @@ -439,4 +439,5 @@ bool(true) bool(true) ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) ---- Done --- +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation3.phpt b/ext/standard/tests/file/fflush_variation3.phpt index f239602486..6dfd49bc40 100755 --- a/ext/standard/tests/file/fflush_variation3.phpt +++ b/ext/standard/tests/file/fflush_variation3.phpt @@ -63,7 +63,7 @@ foreach( $file_types as $type ) { $count++; } -echo "\n--- Done ---"; +echo "\n*** Done ***"; ?> --EXPECTF-- *** Testing fflush(): with hard links to files opened in diff modes *** @@ -379,4 +379,5 @@ bool(true) bool(true) ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 int(60) ---- Done --- +*** Done *** + diff --git a/ext/standard/tests/file/fflush_variation4.phpt b/ext/standard/tests/file/fflush_variation4.phpt index cc0d9b0fb6..f98616c3d8 100755 --- a/ext/standard/tests/file/fflush_variation4.phpt +++ b/ext/standard/tests/file/fflush_variation4.phpt @@ -38,7 +38,7 @@ foreach( $file_modes as $mode ) { $count++; } -echo "\n--- Done ---"; +echo "\n*** Done ***"; ?> --EXPECTF-- *** Testing fflush(): with file handles of files opened in various read modes *** @@ -49,4 +49,5 @@ bool(true) -- Iteration 3 with file opened in rt mode -- bool(true) ---- Done --- +*** Done *** + diff --git a/ext/standard/tests/file/file_basic.phpt b/ext/standard/tests/file/file_basic.phpt index e1d9ec561a..97a592fd0c 100644 --- a/ext/standard/tests/file/file_basic.phpt +++ b/ext/standard/tests/file/file_basic.phpt @@ -9,7 +9,7 @@ Test file() function : basic functionality */ require(dirname(__FILE__) . '/file.inc'); $file_path = dirname(__FILE__); -echo "*** Testing file() with basic files ***\n"; +echo "*** Testing file() with basic types of files ***\n"; $filetypes = array("numeric", "text", "empty", "text_with_new_line"); foreach( $filetypes as $type ) { @@ -18,7 +18,7 @@ foreach( $filetypes as $type ) { delete_files($file_path, 1, "file_basic"); } -echo "*** Testing for return type of file function ***\n"; +echo "*** Testing for return type of file() function ***\n"; foreach( $filetypes as $type ) { create_files($file_path, 1, $type, 0755, 1, "w", "file_basic"); $ret_arr = file($file_path."/file_basic1.tmp"); @@ -29,7 +29,7 @@ foreach( $filetypes as $type ) { echo "\n--- Done ---"; ?> --EXPECTF-- -*** Testing file() with basic files *** +*** Testing file() with basic types of files *** Array ( [0] => 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 @@ -67,10 +67,11 @@ Array [11] => line ) -*** Testing for return type of file function *** +*** Testing for return type of file() function *** bool(true) bool(true) bool(true) bool(true) --- Done --- + diff --git a/ext/standard/tests/file/file_error.phpt b/ext/standard/tests/file/file_error.phpt index e2562d3e23..a7f83807fc 100644 --- a/ext/standard/tests/file/file_error.phpt +++ b/ext/standard/tests/file/file_error.phpt @@ -1,15 +1,13 @@ --TEST-- -Testing file() function : error conditions +Test file() function : error conditions --FILE-- --EXPECTF-- @@ -44,7 +43,8 @@ NULL array(0) { } -Warning: file(nofile.tmp): failed to open stream: No such file or directory in %s on line %d +Warning: file(temp.tmp): failed to open stream: No such file or directory in %s on line %d bool(false) --- Done --- + diff --git a/ext/standard/tests/file/file_variation.phpt b/ext/standard/tests/file/file_variation.phpt index 4672f7d683..512d5f3eb6 100644 --- a/ext/standard/tests/file/file_variation.phpt +++ b/ext/standard/tests/file/file_variation.phpt @@ -3,61 +3,65 @@ Test file() function : usage variations --FILE-- --CLEAN-- --EXPECTF-- @@ -127,139 +131,30 @@ array(5) { *** Testing with variation in use_include_path argument *** array(1) { [0]=> - string(100) "text text text text text text text text text text text text text text text text text text text text " + string(44) "aaaaaaaaaaaaaaabbbbbbbbbbb111111111222222222" } array(1) { [0]=> - string(100) "text text text text text text text text text text text text text text text text text text text text " + string(44) "aaaaaaaaaaaaaaabbbbbbbbbbb111111111222222222" } -array(1) { - [0]=> - string(100) "text text text text text text text text text text text text text text text text text text text text " -} -array(1) { +*** Using file function to remove line containing a key string *** +File contents in array form Before replacement of the key +array(3) { [0]=> - string(100) "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" -} -array(1) { - [0]=> - string(100) "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" -} -array(1) { - [0]=> - string(100) "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" -} -array(1) { - [0]=> - string(100) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " -} -array(1) { - [0]=> - string(100) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " -} -array(1) { - [0]=> - string(100) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 " -} -array(12) { - [0]=> - string(5) "line + string(44) "The key string to be searched is SEARCH_KEY " [1]=> - string(13) "line of text -" - [2]=> - string(5) "line + string(24) "Line without key string " - [3]=> - string(13) "line of text -" - [4]=> - string(5) "line -" - [5]=> - string(13) "line of text -" - [6]=> - string(5) "line -" - [7]=> - string(13) "line of text -" - [8]=> - string(5) "line -" - [9]=> - string(13) "line of text -" - [10]=> - string(5) "line -" - [11]=> - string(5) "line " -} -array(12) { - [0]=> - string(4) "line" - [1]=> - string(12) "line of text" [2]=> - string(4) "line" - [3]=> - string(12) "line of text" - [4]=> - string(4) "line" - [5]=> - string(12) "line of text" - [6]=> - string(4) "line" - [7]=> - string(12) "line of text" - [8]=> - string(4) "line" - [9]=> - string(12) "line of text" - [10]=> - string(4) "line" - [11]=> - string(5) "line " + string(43) "The key string to be searched is SEARCH_KEY" } -array(12) { +File contents in array form After replacement of the key +array(1) { [0]=> - string(5) "line + string(24) "Line without key string " - [1]=> - string(13) "line of text -" - [2]=> - string(5) "line -" - [3]=> - string(13) "line of text -" - [4]=> - string(5) "line -" - [5]=> - string(13) "line of text -" - [6]=> - string(5) "line -" - [7]=> - string(13) "line of text -" - [8]=> - string(5) "line -" - [9]=> - string(13) "line of text -" - [10]=> - string(5) "line -" - [11]=> - string(5) "line " } --- Done --- + diff --git a/ext/standard/tests/file/filegroup_error.phpt b/ext/standard/tests/file/filegroup_error.phpt index d1213941aa..3d96ffdaf0 100644 --- a/ext/standard/tests/file/filegroup_error.phpt +++ b/ext/standard/tests/file/filegroup_error.phpt @@ -34,10 +34,11 @@ bool(false) Warning: filegroup(): stat failed for 100 in %s on line %d bool(false) -Warning: Wrong parameter count for filegroup() in %s on line %d +Warning: filegroup() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for filegroup() in %s on line %d +Warning: filegroup() expects exactly 1 parameter, 2 given in %s on line %d NULL *** Done *** + diff --git a/ext/standard/tests/file/fileinode_basic.phpt b/ext/standard/tests/file/fileinode_basic.phpt index 27b7dbd799..98e5cf0836 100644 --- a/ext/standard/tests/file/fileinode_basic.phpt +++ b/ext/standard/tests/file/fileinode_basic.phpt @@ -26,7 +26,6 @@ echo "\n*** Done ***"; - --EXPECTF-- *** Testing fileinode() with file, directory *** %d diff --git a/ext/standard/tests/file/fileinode_error.phpt b/ext/standard/tests/file/fileinode_error.phpt index eb88aa36b8..d716c4ae5b 100644 --- a/ext/standard/tests/file/fileinode_error.phpt +++ b/ext/standard/tests/file/fileinode_error.phpt @@ -35,10 +35,10 @@ bool(false) Warning: fileinode(): stat failed for 100 in %s on line 14 bool(false) -Warning: Wrong parameter count for fileinode() in %s on line 17 +Warning: fileinode() expects exactly 1 parameter, 0 given in %s on line 17 NULL -Warning: Wrong parameter count for fileinode() in %s on line 20 +Warning: fileinode() expects exactly 1 parameter, 2 given in %s on line 20 NULL *** Done *** diff --git a/ext/standard/tests/file/fileinode_variation.phpt b/ext/standard/tests/file/fileinode_variation.phpt index 1f48d22491..1fac953098 100644 --- a/ext/standard/tests/file/fileinode_variation.phpt +++ b/ext/standard/tests/file/fileinode_variation.phpt @@ -73,7 +73,13 @@ print( fileinode("$file_path/dir") )."\n"; clearstatcache(); mkdir("$file_path/dir/subdir"); -print( fileinode("$file_path/dir/subdir") ); +print( fileinode("$file_path/dir/subdir") )."\n"; +clearstatcache(); + +echo "-- Testing with binary input --\n"; +print( fileinode(b"$file_path/dir") )."\n"; +clearstatcache(); +print( fileinode(b"$file_path/dir/subdir") ); rmdir("$file_path/dir/subdir"); rmdir("$file_path/dir"); @@ -100,4 +106,7 @@ echo "\n*** Done ***"; -- Testing with directories -- %d %d +-- Testing with binary input -- +%d +%d *** Done *** diff --git a/ext/standard/tests/file/fileowner_basic.phpt b/ext/standard/tests/file/fileowner_basic.phpt index 703a36bed7..5b5ff9a900 100644 --- a/ext/standard/tests/file/fileowner_basic.phpt +++ b/ext/standard/tests/file/fileowner_basic.phpt @@ -48,3 +48,4 @@ int(%d) int(%d) int(%d) *** Done *** + diff --git a/ext/standard/tests/file/fileowner_error.phpt b/ext/standard/tests/file/fileowner_error.phpt index b58927f210..efffb36334 100644 --- a/ext/standard/tests/file/fileowner_error.phpt +++ b/ext/standard/tests/file/fileowner_error.phpt @@ -34,10 +34,11 @@ bool(false) Warning: fileowner(): stat failed for 100 in %s on line %d bool(false) -Warning: Wrong parameter count for fileowner() in %s on line %d +Warning: fileowner() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for fileowner() in %s on line %d +Warning: fileowner() expects exactly 1 parameter, 2 given in %s on line %d NULL *** Done *** + diff --git a/ext/standard/tests/file/filesize_basic.phpt b/ext/standard/tests/file/filesize_basic.phpt index 72ec487423..58041b95c3 100644 --- a/ext/standard/tests/file/filesize_basic.phpt +++ b/ext/standard/tests/file/filesize_basic.phpt @@ -36,3 +36,4 @@ int(%d) int(%d) int(0) *** Done *** + diff --git a/ext/standard/tests/file/filesize_error.phpt b/ext/standard/tests/file/filesize_error.phpt index f15a4f786e..6d8cfa8693 100644 --- a/ext/standard/tests/file/filesize_error.phpt +++ b/ext/standard/tests/file/filesize_error.phpt @@ -31,10 +31,11 @@ bool(false) Warning: filesize(): stat failed for /no/such/dir in %s on line %d bool(false) -Warning: Wrong parameter count for filesize() in %s on line %d +Warning: filesize() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for filesize() in %s on line %d +Warning: filesize() expects exactly 1 parameter, 2 given in %s on line %d NULL *** Done *** + diff --git a/ext/standard/tests/file/filesize_variation2.phpt b/ext/standard/tests/file/filesize_variation2.phpt index bf26bd206e..8a7594ee79 100644 --- a/ext/standard/tests/file/filesize_variation2.phpt +++ b/ext/standard/tests/file/filesize_variation2.phpt @@ -25,12 +25,12 @@ var_dump( filesize( $file_path."/filesize_variation2")); clearstatcache(); echo "-- Creating a file inside base dir, and checking dir & file size --\n"; -create_files($file_path."/filesize_variation2", 1, "numeric", 0755, 1, "w", "filesize_variation", 2); +create_files($file_path."/filesize_variation2", 1, "numeric", 0755, 1, "w", "filesize_variation"); var_dump( filesize( $file_path."/filesize_variation2")); clearstatcache(); -var_dump( filesize( $file_path."/filesize_variation2/filesize_variation2.tmp")); +var_dump( filesize( $file_path."/filesize_variation2/filesize_variation1.tmp")); clearstatcache(); -delete_files($file_path."/filesize_variation2", 1, "filesize_variation", 2); +delete_files($file_path."/filesize_variation2", 1, "filesize_variation"); echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n"; mkdir( $file_path."/filesize_variation2/filesize_variation2_sub"); diff --git a/ext/standard/tests/file/filesize_variation3-win32.phpt b/ext/standard/tests/file/filesize_variation3-win32.phpt index 51f6f3dacb..f46695954c 100644 --- a/ext/standard/tests/file/filesize_variation3-win32.phpt +++ b/ext/standard/tests/file/filesize_variation3-win32.phpt @@ -14,12 +14,11 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ $file_path = dirname(__FILE__); -require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; $filename = $file_path."/filesize_variation3.tmp"; $file_handle = fopen($filename, "w"); -fwrite($file_handle, str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes +fwrite($file_handle, (binary)str_repeat("Hello,World ", 1000) ); // create file of size 12000 bytes fclose($file_handle); echo "-- Testing filesize() after truncating the file to a new length --\n"; diff --git a/ext/standard/tests/file/filesize_variation4-win32.phpt b/ext/standard/tests/file/filesize_variation4-win32.phpt index 2e6e49bb50..5f20f4210d 100644 --- a/ext/standard/tests/file/filesize_variation4-win32.phpt +++ b/ext/standard/tests/file/filesize_variation4-win32.phpt @@ -13,16 +13,14 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -/* Testing filesize() with data written using different file modes and by creating holes in file */ - $file_path = dirname(__FILE__); +require($file_path."/file.inc"); -echo "*** Testing filesize(): usage variations ***\n"; +echo "*** Testing filesize(): usage variations ***\n"; echo "\n*** Testing filesize() with data written using different file modes and by creating holes in file ***\n"; $filename = $file_path."/filesize_variation4.tmp"; $string = "Test 2 test the filesize() fn, with data containing all the types like !@@##$%^&*():<>?|~+!;',.\][{}(special) chars, 12345(numeric) chars, and \n(newline char), \t(tab), \0, \r and so on........\0"; - echo "-- opening the file in 'w' mode and get the size --\n"; $file_handle = fopen($filename, "w"); var_dump( strlen($string) ); //strlen of the string @@ -36,7 +34,6 @@ $file_handle = fopen($filename, "wt"); var_dump( strlen($string) ); //strlen of the string = 191 bytes fwrite($file_handle, $string); fclose($file_handle); -/* '\n' treated as '\r\n' i.e two chars in 'wt' mode */ var_dump( filesize($filename) ); //size of the file = 192 bytes != strlen of string clearstatcache(); @@ -44,7 +41,6 @@ echo "-- opening the file in 'a' mode, adding data and checking the file --\n"; $file_handle = fopen($filename, "a"); fwrite($file_handle, "Hello, world"); fclose($file_handle); -/* '\n' treated as '\r\n' i.e two chars in 'wt' mode */ var_dump( filesize($filename) ); //204 bytes clearstatcache(); @@ -52,7 +48,6 @@ echo "-- opening the file in 'at' mode, adding data and checking the file --\n"; $file_handle = fopen($filename, "at"); fwrite($file_handle, "Hello, world\n"); fclose($file_handle); -/* '\n' treated as '\r\n' i.e two chars in 'wt' mode */ var_dump( filesize($filename) ); //218 bytes clearstatcache(); diff --git a/ext/standard/tests/file/filesize_variation4.phpt b/ext/standard/tests/file/filesize_variation4.phpt index 9d4330cbbe..29f85fc243 100644 --- a/ext/standard/tests/file/filesize_variation4.phpt +++ b/ext/standard/tests/file/filesize_variation4.phpt @@ -73,7 +73,7 @@ var_dump( filesize($filename) ); //0 bytes clearstatcache(); echo "-- with empty file --\n"; -$filename= dirname(__FILE__)."/filesize_variation4_empty.tmp"; +$filename = dirname(__FILE__)."/filesize_variation4_empty.tmp"; fclose( fopen($filename, "w") ); var_dump( filesize($filename) ); //0 bytes diff --git a/ext/standard/tests/file/filetype_error.phpt b/ext/standard/tests/file/filetype_error.phpt index 9b4d71fffe..b965272011 100644 --- a/ext/standard/tests/file/filetype_error.phpt +++ b/ext/standard/tests/file/filetype_error.phpt @@ -8,7 +8,7 @@ Description: Returns the type of the file. Possible values are fifo, char, dir, block, link, file, and unknown. */ -echo "\n*** Testing error conditions ***"; +echo "*** Testing error conditions ***"; /* non-existing file or dir */ print( filetype("/no/such/file/dir") ); @@ -32,8 +32,8 @@ Warning: filetype(): Lstat failed for string in %s on line %d Warning: filetype(): Lstat failed for 100 in %s on line %d -Warning: Wrong parameter count for filetype() in %s on line %d +Warning: filetype() expects exactly 1 parameter, 0 given in %s on line %d -Warning: Wrong parameter count for filetype() in %s on line %d +Warning: filetype() expects exactly 1 parameter, 2 given in %s on line %d *** Done *** diff --git a/ext/standard/tests/file/flock_variation.phpt b/ext/standard/tests/file/flock_variation.phpt index d34f78f7f2..af67ab402a 100644 --- a/ext/standard/tests/file/flock_variation.phpt +++ b/ext/standard/tests/file/flock_variation.phpt @@ -40,6 +40,9 @@ $wouldblocks = array( array(), "string", "", + /* binary input */ + b"string", + b"", "\0" ); @@ -90,6 +93,10 @@ bool(true) 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 -- @@ -116,6 +123,10 @@ bool(true) 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 -- @@ -142,6 +153,10 @@ bool(true) 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 -- @@ -168,6 +183,10 @@ bool(true) 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 -- @@ -194,6 +213,10 @@ bool(true) 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 -- @@ -220,6 +243,10 @@ bool(true) 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 -- @@ -246,6 +273,10 @@ bool(true) 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 -- @@ -272,6 +303,10 @@ bool(true) 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 -- @@ -298,6 +333,10 @@ bool(true) 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 -- @@ -324,5 +363,9 @@ bool(true) bool(true) -- Inner iteration 11 in 9 -- bool(true) +-- Inner iteration 12 in 9 -- +bool(true) +-- Inner iteration 13 in 9 -- +bool(true) *** Done *** diff --git a/ext/standard/tests/file/fnmatch_error.phpt b/ext/standard/tests/file/fnmatch_error.phpt index 4e27bb41ad..9876133169 100644 --- a/ext/standard/tests/file/fnmatch_error.phpt +++ b/ext/standard/tests/file/fnmatch_error.phpt @@ -2,7 +2,7 @@ Test fnmatch() function: Error conditions --SKIPIF-- --FILE-- @@ -36,22 +36,22 @@ echo "\n*** Done ***\n"; ?> --EXPECTF-- *** Testing error conditions for fnmatch() *** -Warning: fnmatch() expects parameter 1 to be string, array given in %s on line %d +Warning: fnmatch() expects parameter 1 to be string, array given in %s on line %d%d NULL -Warning: fnmatch() expects parameter 1 to be string, resource given in %s on line %d +Warning: fnmatch() expects parameter 1 to be string, resource given in %s on line %d%d NULL -Warning: fnmatch() expects parameter 1 to be string, object given in %s on line %d +Warning: fnmatch() expects parameter 1 to be string, object given in %s on line %d%d NULL -Warning: fnmatch() expects at least 2 parameters, 1 given in %s on line %d +Warning: fnmatch() expects at least 2 parameters, 1 given in %s on line %d%d NULL -Warning: fnmatch() expects at least 2 parameters, 1 given in %s on line %d +Warning: fnmatch() expects at least 2 parameters, 1 given in %s on line %d%d NULL -Warning: fnmatch() expects at most 3 parameters, 4 given in %s on line %d +Warning: fnmatch() expects at most 3 parameters, 4 given in %s on line %d%d NULL *** Done *** diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index 03e8de72e8..c2d9932dd3 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -2,7 +2,7 @@ Test fnmatch() function: Variations --SKIPIF-- --FILE-- @@ -49,7 +49,14 @@ $pattern_arr = array( 28 => chr(109).chr(97).chr(116).chr(99).chr(104).".".chr(116).chr(120).chr(116), 29 => "MATCH.TMP", 30 => "MATCH*", -31 => $file_name +31 => $file_name, + +/* binary inputs */ +32 => b"match*", +33 => b"*.tmp", +34 => b"mat*", +35 => b"mat*tmp", +36 => b"m*t", ); for( $i = 0; $i @@ -734,3 +710,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation12.phpt b/ext/standard/tests/file/fscanf_variation12.phpt index 99fd6d2faa..33bfb67db0 100644 --- a/ext/standard/tests/file/fscanf_variation12.phpt +++ b/ext/standard/tests/file/fscanf_variation12.phpt @@ -48,8 +48,8 @@ $counter = 1; // writing to the file foreach($strings as $string) { - fprintf($file_handle, $string); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $string); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -943,3 +943,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation13.phpt b/ext/standard/tests/file/fscanf_variation13.phpt index 354fe40002..49525b484c 100644 --- a/ext/standard/tests/file/fscanf_variation13.phpt +++ b/ext/standard/tests/file/fscanf_variation13.phpt @@ -34,8 +34,8 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - fprintf($file_handle, $value); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $value); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -243,3 +243,4 @@ NULL bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation14.phpt b/ext/standard/tests/file/fscanf_variation14.phpt index 2f2ec4f399..2b497c9f5b 100644 --- a/ext/standard/tests/file/fscanf_variation14.phpt +++ b/ext/standard/tests/file/fscanf_variation14.phpt @@ -1076,3 +1076,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation15.phpt b/ext/standard/tests/file/fscanf_variation15.phpt index d925a9d1e5..76422dbc8c 100644 --- a/ext/standard/tests/file/fscanf_variation15.phpt +++ b/ext/standard/tests/file/fscanf_variation15.phpt @@ -860,3 +860,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation16.phpt b/ext/standard/tests/file/fscanf_variation16.phpt index 1312c18de7..fb2fd0cd41 100644 --- a/ext/standard/tests/file/fscanf_variation16.phpt +++ b/ext/standard/tests/file/fscanf_variation16.phpt @@ -218,3 +218,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation17.phpt b/ext/standard/tests/file/fscanf_variation17.phpt index f300e3c019..2db8871c2b 100644 --- a/ext/standard/tests/file/fscanf_variation17.phpt +++ b/ext/standard/tests/file/fscanf_variation17.phpt @@ -709,3 +709,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation18.phpt b/ext/standard/tests/file/fscanf_variation18.phpt index be0f210b83..71b72984b8 100644 --- a/ext/standard/tests/file/fscanf_variation18.phpt +++ b/ext/standard/tests/file/fscanf_variation18.phpt @@ -1011,3 +1011,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation19.phpt b/ext/standard/tests/file/fscanf_variation19.phpt index 85b7d76779..08edc522b4 100644 --- a/ext/standard/tests/file/fscanf_variation19.phpt +++ b/ext/standard/tests/file/fscanf_variation19.phpt @@ -247,3 +247,4 @@ NULL bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation2.phpt b/ext/standard/tests/file/fscanf_variation2.phpt index 64161556e8..77ae474ccc 100644 --- a/ext/standard/tests/file/fscanf_variation2.phpt +++ b/ext/standard/tests/file/fscanf_variation2.phpt @@ -48,8 +48,8 @@ $counter = 1; // writing to the file foreach($valid_ints as $int_value) { - fprintf($file_handle, $int_value); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $int_value); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -1005,3 +1005,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation20.phpt b/ext/standard/tests/file/fscanf_variation20.phpt index cbd7fbefd3..7ce609c680 100644 --- a/ext/standard/tests/file/fscanf_variation20.phpt +++ b/ext/standard/tests/file/fscanf_variation20.phpt @@ -1009,3 +1009,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation21.phpt b/ext/standard/tests/file/fscanf_variation21.phpt index a8eedd6bc9..51381ce479 100644 --- a/ext/standard/tests/file/fscanf_variation21.phpt +++ b/ext/standard/tests/file/fscanf_variation21.phpt @@ -860,3 +860,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation22.phpt b/ext/standard/tests/file/fscanf_variation22.phpt index d43226a4f3..4c551befc5 100644 --- a/ext/standard/tests/file/fscanf_variation22.phpt +++ b/ext/standard/tests/file/fscanf_variation22.phpt @@ -218,3 +218,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation23.phpt b/ext/standard/tests/file/fscanf_variation23.phpt index 86298ce85f..d536c28fde 100644 --- a/ext/standard/tests/file/fscanf_variation23.phpt +++ b/ext/standard/tests/file/fscanf_variation23.phpt @@ -709,3 +709,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation24.phpt b/ext/standard/tests/file/fscanf_variation24.phpt index 6474ce8e5e..ddca007ccf 100644 --- a/ext/standard/tests/file/fscanf_variation24.phpt +++ b/ext/standard/tests/file/fscanf_variation24.phpt @@ -991,3 +991,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation25.phpt b/ext/standard/tests/file/fscanf_variation25.phpt index 3a4a098af7..d874aba45e 100644 --- a/ext/standard/tests/file/fscanf_variation25.phpt +++ b/ext/standard/tests/file/fscanf_variation25.phpt @@ -291,3 +291,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation26.phpt b/ext/standard/tests/file/fscanf_variation26.phpt index 1741a2684e..1a883f479b 100644 --- a/ext/standard/tests/file/fscanf_variation26.phpt +++ b/ext/standard/tests/file/fscanf_variation26.phpt @@ -353,3 +353,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation27.phpt b/ext/standard/tests/file/fscanf_variation27.phpt index e3350758ad..7a691fcc60 100644 --- a/ext/standard/tests/file/fscanf_variation27.phpt +++ b/ext/standard/tests/file/fscanf_variation27.phpt @@ -1010,3 +1010,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation28.phpt b/ext/standard/tests/file/fscanf_variation28.phpt index 6cb0dc6ba3..97f72089fe 100644 --- a/ext/standard/tests/file/fscanf_variation28.phpt +++ b/ext/standard/tests/file/fscanf_variation28.phpt @@ -41,7 +41,7 @@ $float_values = array ( ); $octal_formats = array( "%o", - "%ho", "%lo", "%Lo", + "%ho", "%lo", "%Lo", " %o", "%o ", "% o", "\t%o", "\n%o", "%4o", "%30o", "%[0-7]", "%*o" diff --git a/ext/standard/tests/file/fscanf_variation29.phpt b/ext/standard/tests/file/fscanf_variation29.phpt index 89f82e97d0..c5b93e5d86 100644 --- a/ext/standard/tests/file/fscanf_variation29.phpt +++ b/ext/standard/tests/file/fscanf_variation29.phpt @@ -31,12 +31,12 @@ $resource_types = array ( $dfp ); -$octal_formats = array( "%o", - "%ho", "%lo", "%Lo", - " %o", "%o ", "% o", - "\t%o", "\n%o", "%4o", - "%30o", "%[0-9]", "%*o" - ); +$octal_formats = array( "%o", + "%ho", "%lo", "%Lo", + " %o", "%o ", "% o", + "\t%o", "\n%o", "%4o", + "%30o", "%[0-7]", "%*o" + ); $counter = 1; @@ -219,3 +219,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation3.phpt b/ext/standard/tests/file/fscanf_variation3.phpt index c86869bbc1..8faff9d091 100644 --- a/ext/standard/tests/file/fscanf_variation3.phpt +++ b/ext/standard/tests/file/fscanf_variation3.phpt @@ -862,3 +862,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation30.phpt b/ext/standard/tests/file/fscanf_variation30.phpt index ab95382e8d..b4cb350ed6 100644 --- a/ext/standard/tests/file/fscanf_variation30.phpt +++ b/ext/standard/tests/file/fscanf_variation30.phpt @@ -710,3 +710,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation31.phpt b/ext/standard/tests/file/fscanf_variation31.phpt index ab14f52e0b..f6bc7465f5 100644 --- a/ext/standard/tests/file/fscanf_variation31.phpt +++ b/ext/standard/tests/file/fscanf_variation31.phpt @@ -943,3 +943,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation32.phpt b/ext/standard/tests/file/fscanf_variation32.phpt index ba92c62525..52e45405d0 100644 --- a/ext/standard/tests/file/fscanf_variation32.phpt +++ b/ext/standard/tests/file/fscanf_variation32.phpt @@ -248,3 +248,4 @@ NULL bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation33.phpt b/ext/standard/tests/file/fscanf_variation33.phpt index 6c788b13f7..7ecff33fb9 100644 --- a/ext/standard/tests/file/fscanf_variation33.phpt +++ b/ext/standard/tests/file/fscanf_variation33.phpt @@ -1016,3 +1016,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation34.phpt b/ext/standard/tests/file/fscanf_variation34.phpt index b3f9c72f07..2acdc8ba1b 100644 --- a/ext/standard/tests/file/fscanf_variation34.phpt +++ b/ext/standard/tests/file/fscanf_variation34.phpt @@ -866,3 +866,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation35.phpt b/ext/standard/tests/file/fscanf_variation35.phpt index d259f12d4b..f6498128cc 100644 --- a/ext/standard/tests/file/fscanf_variation35.phpt +++ b/ext/standard/tests/file/fscanf_variation35.phpt @@ -214,3 +214,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation36.phpt b/ext/standard/tests/file/fscanf_variation36.phpt index 1e5f4e6d5c..44ff29536e 100644 --- a/ext/standard/tests/file/fscanf_variation36.phpt +++ b/ext/standard/tests/file/fscanf_variation36.phpt @@ -705,3 +705,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation37.phpt b/ext/standard/tests/file/fscanf_variation37.phpt index aa07f588af..7ab302dd39 100644 --- a/ext/standard/tests/file/fscanf_variation37.phpt +++ b/ext/standard/tests/file/fscanf_variation37.phpt @@ -943,3 +943,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation38.phpt b/ext/standard/tests/file/fscanf_variation38.phpt index 6bb868c2f9..32a7f77b42 100644 --- a/ext/standard/tests/file/fscanf_variation38.phpt +++ b/ext/standard/tests/file/fscanf_variation38.phpt @@ -243,3 +243,4 @@ NULL bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation39.phpt b/ext/standard/tests/file/fscanf_variation39.phpt index 7c11428e03..f0d406c583 100644 --- a/ext/standard/tests/file/fscanf_variation39.phpt +++ b/ext/standard/tests/file/fscanf_variation39.phpt @@ -1005,3 +1005,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation4.phpt b/ext/standard/tests/file/fscanf_variation4.phpt index 591836dffd..dff15309c0 100644 --- a/ext/standard/tests/file/fscanf_variation4.phpt +++ b/ext/standard/tests/file/fscanf_variation4.phpt @@ -38,8 +38,8 @@ $counter = 1; // writing to the file foreach($resource_types as $value) { - fprintf($file_handle, $value); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $value); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -215,3 +215,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation40.phpt b/ext/standard/tests/file/fscanf_variation40.phpt index 5d8770166a..f3a0c96a71 100644 --- a/ext/standard/tests/file/fscanf_variation40.phpt +++ b/ext/standard/tests/file/fscanf_variation40.phpt @@ -862,3 +862,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation41.phpt b/ext/standard/tests/file/fscanf_variation41.phpt index 76faf0b09e..1591471ddf 100644 --- a/ext/standard/tests/file/fscanf_variation41.phpt +++ b/ext/standard/tests/file/fscanf_variation41.phpt @@ -214,3 +214,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation42.phpt b/ext/standard/tests/file/fscanf_variation42.phpt index 1caf10cd71..978187c733 100644 --- a/ext/standard/tests/file/fscanf_variation42.phpt +++ b/ext/standard/tests/file/fscanf_variation42.phpt @@ -705,3 +705,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation43.phpt b/ext/standard/tests/file/fscanf_variation43.phpt index 1b5b758a0a..8a0052f122 100644 --- a/ext/standard/tests/file/fscanf_variation43.phpt +++ b/ext/standard/tests/file/fscanf_variation43.phpt @@ -943,3 +943,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation44.phpt b/ext/standard/tests/file/fscanf_variation44.phpt index 1f5b3bcf4b..0b30b61f20 100644 --- a/ext/standard/tests/file/fscanf_variation44.phpt +++ b/ext/standard/tests/file/fscanf_variation44.phpt @@ -243,3 +243,4 @@ NULL bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation45.phpt b/ext/standard/tests/file/fscanf_variation45.phpt index 13655cb52c..7db0cc9748 100644 --- a/ext/standard/tests/file/fscanf_variation45.phpt +++ b/ext/standard/tests/file/fscanf_variation45.phpt @@ -1005,3 +1005,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation46.phpt b/ext/standard/tests/file/fscanf_variation46.phpt index 9affb5e326..7145c8637a 100644 --- a/ext/standard/tests/file/fscanf_variation46.phpt +++ b/ext/standard/tests/file/fscanf_variation46.phpt @@ -856,3 +856,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation47.phpt b/ext/standard/tests/file/fscanf_variation47.phpt index 011169a5c3..cda93cb1a6 100644 --- a/ext/standard/tests/file/fscanf_variation47.phpt +++ b/ext/standard/tests/file/fscanf_variation47.phpt @@ -214,3 +214,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation49.phpt b/ext/standard/tests/file/fscanf_variation49.phpt index 29e1f31e5d..4e314fb7ce 100644 --- a/ext/standard/tests/file/fscanf_variation49.phpt +++ b/ext/standard/tests/file/fscanf_variation49.phpt @@ -943,3 +943,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation5.phpt b/ext/standard/tests/file/fscanf_variation5.phpt index 1e457a6786..750e604586 100644 --- a/ext/standard/tests/file/fscanf_variation5.phpt +++ b/ext/standard/tests/file/fscanf_variation5.phpt @@ -42,8 +42,8 @@ $counter = 1; // writing to the file foreach($array_types as $value) { - fprintf($file_handle, $value); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $value); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -77,30 +77,6 @@ unlink($filename); --EXPECTF-- *** Test fscanf(): different integer format types with arrays *** -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -- iteration 1 -- array(1) { [0]=> @@ -729,3 +705,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation50.phpt b/ext/standard/tests/file/fscanf_variation50.phpt index 7c4316c687..e46dbdb347 100644 --- a/ext/standard/tests/file/fscanf_variation50.phpt +++ b/ext/standard/tests/file/fscanf_variation50.phpt @@ -243,3 +243,4 @@ NULL bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation51.phpt b/ext/standard/tests/file/fscanf_variation51.phpt index f27f56f889..5b6fbe926b 100644 --- a/ext/standard/tests/file/fscanf_variation51.phpt +++ b/ext/standard/tests/file/fscanf_variation51.phpt @@ -20,7 +20,7 @@ $file_handle = fopen($filename, "w"); if($file_handle == false) exit("Error:failed to open file $filename"); //writing data to the file -fwrite($file_handle,"sample text\n"); +@fwrite($file_handle,"sample text\n"); //closing the file fclose($file_handle); @@ -148,3 +148,4 @@ bool(false) bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation52.phpt b/ext/standard/tests/file/fscanf_variation52.phpt index 5ca7653fb5..b917072922 100644 --- a/ext/standard/tests/file/fscanf_variation52.phpt +++ b/ext/standard/tests/file/fscanf_variation52.phpt @@ -173,3 +173,4 @@ bool(false) bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation53.phpt b/ext/standard/tests/file/fscanf_variation53.phpt index c9ccbff8b8..61a78be026 100644 --- a/ext/standard/tests/file/fscanf_variation53.phpt +++ b/ext/standard/tests/file/fscanf_variation53.phpt @@ -224,3 +224,4 @@ bool(false) bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation54.phpt b/ext/standard/tests/file/fscanf_variation54.phpt index 33f15c1044..0937e5b556 100644 --- a/ext/standard/tests/file/fscanf_variation54.phpt +++ b/ext/standard/tests/file/fscanf_variation54.phpt @@ -97,4 +97,5 @@ array(1) { NULL } -*** Done *** \ No newline at end of file +*** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation55.phpt b/ext/standard/tests/file/fscanf_variation55.phpt index a1ce9f3e9e..9b02d136d3 100644 --- a/ext/standard/tests/file/fscanf_variation55.phpt +++ b/ext/standard/tests/file/fscanf_variation55.phpt @@ -45,8 +45,8 @@ $counter = 1; // writing to the file foreach($valid_data as $data) { - fprintf($file_handle, $data); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $data); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -1682,3 +1682,4 @@ int(68) bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation6.phpt b/ext/standard/tests/file/fscanf_variation6.phpt index 0f2b97d6f3..74446f0851 100644 --- a/ext/standard/tests/file/fscanf_variation6.phpt +++ b/ext/standard/tests/file/fscanf_variation6.phpt @@ -48,8 +48,8 @@ $counter = 1; // writing to the file foreach($strings as $string) { - fprintf($file_handle, $string); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $string); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -943,3 +943,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation7.phpt b/ext/standard/tests/file/fscanf_variation7.phpt index d22c985904..33354e7faa 100644 --- a/ext/standard/tests/file/fscanf_variation7.phpt +++ b/ext/standard/tests/file/fscanf_variation7.phpt @@ -34,8 +34,8 @@ $counter = 1; // writing to the file foreach($bool_types as $value) { - fprintf($file_handle, $value); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $value); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -243,3 +243,4 @@ NULL bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation8.phpt b/ext/standard/tests/file/fscanf_variation8.phpt index 6212e35fe6..b1f5f4e554 100644 --- a/ext/standard/tests/file/fscanf_variation8.phpt +++ b/ext/standard/tests/file/fscanf_variation8.phpt @@ -66,8 +66,8 @@ $counter = 1; // writing to the file foreach($valid_floats as $float_value) { - fprintf($file_handle, $float_value); - fprintf($file_handle, "\n"); + @fprintf($file_handle, $float_value); + @fprintf($file_handle, "\n"); } // closing the file fclose($file_handle); @@ -1611,3 +1611,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fscanf_variation9.phpt b/ext/standard/tests/file/fscanf_variation9.phpt index 6cea00aad8..f3551f08d2 100644 --- a/ext/standard/tests/file/fscanf_variation9.phpt +++ b/ext/standard/tests/file/fscanf_variation9.phpt @@ -1012,3 +1012,4 @@ array(0) { bool(false) *** Done *** + diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt index b348a78b2b..a9a54aba14 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt @@ -450,4 +450,4 @@ int(0) int(522) bool(false) int(512) -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt index 31c6ac3b6b..18ecf9a1dd 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt @@ -2,10 +2,10 @@ Test fseek(), ftell() & rewind() functions : basic functionality - all w and x modes --SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --EXPECTF-- - *** Testing fseek(), ftell(), rewind() : whence = SEEK_CUR & all w and x modes *** -- File having data of type text_with_new_line -- @@ -482,4 +480,4 @@ int(0) int(1113) bool(false) int(512) -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt index cf5e6494f7..44519884a9 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt @@ -2,9 +2,8 @@ Test fseek(), ftell() & rewind() functions : usage variations - all w & x modes, SEEK_CUR --SKIPIF-- --FILE-- --FILE-- --FILE-- --EXPECTF-- *** Testing is_dir() error conditions *** -Warning: Wrong parameter count for is_dir() in %s on line %d +Warning: is_dir() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for is_dir() in %s on line %d +Warning: is_dir() expects exactly 1 parameter, 2 given in %s on line %d NULL bool(false) *** Done *** diff --git a/ext/standard/tests/file/is_dir_variation2.phpt b/ext/standard/tests/file/is_dir_variation2.phpt index df2464d3c2..be6338c239 100644 --- a/ext/standard/tests/file/is_dir_variation2.phpt +++ b/ext/standard/tests/file/is_dir_variation2.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* 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"; diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index c9b20420c7..9c2cdf885a 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -1,5 +1,5 @@ --TEST-- -Test is_dir() function: usage variations - invalid arguments +Test is_dir() function: usage variations - invalid arguments --FILE-- --FILE-- --FILE-- --FILE-- expected no.of args */ +/* no of args > expected */ $file_handle = fopen($file_path."/is_file_error.tmp", "w"); var_dump( is_file( $file_path."/is_file_error.tmp", $file_path."/is_file_error1.tmp") ); @@ -30,15 +30,18 @@ echo "\n*** Done ***"; --EXPECTF-- *** Testing is_file() error conditions *** -Warning: Wrong parameter count for is_file() in %s on line %d +Warning: is_file() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for is_file() in %s on line %d +Warning: is_file() expects exactly 1 parameter, 2 given in %s on line %d NULL bool(false) -bool(false) + +Warning: is_file() expects parameter 1 to be string, resource given in %s on line %d +NULL *** Done *** diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt index af7501315e..fd952fa096 100644 --- a/ext/standard/tests/file/is_file_variation3.phpt +++ b/ext/standard/tests/file/is_file_variation3.phpt @@ -1,5 +1,5 @@ --TEST-- -Test is_file() function: usage variations - invalid filenames +Test is_file() function: usage variations - invalid arguments --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --EXPECTF-- *** Testing stat() for directory after being renamed *** diff --git a/ext/standard/tests/file/lstat_stat_variation21.phpt b/ext/standard/tests/file/lstat_stat_variation21.phpt index 146509bd6f..1009c92c5a 100644 --- a/ext/standard/tests/file/lstat_stat_variation21.phpt +++ b/ext/standard/tests/file/lstat_stat_variation21.phpt @@ -54,7 +54,6 @@ echo "\n--- Done ---"; $file_path = dirname(__FILE__); unlink("$file_path/lstat_stat_variation21.tmp"); ?> - --EXPECTF-- *** Testing stat() on file by truncating it to given size *** bool(true) diff --git a/ext/standard/tests/file/lstat_stat_variation5.phpt b/ext/standard/tests/file/lstat_stat_variation5.phpt index b8f4478c83..895e606b9a 100755 --- a/ext/standard/tests/file/lstat_stat_variation5.phpt +++ b/ext/standard/tests/file/lstat_stat_variation5.phpt @@ -25,6 +25,7 @@ require "$file_path/file.inc"; /* create temp directory */ $dir_name = "$file_path/lstat_stat_variation5"; +@rmdir($dir_name); //ensure that dir doesn't exists mkdir($dir_name); // temp dir // touch a directory and check stat, there should be difference in atime diff --git a/ext/standard/tests/file/lstat_stat_variation6.phpt b/ext/standard/tests/file/lstat_stat_variation6.phpt index aff6fdc709..b7913e0b34 100755 --- a/ext/standard/tests/file/lstat_stat_variation6.phpt +++ b/ext/standard/tests/file/lstat_stat_variation6.phpt @@ -12,7 +12,7 @@ foreach( $mount_output as $out ) { if( stristr($out, "noatime") ) die('skip.. atime update is disabled, hence skip the test'); } - + ?> --FILE-- --FILE-- @@ -35,10 +35,10 @@ unlink($file_path."/popen.tmp"); --EXPECTF-- *** Testing for error conditions *** -Warning: Wrong parameter count for popen() in %s on line %d +Warning: popen() expects exactly 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for popen() in %s on line %d +Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d NULL resource(%d) of type (stream) sh: abc.txt: not found diff --git a/ext/standard/tests/file/popen_pclose_error-win32.phpt b/ext/standard/tests/file/popen_pclose_error-win32.phpt index ea160cf166..9b6944581c 100644 --- a/ext/standard/tests/file/popen_pclose_error-win32.phpt +++ b/ext/standard/tests/file/popen_pclose_error-win32.phpt @@ -36,10 +36,10 @@ unlink($file_path."/popen.tmp"); --EXPECTF-- *** Testing for error conditions *** -Warning: Wrong parameter count for popen() in %s on line %d +Warning: popen() expects exactly 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for popen() in %s on line %d +Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d NULL resource(%d) of type (stream) 'abc.txt' is not recognized as an internal or external command, diff --git a/ext/standard/tests/file/popen_pclose_error.phpt b/ext/standard/tests/file/popen_pclose_error.phpt index 3680c091ef..0d33184905 100644 --- a/ext/standard/tests/file/popen_pclose_error.phpt +++ b/ext/standard/tests/file/popen_pclose_error.phpt @@ -5,6 +5,7 @@ Test popen() and pclose function: error conditions if(substr(PHP_OS, 0, 3) == 'WIN' || strtoupper( substr(PHP_OS, 0, 3) ) == 'SUN') die("skip Not Valid for Windows & Sun Solaris"); ?> + --FILE-- / +?> --FILE-- --CLEAN-- --EXPECTF-- -*** Testing rename() : rename files across directories *** +*** Testing variations of rename() on files *** -- Iteration 1 -- bool(true) -bool(false) -bool(true) -- Iteration 2 -- bool(true) -bool(false) -bool(true) -- Iteration 3 -- bool(true) -bool(false) -bool(true) -- Iteration 4 -- -bool(true) + +Warning: rename(%s,%s): No such file or directory in %s on line %d bool(false) -bool(true) -*** Testing rename() : renaming directory across directories *** +Warning: unlink(%s): No such file or directory in %s on line %d + +*** Testing variations of rename() on directories *** -- Iteration 1 -- bool(true) -bool(false) -bool(true) -- Iteration 2 -- bool(true) -bool(false) -bool(true) -- Iteration 3 -- bool(true) +-- Iteration 4 -- + +Warning: rename(%s,%s): No such file or directory in %s on line %d bool(false) -bool(true) -*** Testing rename() by renaming a file and directory to numeric name *** -bool(true) +Warning: rmdir(%s): No such file or directory in %s on line %d +-- Iteration 5 -- + +Warning: rename(.,%s): Permission denied in %s on line %d bool(false) -bool(true) -bool(true) + +Warning: rmdir(%s): No such file or directory in %s on line %d +-- Iteration 6 -- + +Warning: rename(,%s): Permission denied in %s on line %d +bool(false) + +Warning: rmdir(%s): No such file or directory in %s on line %d +-- Iteration 7 -- + +Warning: rename(,%s): Permission denied in %s on line %d +bool(false) + +Warning: rmdir(%s): No such file or directory in %s on line %d +-- Iteration 8 -- + +Warning: rename( ,%s): File exists in %s on line %d +bool(false) + +Warning: rmdir(%s): No such file or directory in %s on line %d +-- Iteration 9 -- + +Warning: rename( ,%s): File exists in %s on line %d bool(false) + +Warning: rmdir(%s): No such file or directory in %s on line %d + +*** Testing rename() with non-existing file and directory *** + +Warning: rename(%s,%s): No such file or directory in %s on line %d +bool(false) + +Warning: rename(%s,%s): No such file or directory in %s on line %d +bool(false) + +*** Testing rename() by renaming a file and directory to numeric name *** +bool(true) bool(true) +*** Testing rename() with miscelleneous input *** + -- Renaming file to same file name -- bool(true) -- Renaming directory to same directory name -- bool(true) --- Renaming existing file to existing directory name -- +-- Renaming existing file to directory name -- Warning: rename(%s,%s): File exists in %s on line %d bool(false) --- Renaming existing directory to existing file name -- +-- Renaming existing directory to file name -- Warning: rename(%s,%s): File exists in %s on line %d bool(false) -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/file/stat_basic-win32.phpt b/ext/standard/tests/file/stat_basic-win32.phpt index 9f2e5cc256..6c467d7619 100644 --- a/ext/standard/tests/file/stat_basic-win32.phpt +++ b/ext/standard/tests/file/stat_basic-win32.phpt @@ -3,7 +3,7 @@ Test stat() function: basic functionality --SKIPIF-- --FILE-- @@ -189,3 +189,4 @@ bool(true) bool(true) ---Done--- + diff --git a/ext/standard/tests/file/stat_error-win32.phpt b/ext/standard/tests/file/stat_error-win32.phpt index fcbac5ff0b..c15ef58dd8 100644 --- a/ext/standard/tests/file/stat_error-win32.phpt +++ b/ext/standard/tests/file/stat_error-win32.phpt @@ -31,13 +31,13 @@ echo "Done\n"; --EXPECTF-- *** Testing stat() for error conditions *** -Warning: Wrong parameter count for stat() in %s on line %d +Warning: stat() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for stat() in %s on line %d +Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for stat() in %s on line %d +Warning: stat() expects exactly 1 parameter, 2 given in %s on line %d NULL Warning: stat(): stat failed for %s in %s on line %d @@ -49,8 +49,7 @@ bool(false) Warning: stat(): stat failed for 22 in %s on line %d bool(false) -Notice: Array to string conversion in %s on line %d - -Warning: stat(): stat failed for Array in %s on line %d -bool(false) +Warning: stat() expects parameter 1 to be string, array given in %s on line %d +NULL Done + diff --git a/ext/standard/tests/file/stat_variation1-win32.phpt b/ext/standard/tests/file/stat_variation1-win32.phpt index f8a8e95c5e..abbc88f945 100644 --- a/ext/standard/tests/file/stat_variation1-win32.phpt +++ b/ext/standard/tests/file/stat_variation1-win32.phpt @@ -91,3 +91,4 @@ bool(true) bool(true) *** Done *** + diff --git a/ext/standard/tests/file/stat_variation2-win32.phpt b/ext/standard/tests/file/stat_variation2-win32.phpt index 021596f4db..2bd9f80c50 100644 --- a/ext/standard/tests/file/stat_variation2-win32.phpt +++ b/ext/standard/tests/file/stat_variation2-win32.phpt @@ -62,3 +62,4 @@ bool(true) bool(true) *** Done *** + diff --git a/ext/standard/tests/file/stat_variation3-win32.phpt b/ext/standard/tests/file/stat_variation3-win32.phpt index 4269aa49a3..e248116486 100644 --- a/ext/standard/tests/file/stat_variation3-win32.phpt +++ b/ext/standard/tests/file/stat_variation3-win32.phpt @@ -57,7 +57,7 @@ var_dump( compare_self_stat($new_stat1) ); var_dump(compare_stats($new_stat, $new_stat1, $all_stat_keys, "=")); clearstatcache(); -echo "Done\n"; +echo "\n*** Done ***"; ?> --CLEAN-- @@ -75,4 +75,6 @@ bool(true) -- Testing stat() for comparing stats after the deletion of subdir and file -- bool(true) bool(true) -Done \ No newline at end of file + +*** Done *** + diff --git a/ext/standard/tests/file/stat_variation4-win32.phpt b/ext/standard/tests/file/stat_variation4-win32.phpt index 55916852ac..a0ffed285f 100644 --- a/ext/standard/tests/file/stat_variation4-win32.phpt +++ b/ext/standard/tests/file/stat_variation4-win32.phpt @@ -66,7 +66,7 @@ var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys, "=") ); // clear the stat clearstatcache(); -echo "Done\n"; +echo "\n*** Done ***"; ?> --CLEAN-- @@ -88,4 +88,6 @@ bool(true) bool(true) bool(true) bool(true) -Done + +*** Done *** + diff --git a/ext/standard/tests/file/stat_variation5-win32.phpt b/ext/standard/tests/file/stat_variation5-win32.phpt index 8de45b6331..038b9b64eb 100644 --- a/ext/standard/tests/file/stat_variation5-win32.phpt +++ b/ext/standard/tests/file/stat_variation5-win32.phpt @@ -47,7 +47,7 @@ var_dump( compare_stats($old_stat, $new_stat, $affected_members, "=") ); clearstatcache(); -echo "Done\n"; +echo "\n*** Done ***"; ?> --CLEAN-- @@ -61,4 +61,6 @@ unlink("$file_path/stat_variation5.tmp"); bool(true) bool(true) bool(true) -Done + +*** Done *** + diff --git a/ext/standard/tests/file/stat_variation6-win32.phpt b/ext/standard/tests/file/stat_variation6-win32.phpt index 18b87f7af6..3dae75b2e6 100644 --- a/ext/standard/tests/file/stat_variation6-win32.phpt +++ b/ext/standard/tests/file/stat_variation6-win32.phpt @@ -65,7 +65,7 @@ var_dump( compare_stats($old_stat, $new_stat, $affected_members, "=") ); clearstatcache(); // clear statement cache -echo "Done\n"; +echo "\n*** Done ***"; ?> --CLEAN-- @@ -87,4 +87,6 @@ bool(true) bool(true) bool(true) bool(true) -Done + +*** Done *** + diff --git a/ext/standard/tests/file/stat_variation7-win32.phpt b/ext/standard/tests/file/stat_variation7-win32.phpt index a96a72ba5b..d72305fa84 100644 --- a/ext/standard/tests/file/stat_variation7-win32.phpt +++ b/ext/standard/tests/file/stat_variation7-win32.phpt @@ -295,3 +295,4 @@ array(26) { } *** Done *** + diff --git a/ext/standard/tests/file/stat_variation8-win32.phpt b/ext/standard/tests/file/stat_variation8-win32.phpt index e682f2dab6..5c11afd02d 100644 --- a/ext/standard/tests/file/stat_variation8-win32.phpt +++ b/ext/standard/tests/file/stat_variation8-win32.phpt @@ -58,7 +58,7 @@ var_dump( compare_stats($old_stat, $new_stat, $affected_members, '!=') ); // clear the stat clearstatcache(); // clear previous size value in cache -echo "Done\n"; +echo "\n*** Done ***"; ?> --CLEAN-- @@ -72,4 +72,6 @@ bool(true) bool(true) bool(true) bool(true) -Done + +*** Done *** + diff --git a/ext/standard/tests/file/stream_get_line.phpt b/ext/standard/tests/file/stream_get_line.phpt index 2c11f00eed..89798ef95e 100644 --- a/ext/standard/tests/file/stream_get_line.phpt +++ b/ext/standard/tests/file/stream_get_line.phpt @@ -4,7 +4,7 @@ Crash inside stream_get_line(), when length=0 bar
foo"); +file_put_contents($path, b"foo
bar
foo"); $fp = fopen($path, "r"); while ($fp && !feof($fp)) { echo stream_get_line($fp, 0, "
")."\n"; diff --git a/ext/standard/tests/file/stream_rfc2397_001.phpt b/ext/standard/tests/file/stream_rfc2397_001.phpt index 23a5730923..774bb089bc 100755 --- a/ext/standard/tests/file/stream_rfc2397_001.phpt +++ b/ext/standard/tests/file/stream_rfc2397_001.phpt @@ -1,5 +1,5 @@ --TEST-- -Stream: RFC2397 +Stream: RFC2397 getting the data --FILE-- --EXPECTF-- *** Testing tempnam() error conditions *** -Warning: Wrong parameter count for tempnam() in %s on line %d +Warning: tempnam() expects exactly 2 parameters, 3 given in %s on line %d NULL -Warning: Wrong parameter count for tempnam() in %s on line %d +Warning: tempnam() expects exactly 2 parameters, 3 given in %s on line %d NULL -Warning: Wrong parameter count for tempnam() in %s on line %d +Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for tempnam() in %s on line %d +Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for tempnam() in %s on line %d +Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for tempnam() in %s on line %d +Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for tempnam() in %s on line %d +Warning: tempnam() expects exactly 2 parameters, 0 given in %s on line %d NULL +*** Done *** diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt index 08748bdc5a..aed0a066d3 100644 --- a/ext/standard/tests/file/tempnam_variation3.phpt +++ b/ext/standard/tests/file/tempnam_variation3.phpt @@ -78,9 +78,10 @@ File name is => %s File permissions are => 100600 -- Iteration 7 -- -Notice: Array to string conversion in %s on line %d -File name is => %s -File permissions are => 100600 +Warning: tempnam() expects parameter 2 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 -- Iteration 8 -- File name is => %s File permissions are => 100600 diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index b4b0035c9c..ebecd1601f 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -3,7 +3,7 @@ Test tempnam() function: usage variations - invalid/non-existing dir --SKIPIF-- --FILE-- %s File permissions are => 100600 -- Iteration 7 -- -Notice: Array to string conversion in %s on line %d -File name is => %s -File permissions are => 100600 +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 -- Iteration 8 -- File name is => %s File permissions are => 100600 diff --git a/ext/standard/tests/file/touch.phpt b/ext/standard/tests/file/touch.phpt index 504674f17d..aea68b0d44 100644 --- a/ext/standard/tests/file/touch.phpt +++ b/ext/standard/tests/file/touch.phpt @@ -31,7 +31,7 @@ var_dump(touch("/no/such/file/or/directory")); echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for touch() in %s on line %d +Warning: touch() expects at least 1 parameter, 0 given in %s on line %d NULL bool(true) int(%d) diff --git a/ext/standard/tests/file/umask_basic.phpt b/ext/standard/tests/file/umask_basic.phpt index 8534071813..7a2eb762db 100644 --- a/ext/standard/tests/file/umask_basic.phpt +++ b/ext/standard/tests/file/umask_basic.phpt @@ -2076,4 +2076,4 @@ int(510) int(510) int(511) -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt index ac167d6502..d51513978f 100644 --- a/ext/standard/tests/file/unlink_error-win32.phpt +++ b/ext/standard/tests/file/unlink_error-win32.phpt @@ -8,6 +8,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { ?> --FILE-- +--FILE-- + expected var_dump( unlink($filename, $context, true) ); -var_dump( file_exists($filename) ); +var_dump( file_exists($filename) ); // expected: true echo "\n-- Testing unlink() on invalid arguments --\n"; // invalid arguments @@ -58,7 +64,6 @@ mkdir($dirname); var_dump( unlink($dirname) ); // expected: false as unlink() does not work on dir echo "Done\n"; - ?> --CLEAN-- expected var_dump( unlink($filename, $context, true) ); -var_dump( file_exists($filename) ); +var_dump( file_exists($filename) ); // expected true echo "\n-- Testing unlink() on invalid arguments --\n"; // invalid arguments @@ -56,12 +56,14 @@ $dirname = "$file_path/unlink_error"; mkdir($dirname); // unlinking directory var_dump( unlink($dirname) ); // expected: false as unlink() does not work on dir -rmdir($dirname); -// delete temp file -unlink($filename); echo "Done\n"; ?> +--CLEAN-- + --EXPECTF-- *** Testing unlink() : error conditions *** -- Testing unlink() on unexpected no. of arguments -- @@ -98,7 +100,7 @@ bool(false) -- Testing unlink() on non-existent file -- -Warning: unlink(%s/non_existent_file.tmp): %s in %s on line %d +Warning: unlink(%s/non_existent_file.tmp): No such file or directory in %s on line %d bool(false) -- Testing unlink() on directory -- diff --git a/ext/standard/tests/file/unlink_variation1-win32.phpt b/ext/standard/tests/file/unlink_variation1-win32.phpt index 49dfb9e30b..b00e546d01 100644 --- a/ext/standard/tests/file/unlink_variation1-win32.phpt +++ b/ext/standard/tests/file/unlink_variation1-win32.phpt @@ -24,7 +24,7 @@ $dirname = "$file_path/unlink_variation1"; // temp filename used here $filename = "$dirname/unlink_variation1-win32.tmp"; -echo "*** Testing unlink() on file inside a directory ***\n"; +echo "\n*** Testing unlink() on file inside a directory ***\n"; // create temp dir mkdir($dirname); // create temp file inside $dirname diff --git a/ext/standard/tests/file/unlink_variation1.phpt b/ext/standard/tests/file/unlink_variation1.phpt index c8a5675424..c27c13dfc4 100644 --- a/ext/standard/tests/file/unlink_variation1.phpt +++ b/ext/standard/tests/file/unlink_variation1.phpt @@ -34,7 +34,7 @@ $dirname = "$file_path/unlink_variation1"; // temp filename used here $filename = "$dirname/unlink_variation1.tmp"; -echo "*** Testing unlink() on file inside a directory ***\n"; +echo "\n*** Testing unlink() on file inside a directory ***\n"; // create temp dir mkdir($dirname); // create temp file inside $dirname diff --git a/ext/standard/tests/file/unlink_variation2-win32.phpt b/ext/standard/tests/file/unlink_variation2-win32.phpt index 6a8a38a2a3..af7b381547 100644 --- a/ext/standard/tests/file/unlink_variation2-win32.phpt +++ b/ext/standard/tests/file/unlink_variation2-win32.phpt @@ -18,7 +18,7 @@ $file_path = dirname(__FILE__); echo "*** Testing unlink() on a file when file handle is open ***\n"; // temp file name used here -$filename = "$file_path/unlink_variation2.tmp"; +$filename = "$file_path/unlink_variation2-win32.tmp"; // create file $fp = fopen($filename, "w"); diff --git a/ext/standard/tests/file/unlink_variation4.phpt b/ext/standard/tests/file/unlink_variation4.phpt index 10bd38dd13..746cfd3249 100644 --- a/ext/standard/tests/file/unlink_variation4.phpt +++ b/ext/standard/tests/file/unlink_variation4.phpt @@ -6,13 +6,13 @@ Test unlink() function : usage variations - unlink deleted file Description : Deletes filename */ +/* Try deleting a file which is already deleted */ + $file_path = dirname(__FILE__); // temp file used $filename = "$file_path/unlink_variation4.tmp"; -/* Try deleting a file which is already deleted */ - echo "*** Testing unlink() on deleted file ***\n"; // create temp file $fp = fopen($filename, "w"); diff --git a/ext/standard/tests/file/userdirstream.phpt b/ext/standard/tests/file/userdirstream.phpt index d457b1988d..a83e899b83 100644 --- a/ext/standard/tests/file/userdirstream.phpt +++ b/ext/standard/tests/file/userdirstream.phpt @@ -49,4 +49,3 @@ array(4) { [3]=> string(5) "third" } - diff --git a/ext/standard/tests/file/userfilters.phpt b/ext/standard/tests/file/userfilters.phpt index dfa8376fff..2246b5d8a4 100644 --- a/ext/standard/tests/file/userfilters.phpt +++ b/ext/standard/tests/file/userfilters.phpt @@ -20,7 +20,7 @@ class testfilter extends php_user_filter { stream_filter_register('testfilter','testfilter'); -$text = "Hello There!"; +$text = b"Hello There!"; $fp = tmpfile(); fwrite($fp, $text); diff --git a/ext/standard/tests/file/userstreams.phpt b/ext/standard/tests/file/userstreams.phpt index 9b80508b3b..b5a9707e95 100644 --- a/ext/standard/tests/file/userstreams.phpt +++ b/ext/standard/tests/file/userstreams.phpt @@ -67,7 +67,7 @@ for ($i = 0; $i < 30; $i++) { /* store the data in a regular file so that we can compare * the results */ $tf = tmpfile(); -fwrite($tf, $DATA); +fwrite($tf, (binary)$DATA); $n = ftell($tf); rewind($tf) or die("failed to rewind tmp file!"); if (ftell($tf) != 0) diff --git a/ext/standard/tests/general_functions/phpcredits.phpt b/ext/standard/tests/general_functions/phpcredits.phpt index cc1a308799..69515dfe6a 100644 --- a/ext/standard/tests/general_functions/phpcredits.phpt +++ b/ext/standard/tests/general_functions/phpcredits.phpt @@ -22,7 +22,7 @@ PHP Group Language Design & Concept %a -%wPHP %d Authors%w +%wPHP Authors%w %a %wSAPI Modules%w diff --git a/ext/standard/tests/network/bug41347.phpt b/ext/standard/tests/network/bug41347.phpt index 53d4439cb7..21fc002fa5 100644 --- a/ext/standard/tests/network/bug41347.phpt +++ b/ext/standard/tests/network/bug41347.phpt @@ -9,11 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- --EXPECTF-- Warning: dns_check_record(): Host cannot be empty in %s on line %d bool(false) - -Warning: dns_check_record(): Host and type cannot be empty in %s on line %d -bool(false) diff --git a/ext/standard/tests/strings/convert_cyr_string.phpt b/ext/standard/tests/strings/convert_cyr_string.phpt index a6f3657312..0b4db2510a 100644 --- a/ext/standard/tests/strings/convert_cyr_string.phpt +++ b/ext/standard/tests/strings/convert_cyr_string.phpt @@ -9,24 +9,24 @@ var_dump(convert_cyr_string("", "")); var_dump(convert_cyr_string("", "", "")); var_dump(convert_cyr_string(array(), array(), array())); -var_dump(convert_cyr_string("[[[[[[", "q", "m")); -var_dump(convert_cyr_string("[[[[[[", "k", "w")); -var_dump(convert_cyr_string("[[[[[[", "m", "a")); -var_dump(convert_cyr_string("[[[[[[", "d", "i")); -var_dump(convert_cyr_string("[[[[[[", "w", "k")); -var_dump(convert_cyr_string("[[[[[[", "i", "q")); -var_dump(convert_cyr_string("", "d", "i")); +var_dump(convert_cyr_string((binary)"[[[[[[", "q", "m")); +var_dump(convert_cyr_string((binary)"[[[[[[", "k", "w")); +var_dump(convert_cyr_string((binary)"[[[[[[", "m", "a")); +var_dump(convert_cyr_string((binary)"[[[[[[", "d", "i")); +var_dump(convert_cyr_string((binary)"[[[[[[", "w", "k")); +var_dump(convert_cyr_string((binary)"[[[[[[", "i", "q")); +var_dump(convert_cyr_string((binary)"", "d", "i")); echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for convert_cyr_string() in %s on line %d +Warning: convert_cyr_string() expects exactly 3 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for convert_cyr_string() in %s on line %d +Warning: convert_cyr_string() expects exactly 3 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for convert_cyr_string() in %s on line %d +Warning: convert_cyr_string() expects exactly 3 parameters, 2 given in %s on line %d NULL Warning: convert_cyr_string(): Unknown source charset: in %s on line %d @@ -34,12 +34,8 @@ Warning: convert_cyr_string(): Unknown source charset: in %s on line %d Warning: convert_cyr_string(): Unknown destination charset: in %s on line %d string(0) "" -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -string(5) "Array" +Warning: convert_cyr_string() expects parameter 1 to be string, array given in %s on line %d +NULL Warning: convert_cyr_string(): Unknown source charset: q in %s on line %d string(6) "[[[[[[" -- cgit v1.2.1