Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file
Hello Tony, These test weren't run on AIX. I'll have a look at it. with Regards, Raghubansh From: Antony Dovgal [EMAIL PROTECTED] To: Raghubansh Kumar [EMAIL PROTECTED] Cc: php-cvs@lists.php.net Date: 23/08/2008 23:18 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file Hello Raghubansh. Just curious, did you happen to run these tests on AIX? One of them, specifically this one: ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt creates an interesting directory ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2 which contains a hardlink to itself and so ad infinitum. I don't even know how to delete it now since rm fails with Illegal instruction =) Any ideas? On 05.07.2007 22:53, Raghubansh Kumar wrote: kraghuba Thu Jul 5 18:53:34 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/file symlink_link_linkinfo_is_link_error1.phpt symlink_link_linkinfo_is_link_error2.phpt symlink_link_linkinfo_is_link_variation1.phpt symlink_link_linkinfo_is_link_variation2.phpt symlink_link_linkinfo_is_link_variation3.phpt symlink_link_linkinfo_is_link_variation4.phpt symlink_link_linkinfo_is_link_variation5.phpt symlink_link_linkinfo_is_link_basic1.phpt symlink_link_linkinfo_is_link_variation6.phpt symlink_link_linkinfo_is_link_basic2.phpt symlink_link_linkinfo_is_link_variation7.phpt symlink_link_linkinfo_is_link_variation8.phpt symlink_link_linkinfo_is_link_variation9.phpt Modified files: /php-src/ext/standard/tests/file filegroup_basic.phpt 006_error.phpt Log: fix test: 006_error.phpt filegroup_basic.phpt fix and smaller tests for symlink_link_linkinfo_is_link[basic|error|variation].phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filegroup_basic.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/filegroup_basic.phpt diff -u php-src/ext/standard/tests/file/filegroup_basic.phpt:1.1.2.1 php-src/ext/standard/tests/file/filegroup_basic.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/filegroup_basic.phpt:1.1.2.1 Wed Jun 13 22:38:49 2007 +++ php-src/ext/standard/tests/file/filegroup_basic.phpt Thu Jul 5 18:53:33 2007 @@ -2,8 +2,8 @@ Test filegroup() function: basic functionality --SKIPIF-- ?php -if (!function_exists(posix_getgrgid)) { - die(skip no posix_getgrgid); +if( substr(PHP_OS, 0, 3) == 'WIN') { + die('skip Not valid for Windows'); } ? --FILE-- @@ -17,7 +17,7 @@ echo -- Testing with the file or directory created by owner --\n; $file_path = dirname(__FILE__); -var_dump( posix_getgrgid( filegroup(__FILE__) ) ); +var_dump( filegroup(__FILE__) ); var_dump( filegroup(.) ); var_dump( filegroup(./..) ); @@ -55,25 +55,15 @@ --EXPECTF-- *** Testing filegroup(): basic functionality *** -- Testing with the file or directory created by owner -- -array(4) { - [name]= - string(%d) %s - [passwd]= - string(1) x - [members]= - array(0) { - } - [gid]= - int(%d) -} +int(%d) int(%d) int(%d) int(%d) int(%d) -- Testing with the standard file or directory -- -int(0) -int(0) -int(0) +int(%d) +int(%d) +int(%d) *** Done *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/006_error.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/006_error.phpt diff -u php-src/ext/standard/tests/file/006_error.phpt:1.1.2.1 php-src/ext/standard/tests/file/006_error.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/006_error.phpt:1.1.2.1 Mon Jun 11 16:14:59 2007 +++ php-src/ext/standard/tests/file/006_error.phpt Thu Jul 5 18:53:33 2007 @@ -5,9 +5,17 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } -elseif (get_current_user() == 'root') { - die( skip Do not run with root permissions ); +// Skip if being run by root +$filename = dirname(__FILE__)./006_root_check.tmp; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { +unlink ($filename); +die('skip...cannot be run as root\n'); } + +unlink($filename); + ? --FILE-- ?php @@ -60,11 +68,11 @@ --EXPECTF-- *** Testing error conditions for fileperms(), chmod() *** -Warning: chmod(): Operation not permitted in %s on line %d +Warning: chmod(): %s in %s on line %d bool(false) 100644 -Warning: chmod(): Operation not permitted in %s on line %d +Warning: chmod(): %s in %s on line %d bool(false) 40755 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt +++ php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/hash/tests hash_file_basic.phpt hash_file_error.phpt
kraghubaTue Jun 24 15:44:51 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/hash/tests hash_file_error.phpt hash_file_basic.phpt Log: New testcases for hash_file(), Committed for Felix De Vliegher, TestFest Task No: 75 76, Tested on RHEL5 -32bit, WinXP-32bit http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/hash_file_error.phpt?view=markuprev=1.1 Index: php-src/ext/hash/tests/hash_file_error.phpt +++ php-src/ext/hash/tests/hash_file_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/hash_file_basic.phpt?view=markuprev=1.1 Index: php-src/ext/hash/tests/hash_file_basic.phpt +++ php-src/ext/hash/tests/hash_file_basic.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/hash/tests hash_file_basic.phpt hash_file_error.phpt
kraghubaTue Jun 24 15:46:24 2008 UTC Modified files: /php-src/ext/hash/tests hash_file_basic.phpt hash_file_error.phpt Log: New testcases for hash_file(), Committed for Felix De Vliegher, TestFest Task No: 75 76, Tested on RHEL5 -32bit, WinXP-32bit http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/hash_file_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/hash/tests/hash_file_basic.phpt diff -u /dev/null php-src/ext/hash/tests/hash_file_basic.phpt:1.2 --- /dev/null Tue Jun 24 15:46:24 2008 +++ php-src/ext/hash/tests/hash_file_basic.phpt Tue Jun 24 15:46:24 2008 @@ -0,0 +1,44 @@ +--TEST-- +Test hash_file() function : basic functionality +--SKIPIF-- +?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ? +--CREDITS-- +Felix De Vliegher [EMAIL PROTECTED] +--FILE-- +?php +/* Prototype : string hash_file(string algo, string filename[, bool raw_output = false]) + * Description: Generate a hash of a given file + * Source code: ext/hash/hash.c + * Alias to functions: + */ + +echo *** Testing hash_file() : basic functionality ***\n; + +// Set up file +$filename = 'hash_file_example.txt'; +file_put_contents( $filename, 'The quick brown fox jumped over the lazy dog.' ); + +var_dump( hash_file( 'md5', $filename ) ); +var_dump( hash_file( 'sha1', $filename ) ); +var_dump( hash_file( 'sha256', $filename ) ); +var_dump( hash_file( 'sha512', $filename ) ); + +var_dump( base64_encode( hash_file( 'md5', $filename, true ) ) ); + +? +===DONE=== +--CLEAN-- +?php + +$filename = 'hash_file_example.txt'; +unlink( $filename ); + +? +--EXPECTF-- +*** Testing hash_file() : basic functionality *** +unicode(32) 5c6ffbdd40d9556b73a21e63c3e0e904 +unicode(40) c0854fb9fb03c41cce3802cb0d220529e6eef94e +unicode(64) 68b1282b91de2c054c36629cb8dd447f12f096d3e3c587978dc2248444633483 +unicode(128) 0a8c150176c2ba391d7f1670ef4955cd99d3c3ec8cf06198cec30d436f2ac0c9b64229b5a54bdbd5563160503ce992a74be528761da9d0c48b7c74627302eb25 +string(24) XG/73UDZVWtzoh5jw+DpBA== +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/hash/tests/hash_file_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/hash/tests/hash_file_error.phpt diff -u /dev/null php-src/ext/hash/tests/hash_file_error.phpt:1.2 --- /dev/null Tue Jun 24 15:46:24 2008 +++ php-src/ext/hash/tests/hash_file_error.phpt Tue Jun 24 15:46:24 2008 @@ -0,0 +1,67 @@ +--TEST-- +Test hash_file() function : error conditions +--SKIPIF-- +?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ? +--CREDITS-- +Felix De Vliegher [EMAIL PROTECTED] +--FILE-- +?php +/* Prototype : string hash_file(string algo, string filename[, bool raw_output = false]) + * Description: Generate a hash of a given file + * Source code: ext/hash/hash.c + * Alias to functions: + */ + +echo *** Testing hash_file() : error conditions ***\n; + +// Set up file +$filename = 'hash_file_example.txt'; +file_put_contents( $filename, 'The quick brown fox jumped over the lazy dog.' ); + + +// hash_file() error tests +echo \n-- Testing hash_file() function with an unknown algorithm --\n; +var_dump( hash_file( 'foobar', $filename ) ); + +echo \n-- Testing hash_file() function with a non-existant file --\n; +var_dump( hash_file( 'md5', 'nonexistant.txt' ) ); + +echo \n-- Testing hash_file() function with less than expected no. of arguments --\n; +var_dump( hash_file( 'md5' ) ); + +echo \n-- Testing hash_file() function with more than expected no. of arguments --\n; +$extra_arg = 10; +var_dump( hash_file( 'md5', $filename, false, $extra_arg ) ); + +? +===DONE=== +--CLEAN-- +?php + +$filename = 'hash_file_example.txt'; +unlink( $filename ); + +? +--EXPECTF-- +*** Testing hash_file() : error conditions *** + +-- Testing hash_file() function with an unknown algorithm -- + +Warning: hash_file(): Unknown hashing algorithm: %s in %s on line %d +bool(false) + +-- Testing hash_file() function with a non-existant file -- + +Warning: hash_file(%s): failed to open stream: No such file or directory in %s on line %d +bool(false) + +-- Testing hash_file() function with less than expected no. of arguments -- + +Warning: hash_file() expects at least 2 parameters, 1 given in %s on line %d +NULL + +-- Testing hash_file() function with more than expected no. of arguments -- + +Warning: hash_file() expects at most 3 parameters, 4 given in %s on line %d +NULL +===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings .cvsignore vfprintf_basic.phpt vfprintf_error1.phpt vfprintf_error2.phpt vfprintf_error3.phpt vfprintf_error4.phpt vfprintf_variation1.phpt
kraghubaFri Jun 20 04:21:59 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings vfprintf_error4.phpt vfprintf_variation1.phpt vfprintf_basic.phpt vfprintf_error1.phpt vfprintf_error2.phpt vfprintf_error3.phpt Modified files: /php-src/ext/standard/tests/strings .cvsignore Log: New testcases for vfprintf(), Committed for Felix De Vliegher, TestFest Task No: 124, Tested on RHEL5 -32bit, WinXP-32bit Added *.txt to .cvsignore http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/.cvsignore?r1=1.6.4.1r2=1.6.4.1.2.1diff_format=u Index: php-src/ext/standard/tests/strings/.cvsignore diff -u php-src/ext/standard/tests/strings/.cvsignore:1.6.4.1 php-src/ext/standard/tests/strings/.cvsignore:1.6.4.1.2.1 --- php-src/ext/standard/tests/strings/.cvsignore:1.6.4.1 Sun Jan 21 13:05:29 2007 +++ php-src/ext/standard/tests/strings/.cvsignore Fri Jun 20 04:21:58 2008 @@ -7,3 +7,4 @@ *.php *.gcda *.gcno +*.txt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vfprintf_error4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vfprintf_error4.phpt +++ php-src/ext/standard/tests/strings/vfprintf_error4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vfprintf_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vfprintf_variation1.phpt +++ php-src/ext/standard/tests/strings/vfprintf_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vfprintf_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vfprintf_basic.phpt +++ php-src/ext/standard/tests/strings/vfprintf_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vfprintf_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vfprintf_error1.phpt +++ php-src/ext/standard/tests/strings/vfprintf_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vfprintf_error2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vfprintf_error2.phpt +++ php-src/ext/standard/tests/strings/vfprintf_error2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vfprintf_error3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vfprintf_error3.phpt +++ php-src/ext/standard/tests/strings/vfprintf_error3.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests date_add_basic.phpt
kraghubaTue Jun 17 13:14:20 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests date_add_basic.phpt Log: Committed for Felix De Vliegher, TestFest Task No: 122, Tested on RHEL5, WinXP http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_add_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/date_add_basic.phpt +++ php-src/ext/date/tests/date_add_basic.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests date_sub_basic.phpt
kraghubaTue Jun 17 13:14:45 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests date_sub_basic.phpt Log: Committed for Felix De Vliegher, TestFest Task No: 123, Tested on RHEL5, WinXP http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sub_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/date_sub_basic.phpt +++ php-src/ext/date/tests/date_sub_basic.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/tests date_add_basic.phpt
kraghubaTue Jun 17 13:17:15 2008 UTC Modified files: /php-src/ext/date/tests date_add_basic.phpt Log: Committed for Felix De Vliegher, TestFest Task No: 122, Tested on RHEL5, WinXP http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_add_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/date_add_basic.phpt diff -u /dev/null php-src/ext/date/tests/date_add_basic.phpt:1.2 --- /dev/null Tue Jun 17 13:17:15 2008 +++ php-src/ext/date/tests/date_add_basic.phpt Tue Jun 17 13:17:15 2008 @@ -0,0 +1,46 @@ +--TEST-- +Test date_add() function : basic functionality +--CREDITS-- +Felix De Vliegher [EMAIL PROTECTED] +--SKIPIF-- +?php if (!function_exists('date_add')) echo skip: date_add() function not found!; ? +--INI-- +date.timezone=UTC +--FILE-- +?php +/* Prototype : void date_add(DateTime object, DateInterval interval) + * Description: Adds an interval to the current date in object. + * Source code: ext/date/php_date.c + * Alias to functions: + */ + +echo *** Testing date_add() : basic functionality ***\n; + +// Initialise all required variables +$startDate = '2008-01-01 12:25'; +$format = 'Y-m-d H:i:s'; +$intervals = array( + 'P3Y6M4DT12H30M5S', + 'P0D', + 'P2DT1M', + 'P1Y2MT23H43M150S' +); + +$d = new DateTime($startDate); +var_dump( $d-format($format) ); + +foreach($intervals as $interval) { + date_add($d, new DateInterval($interval) ); + var_dump( $d-format($format) ); +} + +? +===DONE=== +--EXPECTF-- +*** Testing date_add() : basic functionality *** +unicode(19) 2008-01-01 12:25:00 +unicode(19) 2011-07-06 00:55:05 +unicode(19) 2011-07-06 00:55:05 +unicode(19) 2011-07-08 00:56:05 +unicode(19) 2012-09-09 00:41:35 +===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date/tests date_sub_basic.phpt
kraghubaTue Jun 17 13:18:09 2008 UTC Modified files: /php-src/ext/date/tests date_sub_basic.phpt Log: Committed for Felix De Vliegher, TestFest Task No: 123, Tested on RHEL5-32bit, WinXP http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sub_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/date_sub_basic.phpt diff -u /dev/null php-src/ext/date/tests/date_sub_basic.phpt:1.2 --- /dev/null Tue Jun 17 13:18:09 2008 +++ php-src/ext/date/tests/date_sub_basic.phpt Tue Jun 17 13:18:08 2008 @@ -0,0 +1,46 @@ +--TEST-- +Test date_sub() function : basic functionality +--CREDITS-- +Felix De Vliegher [EMAIL PROTECTED] +--SKIPIF-- +?php if (!function_exists('date_sub')) echo skip: date_sub() function not found!; ? +--INI-- +date.timezone=UTC +--FILE-- +?php +/* Prototype : void date_sub(DateTime object, DateInterval interval) + * Description: Subtracts an interval from the current date in object. + * Source code: ext/date/php_date.c + * Alias to functions: + */ + +echo *** Testing date_sub() : basic functionality ***\n; + +// Initialise all required variables +$startDate = '2008-01-01 12:25'; +$format = 'Y-m-d H:i:s'; +$intervals = array( + 'P3Y6M4DT12H30M5S', + 'P0D', + 'P2DT1M', + 'P1Y2MT23H43M150S' +); + +$d = new DateTime($startDate); +var_dump( $d-format($format) ); + +foreach($intervals as $interval) { + date_sub($d, new DateInterval($interval) ); + var_dump( $d-format($format) ); +} + +? +===DONE=== +--EXPECTF-- +*** Testing date_sub() : basic functionality *** +unicode(19) 2008-01-01 12:25:00 +unicode(19) 2004-06-26 23:54:55 +unicode(19) 2004-06-26 23:54:55 +unicode(19) 2004-06-24 23:53:55 +unicode(19) 2003-04-24 00:08:25 +===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_diff_assoc_basic.phpt array_diff_assoc_error.phpt array_diff_assoc_variation1.phpt array_diff_assoc_variation10.phpt array_diff_assoc_va
kraghubaFri Jan 4 14:03:57 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_diff_assoc_variation4.phpt array_diff_assoc_variation7.phpt array_diff_assoc_error.phpt array_diff_assoc_variation5.phpt array_diff_assoc_variation2.phpt array_diff_assoc_variation10.phpt array_diff_assoc_variation6.phpt array_diff_assoc_variation9.phpt array_diff_assoc_variation1.phpt array_diff_assoc_variation8.phpt array_diff_assoc_variation3.phpt array_diff_assoc_basic.phpt Log: New testcases for array_diff_assoc() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_assoc_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_diff_assoc_variation4.phpt +++ php-src/ext/standard/tests/array/array_diff_assoc_variation4.phpt --TEST-- Test array_diff_assoc() function : usage variations - arrays with different data types as keys --FILE-- ?php /* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...]) * Description: Returns the entries of arr1 that have values which are not present * in any of the others arguments but do additional checks whether the keys are equal * Source code: ext/standard/array.c */ /* * Test how array_diff_assoc() compares arrays containing different data types * as keys */ echo \n*** Testing array_diff_assoc() : usage variations ***\n; $array = array(1, 2, 3); //get an unset variable $unset_var = 10; unset ($unset_var); // heredoc string $heredoc = EOT hello world EOT; //Different data types as keys to be passed to $arr1 argument $inputs = array( // int data /*1*/ 'int' = array( 0 = 'zero', 1 = 'one', 12345 = 'positive', -2345 = 'negative'), // float data /*2*/ 'float' = array( 10.5 = 'float 1', -10.5 = 'float 2', .5 = 'float 3'), // null data /*3*/ 'null' = array( NULL = 'null 1', null = 'null 2'), // boolean data /*4*/ 'bool' = array( true = 'boolt', false = 'boolf', TRUE = 'boolT', FALSE = 'boolF'), // empty data /*5*/ 'empty' = array( = 'emptyd', '' = 'emptys'), // string data /*6*/ 'string' = array( string = 'stringd', 'string' = 'strings', $heredoc = 'stringh'), // binary data /*7*/ 'binary' = array( bbinary1 = 'binary 1', (binary)binary2 = 'binary 2'), // undefined data /*8*/ 'undefined' = array( @$undefined_var = 'undefined'), // unset data /*9*/ 'unset' = array( @$unset_var = 'unset'), ); // loop through each element of $inputs to check the behavior of array_diff_assoc $iterator = 1; foreach($inputs as $key = $input) { echo \n-- Iteration $iterator --\n; var_dump( array_diff_assoc($input, $array)); $iterator++; }; echo Done; ? --EXPECTF-- *** Testing array_diff_assoc() : usage variations *** -- Iteration 1 -- array(4) { [0]= string(4) zero [1]= string(3) one [12345]= string(8) positive [-2345]= string(8) negative } -- Iteration 2 -- array(3) { [10]= string(7) float 1 [-10]= string(7) float 2 [0]= string(7) float 3 } -- Iteration 3 -- array(1) { []= string(6) null 2 } -- Iteration 4 -- array(2) { [1]= string(5) boolT [0]= string(5) boolF } -- Iteration 5 -- array(1) { []= string(6) emptys } -- Iteration 6 -- array(2) { [string]= string(7) strings [hello world]= string(7) stringh } -- Iteration 7 -- array(2) { [binary1]= string(8) binary 1 [binary2]= string(8) binary 2 } -- Iteration 8 -- array(1) { []= string(9) undefined } -- Iteration 9 -- array(1) { []= string(5) unset } Done --UEXPECTF-- *** Testing array_diff_assoc() : usage variations *** -- Iteration 1 -- array(4) { [0]= unicode(4) zero [1]= unicode(3) one [12345]= unicode(8) positive [-2345]= unicode(8) negative } -- Iteration 2 -- array(3) { [10]= unicode(7) float 1 [-10]= unicode(7) float 2 [0]= unicode(7) float 3 } -- Iteration 3 -- array(1) { [u]= unicode(6) null 2 } -- Iteration 4 -- array(2) { [1]= unicode(5) boolT [0]= unicode(5) boolF } -- Iteration 5 -- array(1) { [u]= unicode(6) emptys } -- Iteration 6 -- array(2) { [ustring]= unicode(7) strings [uhello world]= unicode(7) stringh } -- Iteration 7 -- array(2) { [binary1]= unicode(8) binary 1 [binary2]= unicode(8) binary 2 } -- Iteration 8 -- array(1) { [u]=
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_diff_basic.phpt array_diff_error.phpt array_diff_variation1.phpt array_diff_variation10.phpt array_diff_variation2.phpt array_diff_variation3.php
kraghubaFri Jan 4 13:59:19 2008 UTC Added files: /php-src/ext/standard/tests/array array_diff_basic.phpt array_diff_variation7.phpt array_diff_variation1.phpt array_diff_variation2.phpt array_diff_variation10.phpt array_diff_variation4.phpt array_diff_variation6.phpt array_diff_error.phpt array_diff_variation9.phpt array_diff_variation3.phpt array_diff_variation8.phpt array_diff_variation5.phpt Log: New testcases for array_diff() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_diff_basic.phpt +++ php-src/ext/standard/tests/array/array_diff_basic.phpt --TEST-- Test array_diff() function : basic functionality --FILE-- ?php /* Prototype : array array_diff(array $arr1, array $arr2 [, array ...]) * Description: Returns the entries of $arr1 that have values which are not present * in any of the others arguments. * Source code: ext/standard/array.c */ /* * Test basic functionality of array_diff */ echo *** Testing array_diff() : basic functionality ***\n; //Test indexed array with integers as elements $array_int1 = array (1, 2, 3, 4); $array_int2 = array (3, 4, 5, 6); echo -- Test indexed array with integers as elements --\n; var_dump(array_diff($array_int1, $array_int2)); var_dump(array_diff($array_int2, $array_int1)); //Test indexed array with strings as elements $array_string1 = array ('one', 'two', 'three', 'four'); $array_string2 = array ('three', 'four', 'five', 'six'); echo -- Test indexed array with strings as elements --\n; var_dump(array_diff($array_string1, $array_string2)); var_dump(array_diff($array_string2, $array_string1)); //Test associative array with strings as keys and integers as elements $array_assoc_int1 = array ('one' = 1, 'two' = 2, 'three' = 3, 'four' = 4); $array_assoc_int2 = array ('three' = 3, 'four' = 4, 'five' = 5, 'six' = 6); echo -- Test associative array with strings as keys and integers as elements --\n; var_dump(array_diff($array_assoc_int1, $array_assoc_int2)); var_dump(array_diff($array_assoc_int2, $array_assoc_int1)); //Test associative array with strings as keys and elements $array_assoc_str1 = array ('one' = 'un', 'two' = 'deux', 'three' = 'trois', 'four' = 'quatre'); $array_assoc_str2 = array ('three' = 'trois', 'four' = 'quatre', 'five' = 'cinq', 'six' = 'six'); echo -- Test associative array with strings as keys and integers as elements --\n; var_dump(array_diff($array_assoc_str1, $array_assoc_str2)); var_dump(array_diff($array_assoc_str2, $array_assoc_str1)); echo -- Test array_diff with more than 2 arguments --\n; var_dump(array_diff($array_int1, $array_int2, $array_string1, $array_string2)); echo Done; ? --EXPECTF-- *** Testing array_diff() : basic functionality *** -- Test indexed array with integers as elements -- array(2) { [0]= int(1) [1]= int(2) } array(2) { [2]= int(5) [3]= int(6) } -- Test indexed array with strings as elements -- array(2) { [0]= string(3) one [1]= string(3) two } array(2) { [2]= string(4) five [3]= string(3) six } -- Test associative array with strings as keys and integers as elements -- array(2) { [one]= int(1) [two]= int(2) } array(2) { [five]= int(5) [six]= int(6) } -- Test associative array with strings as keys and integers as elements -- array(2) { [one]= string(2) un [two]= string(4) deux } array(2) { [five]= string(4) cinq [six]= string(3) six } -- Test array_diff with more than 2 arguments -- array(2) { [0]= int(1) [1]= int(2) } Done --UEXPECTF-- *** Testing array_diff() : basic functionality *** -- Test indexed array with integers as elements -- array(2) { [0]= int(1) [1]= int(2) } array(2) { [2]= int(5) [3]= int(6) } -- Test indexed array with strings as elements -- array(2) { [0]= unicode(3) one [1]= unicode(3) two } array(2) { [2]= unicode(4) five [3]= unicode(3) six } -- Test associative array with strings as keys and integers as elements -- array(2) { [uone]= int(1) [utwo]= int(2) } array(2) { [ufive]= int(5) [usix]= int(6) } -- Test associative array with strings as keys and integers as elements -- array(2) { [uone]= unicode(2) un [utwo]= unicode(4) deux } array(2) { [ufive]= unicode(4) cinq [usix]= unicode(3) six } -- Test array_diff with more than 2 arguments -- array(2) { [0]= int(1) [1]= int(2) } Done
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_diff_basic.phpt array_diff_error.phpt array_diff_variation1.phpt array_diff_variation10.phpt array_diff_variation2.phpt array_diff_varia
kraghubaFri Jan 4 14:02:28 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_diff_variation10.phpt array_diff_variation5.phpt array_diff_variation1.phpt array_diff_variation9.phpt array_diff_variation8.phpt array_diff_variation3.phpt array_diff_basic.phpt array_diff_variation2.phpt array_diff_error.phpt array_diff_variation7.phpt array_diff_variation6.phpt array_diff_variation4.phpt Log: New testcases for array_diff() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_diff_variation10.phpt +++ php-src/ext/standard/tests/array/array_diff_variation10.phpt --TEST-- Test array_diff() function : usage variations - binary safe checking --FILE-- ?php /* Prototype : array array_diff(array $arr1, array $arr2 [, array ...]) * Description: Returns the entries of $arr1 that have values which are * not present in any of the others arguments. * Source code: ext/standard/array.c */ /* * Test behaviour of array_diff() function with binary input */ echo *** Testing array_diff() : usage variations ***\n; $array1 = array( b1, bhello, world, str1 = hello, str2 = world); $array2 = array( b1 = 'hello', bworld, hello, 'test'); var_dump(array_diff($array1, $array2)); var_dump(array_diff($array2, $array1)); echo Done; ? --EXPECTF-- *** Testing array_diff() : usage variations *** array(1) { [0]= string(1) 1 } array(1) { [4]= string(4) test } Done --UEXPECTF-- *** Testing array_diff() : usage variations *** array(1) { [0]= string(1) 1 } array(1) { [4]= unicode(4) test } Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_diff_variation5.phpt +++ php-src/ext/standard/tests/array/array_diff_variation5.phpt --TEST-- Test array_diff() function : usage variations - comparing integers, float and string array values --FILE-- ?php /* Prototype : array array_diff(array $arr1, array $arr2 [, array ...]) * Description: Returns the entries of $arr1 that have values which are not * present in any of the others arguments. * Source code: ext/standard/array.c */ /* * Test how array_diff compares integers, floats and strings */ echo *** Testing array_diff() : usage variations ***\n; $arr_int = array(1, 2, 3); $arr_float = array(1.00, 2.00, 3.00); $arr_int_str = array('1', '2', '3'); $arr_float_str = array('1.00', '2.00', '3.00'); print -- Compare integers and floats: --\n; var_dump(array_diff($arr_int, $arr_float)); var_dump(array_diff($arr_float, $arr_int)); print -- Compare integers and strings containing an integers: --\n; var_dump(array_diff($arr_int, $arr_int_str)); var_dump(array_diff($arr_int_str, $arr_int)); print -- Compare integers and strings containing floats: --\n; var_dump(array_diff($arr_int, $arr_float_str)); var_dump(array_diff($arr_float_str, $arr_int)); print -- Compare floats and strings containing integers: --\n; var_dump(array_diff($arr_float, $arr_int_str)); var_dump(array_diff($arr_int_str, $arr_float)); print -- Compare floats and strings containing floats: --\n; var_dump(array_diff($arr_float, $arr_float_str)); var_dump(array_diff($arr_float_str, $arr_float)); print -- Compare strings containing integers and strings containing floats: --\n; var_dump(array_diff($arr_int_str, $arr_float_str)); var_dump(array_diff($arr_float_str, $arr_int_str)); echo Done; ? --EXPECTF-- *** Testing array_diff() : usage variations *** -- Compare integers and floats: -- array(0) { } array(0) { } -- Compare integers and strings containing an integers: -- array(0) { } array(0) { } -- Compare integers and strings containing floats: -- array(3) { [0]= int(1) [1]= int(2) [2]= int(3) } array(3) { [0]= string(4) 1.00 [1]= string(4) 2.00 [2]= string(4) 3.00 } -- Compare floats and strings containing integers: -- array(0) { } array(0) { } -- Compare floats and strings containing floats: -- array(3) { [0]= float(1) [1]= float(2) [2]= float(3) } array(3) { [0]= string(4) 1.00 [1]= string(4) 2.00 [2]= string(4) 3.00 } -- Compare strings containing integers and strings containing floats: -- array(3) { [0]= string(1) 1 [1]= string(1) 2 [2]= string(1) 3 } array(3) { [0]= string(4)
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_diff_assoc_basic.phpt array_diff_assoc_error.phpt array_diff_assoc_variation1.phpt array_diff_assoc_variation10.phpt array_diff_assoc_variation2.
kraghubaFri Jan 4 13:59:45 2008 UTC Added files: /php-src/ext/standard/tests/array array_diff_assoc_variation7.phpt array_diff_assoc_variation4.phpt array_diff_assoc_variation2.phpt array_diff_assoc_variation3.phpt array_diff_assoc_variation10.phpt array_diff_assoc_variation5.phpt array_diff_assoc_basic.phpt array_diff_assoc_variation8.phpt array_diff_assoc_variation9.phpt array_diff_assoc_variation6.phpt array_diff_assoc_variation1.phpt array_diff_assoc_error.phpt Log: New testcases for array_diff_assoc() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_assoc_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_diff_assoc_variation7.phpt +++ php-src/ext/standard/tests/array/array_diff_assoc_variation7.phpt --TEST-- Test array_diff_assoc() function : usage variations - arrays containing referenced variables --FILE-- ?php /* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...]) * Description: Returns the entries of $arr1 that have values which are not * present in any of the others arguments but do additional checks whether the keys are equal * Source code: ext/standard/array.c */ /* * Tests how array_diff_assoc compares * 1. Referenced variables * 2. Arrays that have been referenced to each other */ echo *** Testing array_diff_assoc() : usage variations ***\n; $a = 'a'; $arr1 = array('a', 'b', 'c', $a); $arr2 = array('a' = 1, 'b' = 2, 'c' = 3, $a); echo -- Results when \$a = $a: --\n; var_dump(array_diff_assoc($arr1, $arr2)); var_dump(array_diff_assoc($arr2, $arr1)); $a = 4; echo -- Results when \$a has been changed to $a: --\n; var_dump(array_diff_assoc($arr1, $arr2)); var_dump(array_diff_assoc($arr2, $arr1)); $arr2 = $arr1; echo -- Results when \$arr2 is referenced to \$arr1 --\n; var_dump(array_diff_assoc($arr1, $arr2)); var_dump(array_diff_assoc($arr2, $arr1)); $arr1 = array('zero' = 'x', 'one' = 'y', 'two' = 'z'); echo -- Results when \$arr1 is changed --\n; var_dump(array_diff_assoc($arr1, $arr2)); var_dump(array_diff_assoc($arr2, $arr1)); echo Done; ? --EXPECTF-- *** Testing array_diff_assoc() : usage variations *** -- Results when $a = a: -- array(3) { [1]= string(1) b [2]= string(1) c [3]= string(1) a } array(3) { [a]= int(1) [b]= int(2) [c]= int(3) } -- Results when $a has been changed to 4: -- array(4) { [0]= string(1) a [1]= string(1) b [2]= string(1) c [3]= string(1) a } array(4) { [a]= int(1) [b]= int(2) [c]= int(3) [0]= int(4) } -- Results when $arr2 is referenced to $arr1 -- array(0) { } array(0) { } -- Results when $arr1 is changed -- array(0) { } array(0) { } Done --UEXPECTF-- *** Testing array_diff_assoc() : usage variations *** -- Results when $a = a: -- array(3) { [1]= unicode(1) b [2]= unicode(1) c [3]= unicode(1) a } array(3) { [ua]= int(1) [ub]= int(2) [uc]= int(3) } -- Results when $a has been changed to 4: -- array(4) { [0]= unicode(1) a [1]= unicode(1) b [2]= unicode(1) c [3]= unicode(1) a } array(4) { [ua]= int(1) [ub]= int(2) [uc]= int(3) [0]= int(4) } -- Results when $arr2 is referenced to $arr1 -- array(0) { } array(0) { } -- Results when $arr1 is changed -- array(0) { } array(0) { } Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_assoc_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_diff_assoc_variation4.phpt +++ php-src/ext/standard/tests/array/array_diff_assoc_variation4.phpt --TEST-- Test array_diff_assoc() function : usage variations - arrays with different data types as keys --FILE-- ?php /* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...]) * Description: Returns the entries of arr1 that have values which are not present * in any of the others arguments but do additional checks whether the keys are equal * Source code: ext/standard/array.c */ /* * Test how array_diff_assoc() compares arrays containing different data types * as keys */ echo \n*** Testing array_diff_assoc() : usage variations ***\n; $array = array(1, 2, 3); //get an unset variable $unset_var = 10; unset ($unset_var); // heredoc string $heredoc = EOT hello world EOT; //Different data types as keys to be passed to $arr1 argument $inputs = array( // int data /*1*/ 'int' = array( 0 = 'zero', 1 = 'one', 12345 = 'positive', -2345 = 'negative'),
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_diff_basic.phpt array_diff_error.phpt array_diff_variation1.phpt array_diff_variation10.phpt array_diff_variation2.phpt array_diff_varia
kraghubaFri Jan 4 14:04:26 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_diff_basic.phpt array_diff_variation9.phpt array_diff_error.phpt array_diff_variation2.phpt array_diff_variation8.phpt array_diff_variation4.phpt array_diff_variation7.phpt array_diff_variation6.phpt array_diff_variation5.phpt array_diff_variation1.phpt array_diff_variation10.phpt array_diff_variation3.phpt Log: New testcases for array_diff() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_diff_basic.phpt +++ php-src/ext/standard/tests/array/array_diff_basic.phpt --TEST-- Test array_diff() function : basic functionality --FILE-- ?php /* Prototype : array array_diff(array $arr1, array $arr2 [, array ...]) * Description: Returns the entries of $arr1 that have values which are not present * in any of the others arguments. * Source code: ext/standard/array.c */ /* * Test basic functionality of array_diff */ echo *** Testing array_diff() : basic functionality ***\n; //Test indexed array with integers as elements $array_int1 = array (1, 2, 3, 4); $array_int2 = array (3, 4, 5, 6); echo -- Test indexed array with integers as elements --\n; var_dump(array_diff($array_int1, $array_int2)); var_dump(array_diff($array_int2, $array_int1)); //Test indexed array with strings as elements $array_string1 = array ('one', 'two', 'three', 'four'); $array_string2 = array ('three', 'four', 'five', 'six'); echo -- Test indexed array with strings as elements --\n; var_dump(array_diff($array_string1, $array_string2)); var_dump(array_diff($array_string2, $array_string1)); //Test associative array with strings as keys and integers as elements $array_assoc_int1 = array ('one' = 1, 'two' = 2, 'three' = 3, 'four' = 4); $array_assoc_int2 = array ('three' = 3, 'four' = 4, 'five' = 5, 'six' = 6); echo -- Test associative array with strings as keys and integers as elements --\n; var_dump(array_diff($array_assoc_int1, $array_assoc_int2)); var_dump(array_diff($array_assoc_int2, $array_assoc_int1)); //Test associative array with strings as keys and elements $array_assoc_str1 = array ('one' = 'un', 'two' = 'deux', 'three' = 'trois', 'four' = 'quatre'); $array_assoc_str2 = array ('three' = 'trois', 'four' = 'quatre', 'five' = 'cinq', 'six' = 'six'); echo -- Test associative array with strings as keys and integers as elements --\n; var_dump(array_diff($array_assoc_str1, $array_assoc_str2)); var_dump(array_diff($array_assoc_str2, $array_assoc_str1)); echo -- Test array_diff with more than 2 arguments --\n; var_dump(array_diff($array_int1, $array_int2, $array_string1, $array_string2)); echo Done; ? --EXPECTF-- *** Testing array_diff() : basic functionality *** -- Test indexed array with integers as elements -- array(2) { [0]= int(1) [1]= int(2) } array(2) { [2]= int(5) [3]= int(6) } -- Test indexed array with strings as elements -- array(2) { [0]= string(3) one [1]= string(3) two } array(2) { [2]= string(4) five [3]= string(3) six } -- Test associative array with strings as keys and integers as elements -- array(2) { [one]= int(1) [two]= int(2) } array(2) { [five]= int(5) [six]= int(6) } -- Test associative array with strings as keys and integers as elements -- array(2) { [one]= string(2) un [two]= string(4) deux } array(2) { [five]= string(4) cinq [six]= string(3) six } -- Test array_diff with more than 2 arguments -- array(2) { [0]= int(1) [1]= int(2) } Done --UEXPECTF-- *** Testing array_diff() : basic functionality *** -- Test indexed array with integers as elements -- array(2) { [0]= int(1) [1]= int(2) } array(2) { [2]= int(5) [3]= int(6) } -- Test indexed array with strings as elements -- array(2) { [0]= unicode(3) one [1]= unicode(3) two } array(2) { [2]= unicode(4) five [3]= unicode(3) six } -- Test associative array with strings as keys and integers as elements -- array(2) { [uone]= int(1) [utwo]= int(2) } array(2) { [ufive]= int(5) [usix]= int(6) } -- Test associative array with strings as keys and integers as elements -- array(2) { [uone]= unicode(2) un [utwo]= unicode(4) deux } array(2) { [ufive]= unicode(4) cinq [usix]= unicode(3) six } -- Test array_diff with more than 2 arguments -- array(2) { [0]= int(1) [1]= int(2) } Done
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_map.phpt
kraghubaThu Jan 3 09:38:43 2008 UTC Removed files: /php-src/ext/standard/tests/array array_map.phpt Log: this testcase has been split into many smaller testcases and committed. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_map.phpt
kraghubaThu Jan 3 09:50:05 2008 UTC Removed files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_map.phpt Log: this testcase has been split into many smaller testcases and committed. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/dir dir_variation3.phpt dir_variation7.phpt
kraghubaTue Dec 25 16:14:32 2007 UTC Modified files: /php-src/ext/standard/tests/dir dir_variation3.phpt dir_variation7.phpt Log: fix test : do not run when run as root http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation3.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/dir/dir_variation3.phpt diff -u php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1 php-src/ext/standard/tests/dir/dir_variation3.phpt:1.2 --- php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1 Mon Dec 24 05:07:47 2007 +++ php-src/ext/standard/tests/dir/dir_variation3.phpt Tue Dec 25 16:14:32 2007 @@ -5,6 +5,15 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)./dir_root_check.tmp; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { +unlink ($filename); +die('skip...cannot be run as root\n'); +} +unlink($filename); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation7.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/dir/dir_variation7.phpt diff -u php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1 php-src/ext/standard/tests/dir/dir_variation7.phpt:1.2 --- php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1 Mon Dec 24 05:07:47 2007 +++ php-src/ext/standard/tests/dir/dir_variation7.phpt Tue Dec 25 16:14:32 2007 @@ -5,6 +5,15 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)./dir_root_check.tmp; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { +unlink ($filename); +die('skip...cannot be run as root\n'); +} +unlink($filename); ? --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/dir dir_variation3.phpt dir_variation7.phpt
kraghubaTue Dec 25 16:15:34 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/dir dir_variation3.phpt dir_variation7.phpt Log: fix test : do not run when run as root http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation3.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/dir/dir_variation3.phpt diff -u php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1.2.2 php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1.2.3 --- php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1.2.2 Mon Dec 24 05:19:42 2007 +++ php-src/ext/standard/tests/dir/dir_variation3.phpt Tue Dec 25 16:15:34 2007 @@ -5,6 +5,15 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)./dir_root_check.tmp; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { +unlink ($filename); +die('skip...cannot be run as root\n'); +} +unlink($filename); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation7.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/dir/dir_variation7.phpt diff -u php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1.2.2 php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1.2.3 --- php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1.2.2 Mon Dec 24 05:19:42 2007 +++ php-src/ext/standard/tests/dir/dir_variation7.phpt Tue Dec 25 16:15:34 2007 @@ -5,6 +5,15 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)./dir_root_check.tmp; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { +unlink ($filename); +die('skip...cannot be run as root\n'); +} +unlink($filename); ? --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/dir dir_variation3.phpt dir_variation7.phpt
kraghubaTue Dec 25 16:16:32 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/dir dir_variation3.phpt dir_variation7.phpt Log: fix test : do not run when run as root http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation3.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/dir/dir_variation3.phpt diff -u php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1.4.2 php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1.4.3 --- php-src/ext/standard/tests/dir/dir_variation3.phpt:1.1.4.2 Mon Dec 24 05:21:08 2007 +++ php-src/ext/standard/tests/dir/dir_variation3.phpt Tue Dec 25 16:16:32 2007 @@ -5,6 +5,15 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)./dir_root_check.tmp; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { +unlink ($filename); +die('skip...cannot be run as root\n'); +} +unlink($filename); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation7.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/dir/dir_variation7.phpt diff -u php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1.4.2 php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1.4.3 --- php-src/ext/standard/tests/dir/dir_variation7.phpt:1.1.4.2 Mon Dec 24 05:21:08 2007 +++ php-src/ext/standard/tests/dir/dir_variation7.phpt Tue Dec 25 16:16:32 2007 @@ -5,6 +5,15 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } +// Skip if being run by root (files are always readable, writeable and executable) +$filename = dirname(__FILE__)./dir_root_check.tmp; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { +unlink ($filename); +die('skip...cannot be run as root\n'); +} +unlink($filename); ? --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / run-tests.php
kraghubaMon Dec 24 04:20:16 2007 UTC Modified files: /php-srcrun-tests.php Log: Changing the regex for %f so the it will match e-, e+ and e. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.334r2=1.335diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.334 php-src/run-tests.php:1.335 --- php-src/run-tests.php:1.334 Mon Dec 17 11:34:55 2007 +++ php-src/run-tests.php Mon Dec 24 04:20:15 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.334 2007/12/17 11:34:55 bjori Exp $ */ +/* $Id: run-tests.php,v 1.335 2007/12/24 04:20:15 kraghuba Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -415,7 +415,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.334 $'.\n; + echo '$Revision: 1.335 $'.\n; exit(1); default: echo Illegal switch specified!\n; @@ -1600,7 +1600,7 @@ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); - $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E[+-]?\d+)?', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E|e[+-]?\d+)?', $wanted_re); $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points -.0.0 but that is the best *simple* expression } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / run-tests.php
kraghubaMon Dec 24 04:23:05 2007 UTC Modified files: (Branch: PHP_5_3) /php-srcrun-tests.php Log: Changing the regex for %f so the it will match e-, e+ and e. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.35.2.7r2=1.226.2.37.2.35.2.8diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.35.2.7 php-src/run-tests.php:1.226.2.37.2.35.2.8 --- php-src/run-tests.php:1.226.2.37.2.35.2.7 Mon Dec 17 11:00:16 2007 +++ php-src/run-tests.php Mon Dec 24 04:23:04 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.35.2.7 2007/12/17 11:00:16 bjori Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.35.2.8 2007/12/24 04:23:04 kraghuba Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -408,7 +408,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.35.2.7 $'.\n; + echo '$Revision: 1.226.2.37.2.35.2.8 $'.\n; exit(1); case 'u': @@ -1537,7 +1537,7 @@ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); - $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E[+-]?\d+)?', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E|e[+-]?\d+)?', $wanted_re); $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points -.0.0 but that is the best *simple* expression } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php
kraghubaMon Dec 24 04:24:21 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcrun-tests.php Log: Changing the regex for %f so the it will match e-, e+ and e. http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.38r2=1.226.2.37.2.39diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.37.2.38 php-src/run-tests.php:1.226.2.37.2.39 --- php-src/run-tests.php:1.226.2.37.2.38 Wed Dec 12 20:21:57 2007 +++ php-src/run-tests.php Mon Dec 24 04:24:20 2007 @@ -24,7 +24,7 @@ +--+ */ -/* $Id: run-tests.php,v 1.226.2.37.2.38 2007/12/12 20:21:57 tony2001 Exp $ */ +/* $Id: run-tests.php,v 1.226.2.37.2.39 2007/12/24 04:24:20 kraghuba Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -403,7 +403,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.37.2.38 $'.\n; + echo '$Revision: 1.226.2.37.2.39 $'.\n; exit(1); case 'u': @@ -1517,7 +1517,7 @@ $wanted_re = str_replace('%i', '[+-]?\d+', $wanted_re); $wanted_re = str_replace('%d', '\d+', $wanted_re); $wanted_re = str_replace('%x', '[0-9a-fA-F]+', $wanted_re); - $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E[+-]?\d+)?', $wanted_re); + $wanted_re = str_replace('%f', '[+-]?\.?\d+\.?\d*(?:E|e[+-]?\d+)?', $wanted_re); $wanted_re = str_replace('%c', '.', $wanted_re); // %f allows two points -.0.0 but that is the best *simple* expression } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings sprintf_variation48.phpt sprintf_variation5.phpt
kraghubaMon Dec 24 04:26:41 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings sprintf_variation5.phpt sprintf_variation48.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation5.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation5.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.1.2.1 php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.1.2.1 Sat Sep 29 14:13:53 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation5.phpt Mon Dec 24 04:26:41 2007 @@ -12,11 +12,14 @@ // resource type variable $fp = fopen (__FILE__, r); $dfp = opendir ( dirname(__FILE__) ); + +$fp_copy = $fp; +$dfp_copy = $dfp; // array of resource types $resource_types = array ( - $fp, - $dfp + $fp_copy, + $dfp_copy ); // various integer formats @@ -38,7 +41,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; @@ -53,8 +56,8 @@ string(%d)%d string(%d) %d -string(%d)%d -string(4) 0-9] +string(%d) %s%d +string(%d) 0-9] string(1) d -- Iteration 2 -- @@ -64,7 +67,7 @@ string(%d)%d string(%d) %d -string(%d)%d -string(4) 0-9] +string(%d) %s%d +string(%d) 0-9] string(1) d Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation48.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation48.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.1.2.1 php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.1.2.1 Sat Sep 29 14:13:53 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation48.phpt Mon Dec 24 04:26:41 2007 @@ -39,7 +39,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; @@ -48,32 +48,32 @@ *** Testing sprintf() : scientific formats with resource values *** -- Iteration 1 -- -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +string(%d) %f +string(%d) %f +string(%d)%f string(%d) -%d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 -string(4) 0-1] +%f +string(%d) %f +string(%d) %s%f +string(%d) 0-1] string(1) e -- Iteration 2 -- -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +string(%d) %f +string(%d) %f +string(%d)%f string(%d) -%d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 -string(4) 0-1] +%f +string(%d) %f +string(%d) %s%f +string(%d) 0-1] string(1) e Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings sprintf_variation48.phpt sprintf_variation5.phpt
kraghubaMon Dec 24 04:27:55 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings sprintf_variation5.phpt sprintf_variation48.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation5.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation5.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.2.2.2 php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.2.2.3 --- php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.2.2.2 Sat Sep 29 16:54:57 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation5.phpt Mon Dec 24 04:27:55 2007 @@ -12,11 +12,14 @@ // resource type variable $fp = fopen (__FILE__, r); $dfp = opendir ( dirname(__FILE__) ); + +$fp_copy = $fp; +$dfp_copy = $dfp; // array of resource types $resource_types = array ( - $fp, - $dfp + $fp_copy, + $dfp_copy ); // various integer formats @@ -38,7 +41,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; @@ -53,8 +56,8 @@ string(%d)%d string(%d) %d -string(%d)%d -string(4) 0-9] +string(%d) %s%d +string(%d) 0-9] string(1) d -- Iteration 2 -- @@ -64,7 +67,7 @@ string(%d)%d string(%d) %d -string(%d)%d -string(4) 0-9] +string(%d) %s%d +string(%d) 0-9] string(1) d Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation48.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation48.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.2.2.2 php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.2.2.3 --- php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.2.2.2 Sat Sep 29 16:54:56 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation48.phpt Mon Dec 24 04:27:55 2007 @@ -39,7 +39,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; @@ -48,32 +48,32 @@ *** Testing sprintf() : scientific formats with resource values *** -- Iteration 1 -- -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +string(%d) %f +string(%d) %f +string(%d)%f string(%d) -%d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +%f +string(%d) %f +string(%d) %s%f string(4) 0-1] string(1) e -- Iteration 2 -- -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +string(%d) %f +string(%d) %f +string(%d)%f string(%d) -%d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +%f +string(%d) %f +string(30) %s%f string(4) 0-1] string(1) e Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/strings sprintf_variation48.phpt sprintf_variation5.phpt
kraghubaMon Dec 24 04:29:26 2007 UTC Modified files: /php-src/ext/standard/tests/strings sprintf_variation5.phpt sprintf_variation48.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation5.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation5.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.2 php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.3 --- php-src/ext/standard/tests/strings/sprintf_variation5.phpt:1.2 Sat Sep 29 14:15:53 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation5.phpt Mon Dec 24 04:29:26 2007 @@ -12,11 +12,14 @@ // resource type variable $fp = fopen (__FILE__, r); $dfp = opendir ( dirname(__FILE__) ); + +$fp_copy = $fp; +$dfp_copy = $dfp; // array of resource types $resource_types = array ( - $fp, - $dfp + $fp_copy, + $dfp_copy ); // various integer formats @@ -38,7 +41,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; @@ -53,8 +56,8 @@ string(%d)%d string(%d) %d -string(%d)%d -string(4) 0-9] +string(%d) %s%d +string(%d) 0-9] string(1) d -- Iteration 2 -- @@ -64,11 +67,10 @@ string(%d)%d string(%d) %d -string(%d)%d -string(4) 0-9] +string(%d) %s%d +string(%d) 0-9] string(1) d Done - --UEXPECTF-- *** Testing sprintf() : integer formats with resource values *** @@ -79,8 +81,8 @@ unicode(%d) %d unicode(%d) %d -unicode(%d)%d -unicode(4) 0-9] +unicode(%d) %s%d +unicode(%d) 0-9] unicode(1) d -- Iteration 2 -- @@ -90,7 +92,7 @@ unicode(%d) %d unicode(%d) %d -unicode(%d)%d -unicode(4) 0-9] +unicode(%d) %s%d +unicode(%d) 0-9] unicode(1) d Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation48.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation48.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.2 php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.3 --- php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.2 Sat Sep 29 14:15:53 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation48.phpt Mon Dec 24 04:29:26 2007 @@ -39,7 +39,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; @@ -48,66 +48,65 @@ *** Testing sprintf() : scientific formats with resource values *** -- Iteration 1 -- -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +string(%d) %f +string(%d) %f +string(%d)%f string(%d) -%d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 -string(4) 0-1] +%f +string(%d) %f +string(%d) %s%f +string(%d) 0-1] string(1) e -- Iteration 2 -- -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 +string(%d) %f string(1) e -string(%d) %d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 +string(%d) %f +string(%d) %f +string(%d)%f string(%d) -%d.00e+0 -string(%d) %d.00e+0 -string(%d)%d.00e+0 -string(4) 0-1] +%f +string(%d) %f +string(%d) %s%f +string(%d) 0-1] string(1) e Done - --UEXPECTF-- *** Testing sprintf() : scientific formats with resource values *** -- Iteration 1 -- -unicode(%d) %d.00e+0 +unicode(%d) %f unicode(1) e -unicode(%d) %d.00e+0 +unicode(%d) %f unicode(1) e -unicode(%d) %d.00e+0 -unicode(%d) %d.00e+0 -unicode(%d) %d.00e+0 +unicode(%d) %f +unicode(%d) %f +unicode(%d) %f unicode(%d) -%d.00e+0 -unicode(%d) %d.00e+0 -unicode(%d)%d.00e+0 -unicode(4) 0-1] +%f +unicode(%d) %f +unicode(%d) %s%f +unicode(%d) 0-1] unicode(1) e -- Iteration 2 -- -unicode(%d) %d.00e+0 +unicode(%d) %f unicode(1) e -unicode(%d) %d.00e+0 +unicode(%d) %f unicode(1) e -unicode(%d) %d.00e+0 -unicode(%d) %d.00e+0 -unicode(%d) %d.00e+0 +unicode(%d) %f +unicode(%d) %f +unicode(%d) %f unicode(%d) -%d.00e+0 -unicode(%d) %d.00e+0 -unicode(%d)%d.00e+0 -unicode(4) 0-1] +%f +unicode(%d) %f +unicode(%d) %s%f +unicode(%d) 0-1] unicode(1) e Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/dir dir_basic.phpt dir_error.phpt dir_variation1.phpt dir_variation2.phpt dir_variation3.phpt dir_variation4.phpt dir_variation5.phpt dir_variation6
kraghubaMon Dec 24 05:19:42 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/dir dir_variation1.phpt dir_variation2.phpt dir_variation3.phpt dir_variation4.phpt dir_variation5.phpt dir_basic.phpt dir_variation6.phpt dir_variation7.phpt dir_variation8.phpt dir_variation9.phpt dir_error.phpt Log: new testcases for dir() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/dir/dir_variation1.phpt +++ php-src/ext/standard/tests/dir/dir_variation1.phpt --TEST-- Test dir() function : usage variations - unexpected value for 'dir' argument --FILE-- ?php /* * Prototype : object dir(string $directory[, resource $context]) * Description: Directory class with properties, handle and class and methods read, rewind and close * Source code: ext/standard/dir.c */ /* * Passing non string values to 'directory' argument of dir() and see * that the function outputs proper warning messages wherever expected. */ echo *** Testing dir() : unexpected values for \$directory argument ***\n; // get an unset variable $unset_var = 10; unset($unset_var); class A { public $var; public function init() { $this-var = 10; } public function __toString() { return ClassAObject; } } // get a resource variable $fp = fopen(__FILE__, r); // get a file handle $dfp = opendir( dirname(__FILE__) ); // get a dir handle // unexpected values to be passed to $directory argument $unexpected_values = array ( // array data /*1*/ array(), array(0), array(1), array(1, 2), array('color' = 'red', 'item' = 'pen'), // null data /*6*/ NULL, null, // boolean data /*8*/ true, false, TRUE, FALSE, // empty data /*12*/ , '', // undefined data /*14*/ @$undefined_var, // unset data /*15*/ @$unset_var, // resource variable(dir and file handle) /*16*/ $fp, $dfp, // object data /*18*/ new A() ); // loop through various elements of $unexpected_values to check the behavior of dir() $iterator = 1; foreach( $unexpected_values as $unexpected_value ) { echo \n-- Iteration $iterator --\n; var_dump( dir($unexpected_value) ); $iterator++; } fclose($fp); closedir($dfp); echo Done; ? --EXPECTF-- *** Testing dir() : unexpected values for $directory argument *** -- Iteration 1 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 2 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 3 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 4 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 5 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- bool(false) -- Iteration 8 -- Warning: dir(1): failed to open dir: %s in %s on line %d bool(false) -- Iteration 9 -- bool(false) -- Iteration 10 -- Warning: dir(1): failed to open dir: %s in %s on line %d bool(false) -- Iteration 11 -- bool(false) -- Iteration 12 -- bool(false) -- Iteration 13 -- bool(false) -- Iteration 14 -- bool(false) -- Iteration 15 -- bool(false) -- Iteration 16 -- Warning: dir(Resource id #%d): failed to open dir: %s in %s on line %d bool(false) -- Iteration 17 -- Warning: dir(Resource id #%d): failed to open dir: %s in %s on line %d bool(false) -- Iteration 18 -- Warning: dir(ClassAObject): failed to open dir: %s in %s on line %d bool(false) Done --UEXPECTF-- *** Testing dir() : unexpected values for $directory argument *** -- Iteration 1 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 2 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 3 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 4 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 5 -- Notice: Array to string conversion in %s on line %d
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/dir dir_basic.phpt dir_error.phpt dir_variation1.phpt dir_variation2.phpt dir_variation3.phpt dir_variation4.phpt dir_variation5.phpt dir_variation6
kraghubaMon Dec 24 05:21:08 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/dir dir_variation1.phpt dir_error.phpt dir_variation2.phpt dir_variation3.phpt dir_variation4.phpt dir_variation5.phpt dir_variation6.phpt dir_variation7.phpt dir_basic.phpt dir_variation8.phpt dir_variation9.phpt Log: new testcases for dir() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/dir/dir_variation1.phpt +++ php-src/ext/standard/tests/dir/dir_variation1.phpt --TEST-- Test dir() function : usage variations - unexpected value for 'dir' argument --FILE-- ?php /* * Prototype : object dir(string $directory[, resource $context]) * Description: Directory class with properties, handle and class and methods read, rewind and close * Source code: ext/standard/dir.c */ /* * Passing non string values to 'directory' argument of dir() and see * that the function outputs proper warning messages wherever expected. */ echo *** Testing dir() : unexpected values for \$directory argument ***\n; // get an unset variable $unset_var = 10; unset($unset_var); class A { public $var; public function init() { $this-var = 10; } public function __toString() { return ClassAObject; } } // get a resource variable $fp = fopen(__FILE__, r); // get a file handle $dfp = opendir( dirname(__FILE__) ); // get a dir handle // unexpected values to be passed to $directory argument $unexpected_values = array ( // array data /*1*/ array(), array(0), array(1), array(1, 2), array('color' = 'red', 'item' = 'pen'), // null data /*6*/ NULL, null, // boolean data /*8*/ true, false, TRUE, FALSE, // empty data /*12*/ , '', // undefined data /*14*/ @$undefined_var, // unset data /*15*/ @$unset_var, // resource variable(dir and file handle) /*16*/ $fp, $dfp, // object data /*18*/ new A() ); // loop through various elements of $unexpected_values to check the behavior of dir() $iterator = 1; foreach( $unexpected_values as $unexpected_value ) { echo \n-- Iteration $iterator --\n; var_dump( dir($unexpected_value) ); $iterator++; } fclose($fp); closedir($dfp); echo Done; ? --EXPECTF-- *** Testing dir() : unexpected values for $directory argument *** -- Iteration 1 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 2 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 3 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 4 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 5 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- bool(false) -- Iteration 8 -- Warning: dir(1): failed to open dir: %s in %s on line %d bool(false) -- Iteration 9 -- bool(false) -- Iteration 10 -- Warning: dir(1): failed to open dir: %s in %s on line %d bool(false) -- Iteration 11 -- bool(false) -- Iteration 12 -- bool(false) -- Iteration 13 -- bool(false) -- Iteration 14 -- bool(false) -- Iteration 15 -- bool(false) -- Iteration 16 -- Warning: dir(Resource id #%d): failed to open dir: %s in %s on line %d bool(false) -- Iteration 17 -- Warning: dir(Resource id #%d): failed to open dir: %s in %s on line %d bool(false) -- Iteration 18 -- Warning: dir(ClassAObject): failed to open dir: %s in %s on line %d bool(false) Done --UEXPECTF-- *** Testing dir() : unexpected values for $directory argument *** -- Iteration 1 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 2 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 3 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 4 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 5 -- Notice: Array to string conversion in %s on line %d
[PHP-CVS] cvs: php-src /ext/standard/tests/dir dir_basic.phpt dir_error.phpt dir_variation1.phpt dir_variation2.phpt dir_variation3.phpt dir_variation4.phpt dir_variation5.phpt dir_variation6.phpt dir
kraghubaMon Dec 24 05:07:47 2007 UTC Added files: /php-src/ext/standard/tests/dir dir_variation1.phpt dir_variation2.phpt dir_variation3.phpt dir_error.phpt dir_variation4.phpt dir_variation5.phpt dir_variation6.phpt dir_variation7.phpt dir_variation8.phpt dir_variation9.phpt dir_basic.phpt Log: new testcases for dir() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/dir_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/dir/dir_variation1.phpt +++ php-src/ext/standard/tests/dir/dir_variation1.phpt --TEST-- Test dir() function : usage variations - unexpected value for 'dir' argument --FILE-- ?php /* * Prototype : object dir(string $directory[, resource $context]) * Description: Directory class with properties, handle and class and methods read, rewind and close * Source code: ext/standard/dir.c */ /* * Passing non string values to 'directory' argument of dir() and see * that the function outputs proper warning messages wherever expected. */ echo *** Testing dir() : unexpected values for \$directory argument ***\n; // get an unset variable $unset_var = 10; unset($unset_var); class A { public $var; public function init() { $this-var = 10; } public function __toString() { return ClassAObject; } } // get a resource variable $fp = fopen(__FILE__, r); // get a file handle $dfp = opendir( dirname(__FILE__) ); // get a dir handle // unexpected values to be passed to $directory argument $unexpected_values = array ( // array data /*1*/ array(), array(0), array(1), array(1, 2), array('color' = 'red', 'item' = 'pen'), // null data /*6*/ NULL, null, // boolean data /*8*/ true, false, TRUE, FALSE, // empty data /*12*/ , '', // undefined data /*14*/ @$undefined_var, // unset data /*15*/ @$unset_var, // resource variable(dir and file handle) /*16*/ $fp, $dfp, // object data /*18*/ new A() ); // loop through various elements of $unexpected_values to check the behavior of dir() $iterator = 1; foreach( $unexpected_values as $unexpected_value ) { echo \n-- Iteration $iterator --\n; var_dump( dir($unexpected_value) ); $iterator++; } fclose($fp); closedir($dfp); echo Done; ? --EXPECTF-- *** Testing dir() : unexpected values for $directory argument *** -- Iteration 1 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 2 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 3 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 4 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 5 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 6 -- bool(false) -- Iteration 7 -- bool(false) -- Iteration 8 -- Warning: dir(1): failed to open dir: %s in %s on line %d bool(false) -- Iteration 9 -- bool(false) -- Iteration 10 -- Warning: dir(1): failed to open dir: %s in %s on line %d bool(false) -- Iteration 11 -- bool(false) -- Iteration 12 -- bool(false) -- Iteration 13 -- bool(false) -- Iteration 14 -- bool(false) -- Iteration 15 -- bool(false) -- Iteration 16 -- Warning: dir(Resource id #%d): failed to open dir: %s in %s on line %d bool(false) -- Iteration 17 -- Warning: dir(Resource id #%d): failed to open dir: %s in %s on line %d bool(false) -- Iteration 18 -- Warning: dir(ClassAObject): failed to open dir: %s in %s on line %d bool(false) Done --UEXPECTF-- *** Testing dir() : unexpected values for $directory argument *** -- Iteration 1 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 2 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 3 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 4 -- Notice: Array to string conversion in %s on line %d Warning: dir(Array): failed to open dir: %s in %s on line %d bool(false) -- Iteration 5 -- Notice: Array to string conversion in %s on line %d Warning:
[PHP-CVS] cvs: php-src /ext/standard/tests/strings sprintf_variation1.phpt sprintf_variation11.phpt sprintf_variation16.phpt sprintf_variation17.phpt sprintf_variation18.phpt sprintf_variation2.phpt s
kraghubaThu Dec 20 17:25:06 2007 UTC Modified files: /php-src/ext/standard/tests/strings sprintf_variation1.phpt sprintf_variation2.phpt sprintf_variation30.phpt sprintf_variation42.phpt sprintf_variation11.phpt sprintf_variation16.phpt sprintf_variation17.phpt sprintf_variation18.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation1.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation1.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation1.phpt:1.4 php-src/ext/standard/tests/strings/sprintf_variation1.phpt:1.5 --- php-src/ext/standard/tests/strings/sprintf_variation1.phpt:1.4 Tue Oct 9 11:51:48 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation1.phpt Thu Dec 20 17:25:06 2007 @@ -44,8 +44,8 @@ // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -139,14 +139,14 @@ string(5) -10.5 -- Iteration 7 -- -string(12) 1050 -string(12) 1050 -string(12) 1050 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 -- Iteration 8 -- -string(7) 1.06E-9 -string(7) 1.06E-9 -string(7) 1.06E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 -- Iteration 9 -- string(3) 0.5 @@ -155,57 +155,57 @@ -- Iteration 10 -- -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -- Iteration 11 -- -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -- Iteration 12 -- -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -- Iteration 13 -- -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -- Iteration 14 -- -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -Notice: Array to string conversion in %s on line %d%d +Notice: Array to string conversion in %s on line %d string(5) Array -- Iteration 15 -- @@ -264,13 +264,11 @@ string(0) -- Iteration 26 -- -string(%d) Resource id #5 -string(%d) Resource id #5 -string(%d) Resource id #5 +string(%d) Resource id #%d +string(%d) Resource id #%d +string(%d) Resource id #%d Done - --UEXPECTF-- - *** Testing sprintf() : with unexpected values for format argument *** -- Iteration 1 -- @@ -304,14 +302,14 @@ unicode(5) -10.5 -- Iteration 7 -- -unicode(12) 1050 -unicode(12) 1050 -unicode(12) 1050 +unicode(12) 101234567000 +unicode(12) 101234567000 +unicode(12) 101234567000 -- Iteration 8 -- -unicode(7) 1.06E-9 -unicode(7) 1.06E-9 -unicode(7) 1.06E-9 +unicode(13) 1.07654321E-9 +unicode(13) 1.07654321E-9 +unicode(13) 1.07654321E-9 -- Iteration 9 -- unicode(3) 0.5 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation2.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation2.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation2.phpt:1.3 php-src/ext/standard/tests/strings/sprintf_variation2.phpt:1.4 --- php-src/ext/standard/tests/strings/sprintf_variation2.phpt:1.3 Tue Oct 9 11:51:48 2007 +++
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings sprintf_variation1.phpt sprintf_variation11.phpt sprintf_variation16.phpt sprintf_variation17.phpt sprintf_variation18.phpt sprintf_variatio
kraghubaThu Dec 20 17:27:13 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings sprintf_variation16.phpt sprintf_variation17.phpt sprintf_variation18.phpt sprintf_variation30.phpt sprintf_variation42.phpt sprintf_variation1.phpt sprintf_variation2.phpt sprintf_variation11.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation16.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation16.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation16.phpt:1.2.2.2 php-src/ext/standard/tests/strings/sprintf_variation16.phpt:1.2.2.3 --- php-src/ext/standard/tests/strings/sprintf_variation16.phpt:1.2.2.2 Sat Sep 29 16:54:56 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation16.phpt Thu Dec 20 17:27:13 2007 @@ -20,12 +20,12 @@ 0.0, -0.1, 1.0, - 1e5, - -1e6, - 1E8, - -1E9, + 1e3, + -1e2, + 1.23456E8, + -1.234567E9, 10.005, - 10.5e+5 + 10.123e+5 ); // array of string formats @@ -187,62 +187,62 @@ string(1) s -- Iteration 10 -- -string(6) 10 +string(4) 1000 string(1) s -string(6) 10 +string(4) 1000 string(1) s -string(7) 10 -string(7) 10 -string(7) 10 -string(7) -10 -string(6) 10 -string(30) 10 +string(5) 1000 +string(5) 1000 +string(5) 1000 +string(5) +1000 +string(4) 1000 +string(30) 1000 string(10) a-zA-Z0-9] string(1) s -- Iteration 11 -- -string(8) -100 +string(4) -100 string(1) s -string(8) -100 +string(4) -100 string(1) s -string(9) -100 -string(9) -100 -string(9) -100 -string(9) --100 -string(8) -100 -string(30) -100 +string(5) -100 +string(5) -100 +string(5) -100 +string(5) +-100 +string(4) -100 +string(30) -100 string(10) a-zA-Z0-9] string(1) s -- Iteration 12 -- -string(9) 1 +string(9) 123456000 string(1) s -string(9) 1 +string(9) 123456000 string(1) s -string(10) 1 -string(10) 1 -string(10)1 +string(10) 123456000 +string(10) 123456000 +string(10)123456000 string(10) -1 -string(9) 1 -string(30) 1 +123456000 +string(9) 123456000 +string(30) 123456000 string(10) a-zA-Z0-9] string(1) s -- Iteration 13 -- -string(11) -10 +string(11) -1234567000 string(1) s -string(11) -10 +string(11) -1234567000 string(1) s -string(12) -10 -string(12) -10 -string(12)-10 +string(12) -1234567000 +string(12) -1234567000 +string(12)-1234567000 string(12) --10 -string(11) -10 -string(30)-10 +-1234567000 +string(11) -1234567000 +string(30)-1234567000 string(10) a-zA-Z0-9] string(1) s @@ -262,17 +262,17 @@ string(1) s -- Iteration 15 -- -string(7) 105 +string(7) 1012300 string(1) s -string(7) 105 +string(7) 1012300 string(1) s -string(8) 105 -string(8) 105 -string(8) 105 +string(8) 1012300 +string(8) 1012300 +string(8) 1012300 string(8) -105 -string(7) 105 -string(30)105 +1012300 +string(7) 1012300 +string(30)1012300 string(10) a-zA-Z0-9] string(1) s -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation17.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation17.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation17.phpt:1.2.2.2 php-src/ext/standard/tests/strings/sprintf_variation17.phpt:1.2.2.3 --- php-src/ext/standard/tests/strings/sprintf_variation17.phpt:1.2.2.2 Sat Sep 29 16:54:57 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation17.phpt Thu Dec 20 17:27:13 2007 @@ -39,7 +39,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; ? @@ -57,7 +57,7 @@ string(%d) Resource id #%d string(%d) Resource id #%d -string(%d) Resource id #%d +string(30) %sResource id #%d string(10) a-zA-Z0-9] string(1) s @@ -72,7 +72,7 @@ string(%d) Resource id #%d string(%d) Resource id #%d -string(%d) Resource id #%d +string(30) %sResource id #%d string(10) a-zA-Z0-9] string(1) s Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation18.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation18.phpt diff -u
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings sprintf_variation1.phpt sprintf_variation11.phpt sprintf_variation16.phpt sprintf_variation17.phpt sprintf_variation18.phpt sprintf_variatio
kraghubaThu Dec 20 17:28:36 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings sprintf_variation16.phpt sprintf_variation17.phpt sprintf_variation18.phpt sprintf_variation30.phpt sprintf_variation1.phpt sprintf_variation42.phpt sprintf_variation2.phpt sprintf_variation11.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation16.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation16.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation16.phpt:1.1.2.1 php-src/ext/standard/tests/strings/sprintf_variation16.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/sprintf_variation16.phpt:1.1.2.1 Sat Sep 29 14:13:53 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation16.phpt Thu Dec 20 17:28:36 2007 @@ -20,12 +20,12 @@ 0.0, -0.1, 1.0, - 1e5, - -1e6, - 1E8, - -1E9, + 1e3, + -1e2, + 1.23456E8, + -1.234567E9, 10.005, - 10.5e+5 + 10.123e+5 ); // array of string formats @@ -187,62 +187,62 @@ string(1) s -- Iteration 10 -- -string(6) 10 +string(4) 1000 string(1) s -string(6) 10 +string(4) 1000 string(1) s -string(7) 10 -string(7) 10 -string(7) 10 -string(7) -10 -string(6) 10 -string(30) 10 +string(5) 1000 +string(5) 1000 +string(5) 1000 +string(5) +1000 +string(4) 1000 +string(30) 1000 string(10) a-zA-Z0-9] string(1) s -- Iteration 11 -- -string(8) -100 +string(4) -100 string(1) s -string(8) -100 +string(4) -100 string(1) s -string(9) -100 -string(9) -100 -string(9) -100 -string(9) --100 -string(8) -100 -string(30) -100 +string(5) -100 +string(5) -100 +string(5) -100 +string(5) +-100 +string(4) -100 +string(30) -100 string(10) a-zA-Z0-9] string(1) s -- Iteration 12 -- -string(9) 1 +string(9) 123456000 string(1) s -string(9) 1 +string(9) 123456000 string(1) s -string(10) 1 -string(10) 1 -string(10)1 +string(10) 123456000 +string(10) 123456000 +string(10)123456000 string(10) -1 -string(9) 1 -string(30) 1 +123456000 +string(9) 123456000 +string(30) 123456000 string(10) a-zA-Z0-9] string(1) s -- Iteration 13 -- -string(11) -10 +string(11) -1234567000 string(1) s -string(11) -10 +string(11) -1234567000 string(1) s -string(12) -10 -string(12) -10 -string(12)-10 +string(12) -1234567000 +string(12) -1234567000 +string(12)-1234567000 string(12) --10 -string(11) -10 -string(30)-10 +-1234567000 +string(11) -1234567000 +string(30)-1234567000 string(10) a-zA-Z0-9] string(1) s @@ -262,17 +262,17 @@ string(1) s -- Iteration 15 -- -string(7) 105 +string(7) 1012300 string(1) s -string(7) 105 +string(7) 1012300 string(1) s -string(8) 105 -string(8) 105 -string(8) 105 +string(8) 1012300 +string(8) 1012300 +string(8) 1012300 string(8) -105 -string(7) 105 -string(30)105 +1012300 +string(7) 1012300 +string(30)1012300 string(10) a-zA-Z0-9] string(1) s -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation17.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation17.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation17.phpt:1.1.2.1 php-src/ext/standard/tests/strings/sprintf_variation17.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/sprintf_variation17.phpt:1.1.2.1 Sat Sep 29 14:13:53 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation17.phpt Thu Dec 20 17:28:36 2007 @@ -39,7 +39,7 @@ // closing the resources fclose($fp); -fclose($dfp); +closedir($dfp); echo Done; ? @@ -57,8 +57,8 @@ string(%d) Resource id #%d string(%d) Resource id #%d -string(%d) Resource id #%d -string(10) a-zA-Z0-9] +string(%d) %sResource id #%d +string(%d) a-zA-Z0-9] string(1) s -- Iteration 2 -- @@ -72,7 +72,7 @@ string(%d) Resource id #%d string(%d) Resource id #%d -string(%d) Resource id #%d -string(10) a-zA-Z0-9] +string(%d) %sResource id #%d +string(%d) a-zA-Z0-9] string(1) s Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation18.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index:
[PHP-CVS] cvs: php-src /ext/standard/tests/strings setlocale_basic1.phpt
kraghubaWed Dec 19 10:37:43 2007 UTC Modified files: /php-src/ext/standard/tests/strings setlocale_basic1.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/setlocale_basic1.phpt diff -u php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.2 php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.3 --- php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.2Fri Oct 5 19:35:45 2007 +++ php-src/ext/standard/tests/strings/setlocale_basic1.phptWed Dec 19 10:37:42 2007 @@ -49,8 +49,8 @@ //set of locales to be used $common_locales = array( - english_US= en_US.utf8gfd, - english_AU = en_AU.utf8hgg, + english_US= en_US.utf8, + english_AU = en_AU.utf8, korean_KR = ko_KR.utf8, Chinese_zh = zh_CN.utf8, germen_DE = de_DE.utf8, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings setlocale_basic1.phpt
kraghubaWed Dec 19 10:39:10 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings setlocale_basic1.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic1.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/strings/setlocale_basic1.phpt diff -u php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.4.2 php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.4.3 --- php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.4.2Fri Oct 5 19:32:28 2007 +++ php-src/ext/standard/tests/strings/setlocale_basic1.phptWed Dec 19 10:39:10 2007 @@ -47,8 +47,8 @@ //set of locales to be used $common_locales = array( - english_US= en_US.utf8gfd, - english_AU = en_AU.utf8hgg, + english_US= en_US.utf8, + english_AU = en_AU.utf8, korean_KR = ko_KR.utf8, Chinese_zh = zh_CN.utf8, germen_DE = de_DE.utf8, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings setlocale_basic1.phpt
kraghubaWed Dec 19 10:40:18 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings setlocale_basic1.phpt Log: fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/setlocale_basic1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/setlocale_basic1.phpt diff -u php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.2.1 php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/setlocale_basic1.phpt:1.1.2.1Fri Oct 5 19:30:50 2007 +++ php-src/ext/standard/tests/strings/setlocale_basic1.phptWed Dec 19 10:40:18 2007 @@ -47,8 +47,8 @@ //set of locales to be used $common_locales = array( - english_US= en_US.utf8gfd, - english_AU = en_AU.utf8hgg, + english_US= en_US.utf8, + english_AU = en_AU.utf8, korean_KR = ko_KR.utf8, Chinese_zh = zh_CN.utf8, germen_DE = de_DE.utf8, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_walk_error1.phpt array_walk_error2.phpt array_walk_recursive_error1.phpt array_walk_recursive_error2.phpt array_walk_recursive_variation2.phpt ar
kraghubaMon Dec 17 13:00:52 2007 UTC Modified files: /php-src/ext/standard/tests/array array_walk_recursive_variation8.phpt array_walk_variation8.phpt array_walk_recursive_error1.phpt array_walk_recursive_error2.phpt array_walk_error1.phpt array_walk_error2.phpt array_walk_recursive_variation2.phpt array_walk_variation2.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_walk_recursive_variation8.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_walk_recursive_variation8.phpt diff -u php-src/ext/standard/tests/array/array_walk_recursive_variation8.phpt:1.1 php-src/ext/standard/tests/array/array_walk_recursive_variation8.phpt:1.2 --- php-src/ext/standard/tests/array/array_walk_recursive_variation8.phpt:1.1 Tue Dec 11 10:43:28 2007 +++ php-src/ext/standard/tests/array/array_walk_recursive_variation8.phpt Mon Dec 17 13:00:52 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_walk_recursive() function : usage variations - buit-in function as callback(Bug#43558) +Test array_walk_recursive() function : usage variations - buit-in function as callback --FILE-- ?php /* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata]) @@ -38,7 +38,7 @@ -- With 'echo' language construct -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, string given in %s on line %d -bool(false) +NULL Done --UEXPECTF-- *** Testing array_walk_recursive() : built-in function as callback *** @@ -49,5 +49,5 @@ -- With 'echo' language construct -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, Unicode string given in %s on line %d -bool(false) +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_walk_variation8.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_walk_variation8.phpt diff -u php-src/ext/standard/tests/array/array_walk_variation8.phpt:1.1 php-src/ext/standard/tests/array/array_walk_variation8.phpt:1.2 --- php-src/ext/standard/tests/array/array_walk_variation8.phpt:1.1 Tue Dec 11 10:40:23 2007 +++ php-src/ext/standard/tests/array/array_walk_variation8.phpt Mon Dec 17 13:00:52 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_walk() function : usage variations - buit-in function as callback(Bug#43558) +Test array_walk() function : usage variations - buit-in function as callback --FILE-- ?php /* Prototype : bool array_walk(array $input, string $funcname [, mixed $userdata]) @@ -38,7 +38,7 @@ -- With 'echo' language construct -- Warning: array_walk() expects parameter 2 to be valid callback, string given in %s on line %d -bool(false) +NULL Done --UEXPECTF-- *** Testing array_walk() : built-in function as callback *** @@ -49,5 +49,5 @@ -- With 'echo' language construct -- Warning: array_walk() expects parameter 2 to be valid callback, Unicode string given in %s on line %d -bool(false) +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt diff -u php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt:1.1 php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt:1.2 --- php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt:1.1 Tue Dec 11 10:43:28 2007 +++ php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt Mon Dec 17 13:00:52 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_walk_recursive() function : error conditions(Bug#43558) +Test array_walk_recursive() function : error conditions --FILE-- ?php /* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata]) @@ -44,7 +44,7 @@ -- Testing array_walk_recursive() function with non existent callback function -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, string given in %s on line %d -bool(false) +NULL Done --UEXPECTF-- *** Testing array_walk_recursive() : error conditions *** @@ -59,5 +59,5 @@ -- Testing array_walk_recursive() function with non existent callback function -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, Unicode string given in %s on line %d -bool(false) +NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_walk_recursive_error2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_walk_recursive_error2.phpt diff -u php-src/ext/standard/tests/array/array_walk_recursive_error2.phpt:1.1
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_walk_error1.phpt array_walk_error2.phpt array_walk_recursive_error1.phpt array_walk_recursive_error2.phpt array_walk_recursive_variation
kraghubaMon Dec 17 13:02:28 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_walk_recursive_variation2.phpt array_walk_variation2.phpt array_walk_recursive_variation8.phpt array_walk_variation8.phpt array_walk_recursive_error1.phpt array_walk_recursive_error2.phpt array_walk_error1.phpt array_walk_error2.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_walk_recursive_variation2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_walk_recursive_variation2.phpt diff -u php-src/ext/standard/tests/array/array_walk_recursive_variation2.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_walk_recursive_variation2.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_walk_recursive_variation2.phpt:1.1.2.2 Tue Dec 11 10:45:50 2007 +++ php-src/ext/standard/tests/array/array_walk_recursive_variation2.phpt Mon Dec 17 13:02:27 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_walk_recursive() function : usage variations - unexpected values in place of 'funcname' argument(Bug#43558) +Test array_walk_recursive() function : usage variations - unexpected values in place of 'funcname' argument --FILE-- ?php /* Prototype : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata]) @@ -93,176 +93,176 @@ -- Iteration 1 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL -- Iteration 2 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL -- Iteration 3 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL -- Iteration 4 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d -bool(false) +NULL -- Iteration 5 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL -- Iteration 6 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL -- Iteration 7 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL -- Iteration 8 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL -- Iteration 9 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, double given in %s on line %d -bool(false) +NULL -- Iteration 10 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, array given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, array given in %s on line %d -bool(false) +NULL -- Iteration 11 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, array given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, array given in %s on line %d -bool(false) +NULL -- Iteration 12 -- Warning: array_walk_recursive() expects parameter 2 to be valid callback, array given in %s on line %d -bool(false) +NULL Warning: array_walk_recursive() expects parameter 2 to be valid callback, array given in %s on line %d -bool(false)
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_walk_object.phpt
kraghubaTue Dec 11 10:42:56 2007 UTC Removed files: /php-src/ext/standard/tests/array array_walk_object.phpt Log: delete because there are two smaller testcases for this -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_unique_basic.phpt array_unique_error.phpt array_unique_variation1.phpt array_unique_variation2.phpt array_unique_variation3.phpt array_unique_var
kraghubaSun Dec 9 14:38:48 2007 UTC Added files: /php-src/ext/standard/tests/array array_unique_variation6.phpt array_unique_variation3.phpt array_unique_variation7.phpt array_unique_variation4.phpt array_unique_variation1.phpt array_unique_variation8.phpt array_unique_variation5.phpt array_unique_error.phpt array_unique_variation2.phpt array_unique_basic.phpt Log: new testcases for array_unique() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_unique_variation6.phpt +++ php-src/ext/standard/tests/array/array_unique_variation6.phpt --TEST-- Test array_unique() function : usage variations - array with reference variables --FILE-- ?php /* Prototype : array array_unique(array $input) * Description: Removes duplicate values from array * Source code: ext/standard/array.c */ /* * Testing the functionality of array_unique() by passing * array having reference variables as values. */ echo *** Testing array_unique() : array with reference variables for \$input argument ***\n; $value1 = 10; $value2 = hello; $value3 = 0; $value4 = $value2; // input array containing elements as reference variables $input = array( 0 = 0, 1 = $value4, 2 = $value2, 3 = hello, 4 = $value3, 5 = $value4 ); var_dump( array_unique($input) ); echo Done; ? --EXPECTF-- *** Testing array_unique() : array with reference variables for $input argument *** array(2) { [0]= int(0) [1]= string(5) hello } Done --UEXPECT-- *** Testing array_unique() : array with reference variables for $input argument *** array(2) { [0]= int(0) [1]= unicode(5) hello } Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_unique_variation3.phpt +++ php-src/ext/standard/tests/array/array_unique_variation3.phpt --TEST-- Test array_unique() function : usage variations - associative array with different keys --FILE-- ?php /* Prototype : array array_unique(array $input) * Description: Removes duplicate values from array * Source code: ext/standard/array.c */ /* * Testing the functionality of array_unique() by passing different * associative arrays having different keys to $input argument. */ echo *** Testing array_unique() : assoc. array with diff. keys passed to \$input argument ***\n; // get an unset variable $unset_var = 10; unset ($unset_var); // get a resource variable $fp = fopen(__FILE__, r); // get a class class classA { public function __toString(){ return Class A object; } } // get a heredoc string $heredoc = EOT Hello world EOT; // different associative arrays to be passed to $input argument $inputs = array ( /*1*/ // arrays with integer keys array(0 = 0, 1 = 0), array(1 = 1, 2 = 2, 3 = 1, 4 = 4), // arrays with float keys /*3*/ array(2. = float, 44.44 = float), array(1.2 = f1, 3.33 = f2, 4.892283 = f1, 333.33 = f4), // arrays with string keys /*5*/ array('\tHello' = 111, 're\td' = color, '\v\fworld' = 2.2, 'pen\n' = 111), array(\tHello = 111, re\td = color, \v\fworld = 2.2, pen\n = 111), array(hello, $heredoc = string, string), // array with object, unset variable and resource variable /*8*/ array(new classA() = 11, @$unset_var = hello, $fp = 'resource', 11, hello), ); // loop through each sub-array of $inputs to check the behavior of array_unique() $iterator = 1; foreach($inputs as $input) { echo -- Iteration $iterator --\n; var_dump( array_unique($input) ); $iterator++; } fclose($fp); echo Done; ? --EXPECTF-- *** Testing array_unique() : assoc. array with diff. keys passed to $input argument *** Warning: Illegal offset type in %s on line %d Warning: Illegal offset type in %s on line %d -- Iteration 1 -- array(1) { [0]= string(1) 0 } -- Iteration 2 -- array(3) { [1]= string(1) 1 [2]= string(1) 2 [4]= string(1) 4 } -- Iteration 3 -- array(1) { [2]= string(5) float } -- Iteration 4 -- array(3) { [1]= string(2) f1 [3]= string(2) f2 [333]= string(2) f4 } -- Iteration 5 -- array(3) { [\tHello]= int(111) [re\td]= string(5) color [\v\fworld]= float(2.2) } -- Iteration 6 -- array(3) { [Hello]= int(111) [re d]= string(5) color [world]= float(2.2) } -- Iteration 7 -- array(2) { [0]= string(5) hello [Hello world]= string(6) string } -- Iteration 8 -- array(2) { []= string(5) hello [0]= int(11) }
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_unique_basic.phpt array_unique_error.phpt array_unique_variation1.phpt array_unique_variation2.phpt array_unique_variation3.phpt array_u
kraghubaSun Dec 9 14:41:11 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_unique_variation1.phpt array_unique_variation4.phpt array_unique_variation7.phpt array_unique_error.phpt array_unique_variation3.phpt array_unique_variation6.phpt array_unique_variation2.phpt array_unique_variation5.phpt array_unique_variation8.phpt array_unique_basic.phpt Log: new testcases for array_unique() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_unique_variation1.phpt +++ php-src/ext/standard/tests/array/array_unique_variation1.phpt --TEST-- Test array_unique() function : usage variations - unexpected values for 'input' argument --FILE-- ?php /* Prototype : array array_unique(array $input) * Description: Removes duplicate values from array * Source code: ext/standard/array.c */ /* * Passing non array values to 'input' argument of array_unique() and see * that the function outputs proper warning messages wherever expected. */ echo *** Testing array_unique() : Passing non array values to \$input argument ***\n; //get an unset variable $unset_var = 10; unset($unset_var); // get a class class classA { public function __toString() { return Class A object; } } // heredoc string $heredoc = EOT hello world EOT; // get a resource variable $fp = fopen(__FILE__, r); // unexpected values to be passed to $input argument $inputs = array ( // int data /*1*/ 0, 1, 12345, -2345, // float data /*5*/ 10.5, -10.5, 12.3456789000e10, 12.3456789000E-10, .5, // null data /*10*/ NULL, null, // boolean data /*12*/ true, false, TRUE, FALSE, // empty data /*16*/ , '', // string data /*18*/ string, 'string', $heredoc, // object data /*21*/ new classA(), // undefined data /*22*/ @$undefined_var, // unset data /*23*/ @$unset_var, // resource variable /*24*/ $fp ); // loop through each element of $inputs and check the behavior of array_unique() $iterator = 1; foreach($inputs as $input) { echo -- Iteration $iterator --\n; var_dump( array_unique($input) ); $iterator++; } fclose($fp); echo Done; ? --EXPECTF-- *** Testing array_unique() : Passing non array values to $input argument *** -- Iteration 1 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 2 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 3 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 4 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 5 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 6 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 7 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 8 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 9 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 10 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 11 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 12 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 13 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 14 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 15 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 16 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 17 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 18 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 19 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 20 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 21 -- array(0) { }
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_unique_basic.phpt array_unique_error.phpt array_unique_variation1.phpt array_unique_variation2.phpt array_unique_variation3.phpt array_u
kraghubaSun Dec 9 14:44:19 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_unique_variation1.phpt array_unique_variation4.phpt array_unique_variation7.phpt array_unique_basic.phpt array_unique_variation3.phpt array_unique_variation6.phpt array_unique_error.phpt array_unique_variation2.phpt array_unique_variation5.phpt array_unique_variation8.phpt Log: new testcases for array_unique() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unique_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_unique_variation1.phpt +++ php-src/ext/standard/tests/array/array_unique_variation1.phpt --TEST-- Test array_unique() function : usage variations - unexpected values for 'input' argument --FILE-- ?php /* Prototype : array array_unique(array $input) * Description: Removes duplicate values from array * Source code: ext/standard/array.c */ /* * Passing non array values to 'input' argument of array_unique() and see * that the function outputs proper warning messages wherever expected. */ echo *** Testing array_unique() : Passing non array values to \$input argument ***\n; //get an unset variable $unset_var = 10; unset($unset_var); // get a class class classA { public function __toString() { return Class A object; } } // heredoc string $heredoc = EOT hello world EOT; // get a resource variable $fp = fopen(__FILE__, r); // unexpected values to be passed to $input argument $inputs = array ( // int data /*1*/ 0, 1, 12345, -2345, // float data /*5*/ 10.5, -10.5, 12.3456789000e10, 12.3456789000E-10, .5, // null data /*10*/ NULL, null, // boolean data /*12*/ true, false, TRUE, FALSE, // empty data /*16*/ , '', // string data /*18*/ string, 'string', $heredoc, // object data /*21*/ new classA(), // undefined data /*22*/ @$undefined_var, // unset data /*23*/ @$unset_var, // resource variable /*24*/ $fp ); // loop through each element of $inputs and check the behavior of array_unique() $iterator = 1; foreach($inputs as $input) { echo -- Iteration $iterator --\n; var_dump( array_unique($input) ); $iterator++; } fclose($fp); echo Done; ? --EXPECTF-- *** Testing array_unique() : Passing non array values to $input argument *** -- Iteration 1 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 2 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 3 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 4 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 5 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 6 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 7 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 8 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 9 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 10 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 11 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 12 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 13 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 14 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 15 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 16 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 17 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 18 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 19 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 20 -- Warning: array_unique(): The argument should be an array in %s on line %d bool(false) -- Iteration 21 -- array(0) { }
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_pad_basic.phpt array_pad_error.phpt array_pad_variation1.phpt array_pad_variation2.phpt array_pad_variation3.phpt array_pad_variation4.p
kraghubaMon Dec 3 11:53:04 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_pad_basic.phpt array_pad_variation1.phpt array_pad_variation2.phpt array_pad_variation3.phpt array_pad_variation4.phpt array_pad_variation5.phpt array_pad_variation6.phpt array_pad_variation7.phpt array_pad_error.phpt Log: New testcases for array_pad() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_basic.phpt +++ php-src/ext/standard/tests/array/array_pad_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation1.phpt +++ php-src/ext/standard/tests/array/array_pad_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation2.phpt +++ php-src/ext/standard/tests/array/array_pad_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation3.phpt +++ php-src/ext/standard/tests/array/array_pad_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation4.phpt +++ php-src/ext/standard/tests/array/array_pad_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation5.phpt +++ php-src/ext/standard/tests/array/array_pad_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation6.phpt +++ php-src/ext/standard/tests/array/array_pad_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation7.phpt +++ php-src/ext/standard/tests/array/array_pad_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_error.phpt +++ php-src/ext/standard/tests/array/array_pad_error.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings vsprintf_variation1.phpt vsprintf_variation2.phpt
kraghubaMon Dec 3 12:02:29 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings vsprintf_variation1.phpt vsprintf_variation2.phpt Log: fix tests: better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vsprintf_variation1.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/strings/vsprintf_variation1.phpt diff -u php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.1.4.2 php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.1.4.3 --- php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.1.4.2 Fri Oct 5 18:09:31 2007 +++ php-src/ext/standard/tests/strings/vsprintf_variation1.phpt Mon Dec 3 12:02:29 2007 @@ -45,8 +45,8 @@ // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -120,10 +120,10 @@ string(5) -10.5 -- Iteration 7 -- -string(12) 1050 +string(12) 101234567000 -- Iteration 8 -- -string(7) 1.06E-9 +string(13) 1.07654321E-9 -- Iteration 9 -- string(3) 0.5 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vsprintf_variation2.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/standard/tests/strings/vsprintf_variation2.phpt diff -u php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.1.4.3 php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.1.4.4 --- php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.1.4.3 Tue Oct 9 11:04:17 2007 +++ php-src/ext/standard/tests/strings/vsprintf_variation2.phpt Mon Dec 3 12:02:29 2007 @@ -45,8 +45,8 @@ // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // null data @@ -115,10 +115,10 @@ string(5) -10.5 -- Iteration 7 -- -string(12) 1050 +string(12) 101234567000 -- Iteration 8 -- -string(7) 1.06E-9 +string(13) 1.07654321E-9 -- Iteration 9 -- string(3) 0.5 @@ -174,4 +174,4 @@ -- Iteration 23 -- string(%d) Resource id #%d -Done +Done \ No newline at end of file -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/strings vsprintf_variation1.phpt vsprintf_variation2.phpt
kraghubaMon Dec 3 12:04:26 2007 UTC Modified files: /php-src/ext/standard/tests/strings vsprintf_variation2.phpt vsprintf_variation1.phpt Log: fix tests: better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vsprintf_variation2.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/strings/vsprintf_variation2.phpt diff -u php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.3 php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.4 --- php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.3 Tue Oct 9 11:51:48 2007 +++ php-src/ext/standard/tests/strings/vsprintf_variation2.phpt Mon Dec 3 12:04:26 2007 @@ -45,8 +45,8 @@ // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // null data @@ -115,10 +115,10 @@ string(5) -10.5 -- Iteration 7 -- -string(12) 1050 +string(12) 101234567000 -- Iteration 8 -- -string(7) 1.06E-9 +string(13) 1.07654321E-9 -- Iteration 9 -- string(3) 0.5 @@ -175,7 +175,6 @@ -- Iteration 23 -- string(%d) Resource id #%d Done - --UEXPECTF-- *** Testing vsprintf() : with unexpected values for args argument *** @@ -198,10 +197,10 @@ unicode(5) -10.5 -- Iteration 7 -- -unicode(12) 1050 +unicode(12) 101234567000 -- Iteration 8 -- -unicode(7) 1.06E-9 +unicode(13) 1.07654321E-9 -- Iteration 9 -- unicode(3) 0.5 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vsprintf_variation1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/vsprintf_variation1.phpt diff -u php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.2 php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.3 --- php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.2 Fri Oct 5 18:12:35 2007 +++ php-src/ext/standard/tests/strings/vsprintf_variation1.phpt Mon Dec 3 12:04:26 2007 @@ -45,8 +45,8 @@ // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -120,10 +120,10 @@ string(5) -10.5 -- Iteration 7 -- -string(12) 1050 +string(12) 101234567000 -- Iteration 8 -- -string(7) 1.06E-9 +string(13) 1.07654321E-9 -- Iteration 9 -- string(3) 0.5 @@ -189,7 +189,6 @@ -- Iteration 26 -- string(%d) Resource id #%d Done - --UEXPECTF-- *** Testing vsprintf() : with unexpected values for format argument *** @@ -212,10 +211,10 @@ unicode(5) -10.5 -- Iteration 7 -- -unicode(12) 1050 +unicode(12) 101234567000 -- Iteration 8 -- -unicode(7) 1.06E-9 +unicode(13) 1.07654321E-9 -- Iteration 9 -- unicode(3) 0.5 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings vsprintf_variation1.phpt vsprintf_variation2.phpt
kraghubaMon Dec 3 11:59:55 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings vsprintf_variation1.phpt vsprintf_variation2.phpt Log: fix tests: better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vsprintf_variation1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/vsprintf_variation1.phpt diff -u php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.1.2.1 php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/vsprintf_variation1.phpt:1.1.2.1 Fri Oct 5 18:07:27 2007 +++ php-src/ext/standard/tests/strings/vsprintf_variation1.phpt Mon Dec 3 11:59:55 2007 @@ -45,8 +45,8 @@ // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -120,10 +120,10 @@ string(5) -10.5 -- Iteration 7 -- -string(12) 1050 +string(12) 101234567000 -- Iteration 8 -- -string(7) 1.06E-9 +string(13) 1.07654321E-9 -- Iteration 9 -- string(3) 0.5 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vsprintf_variation2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/strings/vsprintf_variation2.phpt diff -u php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.1.2.2 php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.1.2.3 --- php-src/ext/standard/tests/strings/vsprintf_variation2.phpt:1.1.2.2 Tue Oct 9 10:56:45 2007 +++ php-src/ext/standard/tests/strings/vsprintf_variation2.phpt Mon Dec 3 11:59:55 2007 @@ -45,8 +45,8 @@ // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // null data @@ -115,10 +115,10 @@ string(5) -10.5 -- Iteration 7 -- -string(12) 1050 +string(12) 101234567000 -- Iteration 8 -- -string(7) 1.06E-9 +string(13) 1.07654321E-9 -- Iteration 9 -- string(3) 0.5 @@ -174,4 +174,4 @@ -- Iteration 23 -- string(%d) Resource id #%d -Done +Done \ No newline at end of file -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings wordwrap_variation1.phpt wordwrap_variation3.phpt
kraghubaMon Dec 3 13:03:31 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings wordwrap_variation1.phpt wordwrap_variation3.phpt Log: fix tests : better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation1.phpt?r1=1.1.2.1r2=1.1.2.1.2.1diff_format=u Index: php-src/ext/standard/tests/strings/wordwrap_variation1.phpt diff -u php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.1.2.1 php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.1.2.1.2.1 --- php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.1.2.1 Fri Sep 14 18:53:38 2007 +++ php-src/ext/standard/tests/strings/wordwrap_variation1.phpt Mon Dec 3 13:03:31 2007 @@ -36,8 +36,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -143,17 +143,17 @@ string(5) -10.5 string(13) -10br /\n.5 -- Iteration 7 -- -string(12) 1050 -string(12) 1050 -string(12) 1050 -string(12) 1050 -string(36) 105br /\n000br /\n000br /\n000 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(36) 101br /\n234br /\n567br /\n000 -- Iteration 8 -- -string(7) 1.06E-9 -string(7) 1.06E-9 -string(7) 1.06E-9 -string(7) 1.06E-9 -string(23) 1.0br /\n6E-br /\n9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(45) 1.0br /\n765br /\n432br /\n1E-br /\n9 -- Iteration 9 -- string(3) 0.5 string(3) 0.5 @@ -332,4 +332,4 @@ string(0) string(0) string(0) -Done +Done \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation3.phpt?r1=1.1.2.1r2=1.1.2.1.2.1diff_format=u Index: php-src/ext/standard/tests/strings/wordwrap_variation3.phpt diff -u php-src/ext/standard/tests/strings/wordwrap_variation3.phpt:1.1.2.1 php-src/ext/standard/tests/strings/wordwrap_variation3.phpt:1.1.2.1.2.1 --- php-src/ext/standard/tests/strings/wordwrap_variation3.phpt:1.1.2.1 Fri Sep 14 18:53:38 2007 +++ php-src/ext/standard/tests/strings/wordwrap_variation3.phpt Mon Dec 3 13:03:31 2007 @@ -37,8 +37,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -130,13 +130,13 @@ string(33) testing-10.5wordwrap-10.5function string(33) testing-10.5wordwrap-10.5function -- Iteration 7 -- -string(47) testing1050wordwrap1050function -string(47) testing1050wordwrap1050function -string(47) testing1050wordwrap1050function +string(47) testing101234567000wordwrap101234567000function +string(47) testing101234567000wordwrap101234567000function +string(47) testing101234567000wordwrap101234567000function -- Iteration 8 -- -string(37) testing1.06E-9wordwrap1.06E-9function -string(37) testing1.06E-9wordwrap1.06E-9function -string(37) testing1.06E-9wordwrap1.06E-9function +string(49) testing1.07654321E-9wordwrap1.07654321E-9function +string(49) testing1.07654321E-9wordwrap1.07654321E-9function +string(49) testing1.07654321E-9wordwrap1.07654321E-9function -- Iteration 9 -- string(29) testing0.5wordwrap0.5function string(29) testing0.5wordwrap0.5function -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/strings wordwrap_variation1.phpt wordwrap_variation3.phpt
kraghubaMon Dec 3 13:02:11 2007 UTC Modified files: /php-src/ext/standard/tests/strings wordwrap_variation1.phpt wordwrap_variation3.phpt Log: fix tests : better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/wordwrap_variation1.phpt diff -u php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.2 php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.3 --- php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.2 Fri Sep 14 19:09:11 2007 +++ php-src/ext/standard/tests/strings/wordwrap_variation1.phpt Mon Dec 3 13:02:11 2007 @@ -36,8 +36,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -143,17 +143,17 @@ string(5) -10.5 string(13) -10br /\n.5 -- Iteration 7 -- -string(12) 1050 -string(12) 1050 -string(12) 1050 -string(12) 1050 -string(36) 105br /\n000br /\n000br /\n000 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(36) 101br /\n234br /\n567br /\n000 -- Iteration 8 -- -string(7) 1.06E-9 -string(7) 1.06E-9 -string(7) 1.06E-9 -string(7) 1.06E-9 -string(23) 1.0br /\n6E-br /\n9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(45) 1.0br /\n765br /\n432br /\n1E-br /\n9 -- Iteration 9 -- string(3) 0.5 string(3) 0.5 @@ -333,3 +333,234 @@ string(0) string(0) Done +--UEXPECTF-- +*** Testing wordwrap() : usage variations *** + +--- Testing wordwrap() by supplying different values for 'str' argument --- +-- Iteration 1 -- +string(1) 0 +string(1) 0 +string(1) 0 +string(1) 0 +string(1) 0 +-- Iteration 2 -- +string(1) 1 +string(1) 1 +string(1) 1 +string(1) 1 +string(1) 1 +-- Iteration 3 -- +string(5) 12345 +string(5) 12345 +string(5) 12345 +string(5) 12345 +string(13) 123br /\n45 +-- Iteration 4 -- +string(5) -2345 +string(5) -2345 +string(5) -2345 +string(5) -2345 +string(13) -23br /\n45 +-- Iteration 5 -- +string(4) 10.5 +string(4) 10.5 +string(4) 10.5 +string(4) 10.5 +string(12) 10.br /\n5 +-- Iteration 6 -- +string(5) -10.5 +string(5) -10.5 +string(5) -10.5 +string(5) -10.5 +string(13) -10br /\n.5 +-- Iteration 7 -- +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(36) 101br /\n234br /\n567br /\n000 +-- Iteration 8 -- +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(45) 1.0br /\n765br /\n432br /\n1E-br /\n9 +-- Iteration 9 -- +string(3) 0.5 +string(3) 0.5 +string(3) 0.5 +string(3) 0.5 +string(3) 0.5 +-- Iteration 10 -- + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL +-- Iteration 13 -- + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL + +Warning: wordwrap() expects parameter 1 to be binary string, array given in %s on line %d +NULL +-- Iteration 14 -- + +Warning: wordwrap() expects parameter 1 to be binary
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_pad_error.phpt array_pad_variation1.phpt array_pad_variation2.phpt array_pad_variation3.phpt array_pad_variation4.phpt array_pad_variati
kraghubaMon Dec 3 12:51:57 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_pad_variation1.phpt array_pad_variation2.phpt array_pad_variation3.phpt array_pad_variation4.phpt array_pad_variation5.phpt array_pad_variation6.phpt array_pad_variation7.phpt array_pad_error.phpt Log: New testcases for array_pad() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation1.phpt +++ php-src/ext/standard/tests/array/array_pad_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation2.phpt +++ php-src/ext/standard/tests/array/array_pad_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation3.phpt +++ php-src/ext/standard/tests/array/array_pad_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation4.phpt +++ php-src/ext/standard/tests/array/array_pad_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation5.phpt +++ php-src/ext/standard/tests/array/array_pad_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation6.phpt +++ php-src/ext/standard/tests/array/array_pad_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_variation7.phpt +++ php-src/ext/standard/tests/array/array_pad_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pad_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_pad_error.phpt +++ php-src/ext/standard/tests/array/array_pad_error.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings wordwrap_variation1.phpt wordwrap_variation3.phpt
kraghubaMon Dec 3 13:04:45 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings wordwrap_variation1.phpt wordwrap_variation3.phpt Log: fix tests : better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/wordwrap_variation1.phpt diff -u php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.1.2.1 php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.1.2.1 Fri Sep 14 18:53:38 2007 +++ php-src/ext/standard/tests/strings/wordwrap_variation1.phpt Mon Dec 3 13:04:45 2007 @@ -36,8 +36,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -143,17 +143,17 @@ string(5) -10.5 string(13) -10br /\n.5 -- Iteration 7 -- -string(12) 1050 -string(12) 1050 -string(12) 1050 -string(12) 1050 -string(36) 105br /\n000br /\n000br /\n000 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(12) 101234567000 +string(36) 101br /\n234br /\n567br /\n000 -- Iteration 8 -- -string(7) 1.06E-9 -string(7) 1.06E-9 -string(7) 1.06E-9 -string(7) 1.06E-9 -string(23) 1.0br /\n6E-br /\n9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(13) 1.07654321E-9 +string(45) 1.0br /\n765br /\n432br /\n1E-br /\n9 -- Iteration 9 -- string(3) 0.5 string(3) 0.5 @@ -332,4 +332,4 @@ string(0) string(0) string(0) -Done +Done \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation3.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/wordwrap_variation3.phpt diff -u php-src/ext/standard/tests/strings/wordwrap_variation3.phpt:1.1.2.1 php-src/ext/standard/tests/strings/wordwrap_variation3.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/wordwrap_variation3.phpt:1.1.2.1 Fri Sep 14 18:53:38 2007 +++ php-src/ext/standard/tests/strings/wordwrap_variation3.phpt Mon Dec 3 13:04:45 2007 @@ -37,8 +37,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -130,13 +130,13 @@ string(33) testing-10.5wordwrap-10.5function string(33) testing-10.5wordwrap-10.5function -- Iteration 7 -- -string(47) testing1050wordwrap1050function -string(47) testing1050wordwrap1050function -string(47) testing1050wordwrap1050function +string(47) testing101234567000wordwrap101234567000function +string(47) testing101234567000wordwrap101234567000function +string(47) testing101234567000wordwrap101234567000function -- Iteration 8 -- -string(37) testing1.06E-9wordwrap1.06E-9function -string(37) testing1.06E-9wordwrap1.06E-9function -string(37) testing1.06E-9wordwrap1.06E-9function +string(49) testing1.07654321E-9wordwrap1.07654321E-9function +string(49) testing1.07654321E-9wordwrap1.07654321E-9function +string(49) testing1.07654321E-9wordwrap1.07654321E-9function -- Iteration 9 -- string(29) testing0.5wordwrap0.5function string(29) testing0.5wordwrap0.5function -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_sum_basic.phpt array_sum_error.phpt array_sum_variation1.phpt array_sum_variation2.phpt array_sum_variation3.phpt array_sum_variation4.p
kraghubaTue Nov 27 14:59:30 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_sum_variation4.phpt array_sum_variation5.phpt array_sum_variation6.phpt array_sum_variation7.phpt array_sum_error.phpt array_sum_basic.phpt array_sum_variation1.phpt array_sum_variation2.phpt array_sum_variation3.phpt Log: New testcases for array_sum() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation4.phpt +++ php-src/ext/standard/tests/array/array_sum_variation4.phpt --TEST-- Test array_sum() function : usage variations - array with duplicate values --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Checking array_sum() with integer and float array containing duplicate values */ echo *** Testing array_sum() : array with duplicate values ***\n; // integer array with duplicate values $int_input = array( 2, 5, 7, 5, 0, -4, 2, 100); echo -- With integer array --\n; var_dump( array_sum($int_input) ); // float array with duplicate values $float_input = array( 2.3, 1.9, -4.1, 0.5, 1.9, -4.1, 3.6, 0.5); echo -- With float array --\n; var_dump( array_sum($float_input) ); echo Done ? --EXPECTF-- *** Testing array_sum() : array with duplicate values *** -- With integer array -- int(117) -- With float array -- float(2.5) Done --UEXPECTF-- *** Testing array_sum() : array with duplicate values *** -- With integer array -- int(117) -- With float array -- float(2.5) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation5.phpt +++ php-src/ext/standard/tests/array/array_sum_variation5.phpt --TEST-- Test array_sum() function : usage variations - array with reference variables --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Testing array_sum() with 'input' containing different reference variables */ echo *** Testing array_sum() : array with elements as reference ***\n; // different variables which are used as elements of 'array_arg' $value1 = -5; $value2 = 100; $value3 = 0; $value4 = $value1; // input an array containing elements with reference variables $input = array( 0 = 10, 1 = $value4, 2 = $value2, 3 = 200, 4 = $value3, ); var_dump( array_sum($input) ); echo Done ? --EXPECTF-- *** Testing array_sum() : array with elements as reference *** int(305) Done --UEXPECTF-- *** Testing array_sum() : array with elements as reference *** int(305) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation6.phpt +++ php-src/ext/standard/tests/array/array_sum_variation6.phpt --TEST-- Test array_sum() function : usage variations - associative array --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Testing array_sum() with associative array as 'input' argument */ echo *** Testing array_sum() : with associative array ***\n; // array with numeric keys $input = array(0 = 1, 1 = 10, 2 = 0, 3 = -2, 4 = 23.56); echo -- with numeric keys --\n; var_dump( array_sum($input) ); // array with string keys $input = array('a' = 20, b = 50, 'c' = 0, 'd' = -30, e = 100); echo -- with string keys --\n; var_dump( array_sum($input) ); echo Done ? --EXPECTF-- *** Testing array_sum() : with associative array *** -- with numeric keys -- float(32.56) -- with string keys -- int(140) Done --UEXPECTF-- *** Testing array_sum() : with associative array *** -- with numeric keys -- float(32.56) -- with string keys -- int(140) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation7.phpt +++ php-src/ext/standard/tests/array/array_sum_variation7.phpt --TEST-- Test array_sum() function : usage variations - 'input' array with unexpected values as array element --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Testing array_sum() with array having other than numeric entries *strings, bool, null, subarrays, objects */ echo *** Testing array_sum() : array with
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_sum_basic.phpt array_sum_error.phpt array_sum_variation1.phpt array_sum_variation2.phpt array_sum_variation3.phpt array_sum_variation4.p
kraghubaTue Nov 27 15:00:55 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_sum_variation5.phpt array_sum_variation6.phpt array_sum_variation7.phpt array_sum_error.phpt array_sum_basic.phpt array_sum_variation1.phpt array_sum_variation2.phpt array_sum_variation3.phpt array_sum_variation4.phpt Log: New testcases for array_sum() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation5.phpt +++ php-src/ext/standard/tests/array/array_sum_variation5.phpt --TEST-- Test array_sum() function : usage variations - array with reference variables --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Testing array_sum() with 'input' containing different reference variables */ echo *** Testing array_sum() : array with elements as reference ***\n; // different variables which are used as elements of 'array_arg' $value1 = -5; $value2 = 100; $value3 = 0; $value4 = $value1; // input an array containing elements with reference variables $input = array( 0 = 10, 1 = $value4, 2 = $value2, 3 = 200, 4 = $value3, ); var_dump( array_sum($input) ); echo Done ? --EXPECTF-- *** Testing array_sum() : array with elements as reference *** int(305) Done --UEXPECTF-- *** Testing array_sum() : array with elements as reference *** int(305) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation6.phpt +++ php-src/ext/standard/tests/array/array_sum_variation6.phpt --TEST-- Test array_sum() function : usage variations - associative array --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Testing array_sum() with associative array as 'input' argument */ echo *** Testing array_sum() : with associative array ***\n; // array with numeric keys $input = array(0 = 1, 1 = 10, 2 = 0, 3 = -2, 4 = 23.56); echo -- with numeric keys --\n; var_dump( array_sum($input) ); // array with string keys $input = array('a' = 20, b = 50, 'c' = 0, 'd' = -30, e = 100); echo -- with string keys --\n; var_dump( array_sum($input) ); echo Done ? --EXPECTF-- *** Testing array_sum() : with associative array *** -- with numeric keys -- float(32.56) -- with string keys -- int(140) Done --UEXPECTF-- *** Testing array_sum() : with associative array *** -- with numeric keys -- float(32.56) -- with string keys -- int(140) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation7.phpt +++ php-src/ext/standard/tests/array/array_sum_variation7.phpt --TEST-- Test array_sum() function : usage variations - 'input' array with unexpected values as array element --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Testing array_sum() with array having other than numeric entries *strings, bool, null, subarrays, objects */ echo *** Testing array_sum() : array with unexpected entries ***\n; // empty array $input = array(); echo -- empty array --\n; var_dump( array_sum($input) ); // string array $input = array('Apple', 'Banana', 'Carrot', 'Mango', 'Orange'); echo -- array with string values --\n; var_dump( array_sum($input) ); // bool array $input = array( true, true, false, true, false); echo -- array with bool values --\n; var_dump( array_sum($input) ); // array with null entry $input = array(null, NULL); echo -- array with null values --\n; var_dump( array_sum($input) ); // array with subarray $input = array( array(1, 2), array(), array(0) ); echo -- array with subarrays --\n; var_dump( array_sum($input) ); class MyClass { public $value; public function __construct($value) { $this-value = $value; } } // array of objects $input = array( new MyClass(2), new MyClass(5), new MyClass(10), new MyClass(0) ); echo -- array with object values --\n; var_dump( array_sum($input) ); // Mixed values $input = array( 5, -8, 7.2, -1.2, 10, apple, 'Mango', true, false, null, NULL, array( array(1,2), array(0), array())); echo -- array with mixed values --\n; var_dump( array_sum($input) ); echo Done ? --EXPECTF-- *** Testing array_sum() : array with unexpected entries *** -- empty
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_sum_basic.phpt array_sum_error.phpt array_sum_variation1.phpt array_sum_variation2.phpt array_sum_variation3.phpt array_sum_variation4.phpt array
kraghubaTue Nov 27 14:57:55 2007 UTC Added files: /php-src/ext/standard/tests/array array_sum_variation1.phpt array_sum_basic.phpt array_sum_variation2.phpt array_sum_variation3.phpt array_sum_variation4.phpt array_sum_variation5.phpt array_sum_variation6.phpt array_sum_variation7.phpt array_sum_error.phpt Log: New testcases for array_sum() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_sum_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_sum_variation1.phpt +++ php-src/ext/standard/tests/array/array_sum_variation1.phpt --TEST-- Test array_sum() function : usage variations - unexpected values for 'input' argument --FILE-- ?php /* Prototype : mixed array_sum(array $input) * Description: Returns the sum of the array entries * Source code: ext/standard/array.c */ /* * Passing different scalar/nonscalar values as 'input' argument to array_sum() */ echo *** Testing array_sum() : unexpected values for 'input' ***\n; // get an unset variable $unset_var = 10; unset ($unset_var); // Class definition class MyClass { public function __toString() { return object; } } // different scalar/non scalar values for 'input' argument $input_values = array( // int data /* 1 */ 0, 1, 12345, /* 4 */ -2345, // float data /* 5 */ 10.5, -10.5, 10.1234567e8, 10.7654321E-8, /* 9 */ .5, // null data /* 10*/ NULL, null, // boolean data /* 12*/ true, false, TRUE, FALSE, // empty data /* 16*/ , '', // string data /* 18*/ string, 'string', // object data /* 20*/ new MyClass(), // resource data $fp = fopen(__FILE__,'r'), // undefined data @$undefined_var, // unset data /* 23*/ @$unset_var, ); // loop through each element of the array for input for($count = 0; $count count($input_values); $count++) { echo -- Iteration .($count + 1). --\n; var_dump( array_sum($input_values[$count]) ); }; fclose($fp); echo Done ? --EXPECTF-- *** Testing array_sum() : unexpected values for 'input' *** -- Iteration 1 -- Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 2 -- Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 3 -- Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 4 -- Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 5 -- Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 6 -- Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 7 -- Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 8 -- Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 9 -- Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 10 -- Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 11 -- Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 12 -- Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 13 -- Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 14 -- Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 15 -- Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 16 -- Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 17 -- Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 18 -- Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 19 -- Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 20 -- Warning: array_sum() expects parameter 1 to be array, object given in %s on line %d NULL -- Iteration 21 -- Warning: array_sum() expects parameter 1 to be array, resource given in %s on line %d NULL -- Iteration 22 -- Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d NULL --
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_combine_basic.phpt array_combine_error1.phpt array_combine_error2.phpt array_combine_variation1.phpt array_combine_variation2.phpt array_combine_
kraghubaTue Nov 27 15:15:23 2007 UTC Added files: /php-src/ext/standard/tests/array array_combine_variation2.phpt array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt array_combine_variation6.phpt array_combine_basic.phpt array_combine_error1.phpt array_combine_error2.phpt array_combine_variation1.phpt Log: New testcases for array_combine() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_combine_variation2.phpt +++ php-src/ext/standard/tests/array/array_combine_variation2.phpt --TEST-- Test array_combine() function : usage variations - unexpected values for 'values' argument --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) * Description: Creates an array by using the elements of the first parameter as keys * and the elements of the second as the corresponding values * Source code: ext/standard/array.c */ /* * Testing array_combine() function by passing values to $values argument other than arrays * and see that function emits proper warning messages wherever expected. * The $keys argument passed is a fixed array. */ echo *** Testing array_combine() : Passing non-array values to \$values argument ***\n; // Initialize $keys array $keys = array(1, 2); //get an unset variable $unset_var = 10; unset($unset_var); // get a class class classA { public function __toString() { return Class A object; } } // heredoc string $heredoc = EOT hello world EOT; // get a resource variable $fp = fopen(__FILE__, r); // unexpected values to be passed to $values argument $values_passed = array( // int data /*1*/ 0, 1, 12345, -2345, // float data /*5*/ 10.5, -10.5, 12.3456789000e10, 12.3456789000E-10, .5, // null data /*10*/ NULL, null, // boolean data /*12*/ true, false, TRUE, FALSE, // empty data /*16*/ , '', // string data /*18*/ string, 'string', $heredoc, // object data /*21*/ new classA(), // undefined data /*22*/ @$undefined_var, // unset data /*23*/ @$unset_var, // resource variable /*24*/ $fp ); // loop through each element within $values_passed to check the behavior of array_combine() $iterator = 1; foreach($values_passed as $values) { echo -- Iteration $iterator --\n; var_dump( array_combine($keys,$values) ); $iterator++; }; echo Done; ? --EXPECTF-- *** Testing array_combine() : Passing non-array values to $values argument *** -- Iteration 1 -- Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d NULL -- Iteration 2 -- Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d NULL -- Iteration 3 -- Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d NULL -- Iteration 4 -- Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d NULL -- Iteration 5 -- Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d NULL -- Iteration 6 -- Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d NULL -- Iteration 7 -- Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d NULL -- Iteration 8 -- Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d NULL -- Iteration 9 -- Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d NULL -- Iteration 10 -- Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d NULL -- Iteration 11 -- Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d NULL -- Iteration 12 -- Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d NULL -- Iteration 13 -- Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d NULL -- Iteration 14 -- Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d NULL -- Iteration 15 -- Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d NULL -- Iteration 16 -- Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d NULL -- Iteration 17 -- Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d NULL -- Iteration 18 --
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_combine_basic.phpt array_combine_error1.phpt array_combine_error2.phpt array_combine_variation1.phpt array_combine_variation2.phpt array
kraghubaTue Nov 27 15:17:07 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_combine_error1.phpt array_combine_error2.phpt array_combine_variation1.phpt array_combine_variation2.phpt array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt array_combine_basic.phpt array_combine_variation6.phpt Log: New testcases for array_combine() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_combine_error1.phpt +++ php-src/ext/standard/tests/array/array_combine_error1.phpt --TEST-- Test array_combine() function : error conditions --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) * Description: Creates an array by using the elements of the first parameter as keys * and the elements of the second as the corresponding values * Source code: ext/standard/array.c */ echo *** Testing array_combine() : error conditions ***\n; // Zero arguments echo \n-- Testing array_combine() function with Zero arguments --\n; var_dump( array_combine() ); //Test array_combine with one more than the expected number of arguments echo \n-- Testing array_combine() function with more than expected no. of arguments --\n; $keys = array(1, 2); $values = array(1, 2); $extra_arg = 10; var_dump( array_combine($keys,$values, $extra_arg) ); // Testing array_combine with one less than the expected number of arguments echo \n-- Testing array_combine() function with less than expected no. of arguments --\n; $keys = array(1, 2); var_dump( array_combine($keys) ); echo Done; ? --EXPECTF-- *** Testing array_combine() : error conditions *** -- Testing array_combine() function with Zero arguments -- Warning: array_combine() expects exactly 2 parameters, 0 given in %s on line %d NULL -- Testing array_combine() function with more than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 3 given in %s on line %d NULL -- Testing array_combine() function with less than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 1 given in %s on line %d NULL Done --UEXPECTF-- *** Testing array_combine() : error conditions *** -- Testing array_combine() function with Zero arguments -- Warning: array_combine() expects exactly 2 parameters, 0 given in %s on line %d NULL -- Testing array_combine() function with more than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 3 given in %s on line %d NULL -- Testing array_combine() function with less than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 1 given in %s on line %d NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_error2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_combine_error2.phpt +++ php-src/ext/standard/tests/array/array_combine_error2.phpt --TEST-- Test array_combine() function : error conditions - empty array --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) * Description: Creates an array by using the elements of the first parameter as keys * and the elements of the second as the corresponding values * Source code: ext/standard/array.c */ echo *** Testing array_combine() : error conditions specific to array_combine() ***\n; // Testing array_combine by passing empty arrays to $keys and $values arguments echo \n-- Testing array_combine() function with empty arrays --\n; var_dump( array_combine(array(), array()) ); // Testing array_combine by passing empty array to $keys echo \n-- Testing array_combine() function with empty array for \$keys argument --\n; var_dump( array_combine(array(), array(1, 2)) ); // Testing array_combine by passing empty array to $values echo \n-- Testing array_combine() function with empty array for \$values argument --\n; var_dump( array_combine(array(1, 2), array()) ); // Testing array_combine with arrays having unequal number of elements echo \n-- Testing array_combine() function by passing array with unequal number of elements --\n; var_dump( array_combine(array(1, 2), array(1, 2, 3)) ); echo Done; ? --EXPECTF-- *** Testing array_combine() : error conditions specific to array_combine() *** -- Testing array_combine() function with empty arrays -- Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d bool(false) -- Testing array_combine() function with empty array for $keys argument --
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_combine_basic.phpt array_combine_error1.phpt array_combine_error2.phpt array_combine_variation1.phpt array_combine_variation2.phpt array
kraghubaTue Nov 27 15:18:11 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_combine_error1.phpt array_combine_error2.phpt array_combine_variation1.phpt array_combine_variation2.phpt array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt array_combine_variation6.phpt array_combine_basic.phpt Log: New testcases for array_combine() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_combine_error1.phpt +++ php-src/ext/standard/tests/array/array_combine_error1.phpt --TEST-- Test array_combine() function : error conditions --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) * Description: Creates an array by using the elements of the first parameter as keys * and the elements of the second as the corresponding values * Source code: ext/standard/array.c */ echo *** Testing array_combine() : error conditions ***\n; // Zero arguments echo \n-- Testing array_combine() function with Zero arguments --\n; var_dump( array_combine() ); //Test array_combine with one more than the expected number of arguments echo \n-- Testing array_combine() function with more than expected no. of arguments --\n; $keys = array(1, 2); $values = array(1, 2); $extra_arg = 10; var_dump( array_combine($keys,$values, $extra_arg) ); // Testing array_combine with one less than the expected number of arguments echo \n-- Testing array_combine() function with less than expected no. of arguments --\n; $keys = array(1, 2); var_dump( array_combine($keys) ); echo Done; ? --EXPECTF-- *** Testing array_combine() : error conditions *** -- Testing array_combine() function with Zero arguments -- Warning: array_combine() expects exactly 2 parameters, 0 given in %s on line %d NULL -- Testing array_combine() function with more than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 3 given in %s on line %d NULL -- Testing array_combine() function with less than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 1 given in %s on line %d NULL Done --UEXPECTF-- *** Testing array_combine() : error conditions *** -- Testing array_combine() function with Zero arguments -- Warning: array_combine() expects exactly 2 parameters, 0 given in %s on line %d NULL -- Testing array_combine() function with more than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 3 given in %s on line %d NULL -- Testing array_combine() function with less than expected no. of arguments -- Warning: array_combine() expects exactly 2 parameters, 1 given in %s on line %d NULL Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_error2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_combine_error2.phpt +++ php-src/ext/standard/tests/array/array_combine_error2.phpt --TEST-- Test array_combine() function : error conditions - empty array --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) * Description: Creates an array by using the elements of the first parameter as keys * and the elements of the second as the corresponding values * Source code: ext/standard/array.c */ echo *** Testing array_combine() : error conditions specific to array_combine() ***\n; // Testing array_combine by passing empty arrays to $keys and $values arguments echo \n-- Testing array_combine() function with empty arrays --\n; var_dump( array_combine(array(), array()) ); // Testing array_combine by passing empty array to $keys echo \n-- Testing array_combine() function with empty array for \$keys argument --\n; var_dump( array_combine(array(), array(1, 2)) ); // Testing array_combine by passing empty array to $values echo \n-- Testing array_combine() function with empty array for \$values argument --\n; var_dump( array_combine(array(1, 2), array()) ); // Testing array_combine with arrays having unequal number of elements echo \n-- Testing array_combine() function by passing array with unequal number of elements --\n; var_dump( array_combine(array(1, 2), array(1, 2, 3)) ); echo Done; ? --EXPECTF-- *** Testing array_combine() : error conditions specific to array_combine() *** -- Testing array_combine() function with empty arrays -- Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d bool(false) -- Testing array_combine() function with empty array for $keys argument --
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt
kraghubaWed Nov 28 03:42:43 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt Log: Marked with defect http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation3.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation3.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1.4.2 php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1.4.3 --- php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1.4.2 Tue Nov 27 15:18:11 2007 +++ php-src/ext/standard/tests/array/array_combine_variation3.phpt Wed Nov 28 03:42:43 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - different arrays +Test array_combine() function : usage variations - different arrays(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation4.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation4.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1.4.2 php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1.4.3 --- php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1.4.2 Tue Nov 27 15:18:11 2007 +++ php-src/ext/standard/tests/array/array_combine_variation4.phpt Wed Nov 28 03:42:43 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - associative array with different keys +Test array_combine() function : usage variations - associative array with different keys(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation5.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation5.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1.4.2 php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1.4.3 --- php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1.4.2 Tue Nov 27 15:18:11 2007 +++ php-src/ext/standard/tests/array/array_combine_variation5.phpt Wed Nov 28 03:42:43 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - associative array with different values +Test array_combine() function : usage variations - associative array with different values(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt
kraghubaWed Nov 28 03:44:52 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt Log: Marked with defect http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation3.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation3.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1.2.2 Tue Nov 27 15:17:07 2007 +++ php-src/ext/standard/tests/array/array_combine_variation3.phpt Wed Nov 28 03:44:52 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - different arrays +Test array_combine() function : usage variations - different arrays(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation4.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation4.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1.2.2 Tue Nov 27 15:17:07 2007 +++ php-src/ext/standard/tests/array/array_combine_variation4.phpt Wed Nov 28 03:44:52 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - associative array with different keys +Test array_combine() function : usage variations - associative array with different keys(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation5.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation5.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1.2.2 Tue Nov 27 15:17:07 2007 +++ php-src/ext/standard/tests/array/array_combine_variation5.phpt Wed Nov 28 03:44:52 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - associative array with different values +Test array_combine() function : usage variations - associative array with different values(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt
kraghubaWed Nov 28 03:46:25 2007 UTC Modified files: /php-src/ext/standard/tests/array array_combine_variation3.phpt array_combine_variation4.phpt array_combine_variation5.phpt Log: Marked with defect http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation3.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation3.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1 php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.2 --- php-src/ext/standard/tests/array/array_combine_variation3.phpt:1.1 Tue Nov 27 15:15:23 2007 +++ php-src/ext/standard/tests/array/array_combine_variation3.phpt Wed Nov 28 03:46:25 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - different arrays +Test array_combine() function : usage variations - different arrays(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation4.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation4.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1 php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.2 --- php-src/ext/standard/tests/array/array_combine_variation4.phpt:1.1 Tue Nov 27 15:15:23 2007 +++ php-src/ext/standard/tests/array/array_combine_variation4.phpt Wed Nov 28 03:46:25 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - associative array with different keys +Test array_combine() function : usage variations - associative array with different keys(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_combine_variation5.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_combine_variation5.phpt diff -u php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1 php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.2 --- php-src/ext/standard/tests/array/array_combine_variation5.phpt:1.1 Tue Nov 27 15:15:23 2007 +++ php-src/ext/standard/tests/array/array_combine_variation5.phpt Wed Nov 28 03:46:25 2007 @@ -1,5 +1,5 @@ --TEST-- -Test array_combine() function : usage variations - associative array with different values +Test array_combine() function : usage variations - associative array with different values(Bug#43424) --FILE-- ?php /* Prototype : array array_combine(array $keys, array $values) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array krsort_variation3.phpt ksort_variation3.phpt
kraghubaFri Nov 16 17:11:01 2007 UTC Modified files: /php-src/ext/standard/tests/array ksort_variation3.phpt krsort_variation3.phpt Log: fix tests: removed values that generate diff. output on Linux64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/ksort_variation3.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/ksort_variation3.phpt diff -u php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1 php-src/ext/standard/tests/array/ksort_variation3.phpt:1.2 --- php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1 Mon Nov 12 15:49:29 2007 +++ php-src/ext/standard/tests/array/ksort_variation3.phpt Fri Nov 16 17:11:01 2007 @@ -27,11 +27,7 @@ // mixed value array with different types of keys array(1 = .0001, 2 = .0021, -3 = -.01, 4 = -1, 5 = 0, 6 = .09, 7 = 2, -8 = -.9, -9 = 10.6E-2, -10 = -10.6E-2, 11 = 33), - - // array keys contains minimum and maximum ranges - array( 2147483647 = 1 , 2147483648 = 2, -2147483647 = 3, -2147483648 = 4, -0 = 5) - +9 = 10.6E-2, -10 = -10.6E-2, 11 = 33) ); // set of possible flag values @@ -263,44 +259,6 @@ [11]= int(33) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} Done --UEXPECTF-- *** Testing ksort() : usage variations *** @@ -504,42 +462,4 @@ [11]= int(33) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/krsort_variation3.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/krsort_variation3.phpt diff -u php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1 php-src/ext/standard/tests/array/krsort_variation3.phpt:1.2 --- php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1 Mon Nov 12 15:44:47 2007 +++ php-src/ext/standard/tests/array/krsort_variation3.phpt Fri Nov 16 17:11:01 2007 @@ -27,10 +27,7 @@ // mixed value array with different types of keys array(1 = .0001, 2 = .0021, -3 = -.01, 4 = -1, 5 = 0, 6 = .09, 7 = 2, -8 = -.9, 9 = 10.6E-2, --10 = -10.6E-2, 11 = 33), - - // array keys contains minimum and maximum ranges - array( 2147483647 = 1 , 2147483648 = 2, -2147483647 = 3, -2147483648 = 4, -0 = 5) +-10 = -10.6E-2, 11 = 33) ); // set of possible flag values @@ -262,44 +259,6 @@ [-10]= float(-0.106) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} Done --UEXPECTF-- *** Testing krsort() : usage variations *** @@ -503,42 +462,4 @@ [-10]= float(-0.106) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array sizeof_basic1.phpt sizeof_basic2.phpt sizeof_error.phpt sizeof_object1.phpt sizeof_object2.phpt sizeof_variation1.phpt sizeof_variation2.phpt
kraghubaFri Nov 16 17:55:55 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array sizeof_object2.phpt sizeof_basic1.phpt sizeof_basic2.phpt sizeof_error.phpt sizeof_variation1.phpt sizeof_variation2.phpt sizeof_variation3.phpt sizeof_variation4.phpt sizeof_variation5.phpt sizeof_object1.phpt Log: New testcases for sizeof() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sizeof_object2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/sizeof_object2.phpt +++ php-src/ext/standard/tests/array/sizeof_object2.phpt --TEST-- Test sizeof() function : object functionality - objects without Countable interface --FILE-- ?php /* Prototype : int sizeof($mixed var[, int $mode] ) * Description: Counts an elements in an array. If Standard PHP library is installed, * it will return the properties of an object. * Source code: ext/standard/basic_functions.c * Alias to functions: count() */ echo *** Testing sizeof() : object functionality ***\n; echo --- Testing sizeof() with objects which doesn't implement Countable interface ---\n; // class without member class test { // no members } // class with only members and with out member functions class test1 { public $member1; var $var1; private $member2; protected $member3; // no member functions } // class with only member functions class test2 { // no data members public function display() { echo Class Name : test2\n; } } // child class which inherits parent test2 class child_test2 extends test2 { public $child_member1; private $child_member2; } // abstract class abstract class abstract_class { public $member1; private $member2; abstract protected function display(); } // implement abstract 'abstract_class' class class concrete_class extends abstract_class { protected function display() { echo class name is : concrete_class \n ; } } $objects = array ( /* 1 */ new test(), new test1(), new test2(), new child_test2(), /* 5 */ new concrete_class() ); $counter = 1; for($i = 0; $i count($objects); $i++) { echo -- Iteration $counter --\n; $var = $objects[$i]; echo Default Mode: ; var_dump( sizeof($var) ); echo \n; echo COUNT_NORMAL Mode: ; var_dump( sizeof($var, COUNT_NORMAL) ); echo \n; echo COUNT_RECURSIVE Mode: ; var_dump( sizeof($var, COUNT_RECURSIVE) ); echo \n; $counter++; } echo Done; ? --EXPECTF-- *** Testing sizeof() : object functionality *** --- Testing sizeof() with objects which doesn't implement Countable interface --- -- Iteration 1 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 2 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 3 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 4 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 5 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) Done --UEXPECTF-- *** Testing sizeof() : object functionality *** --- Testing sizeof() with objects which doesn't implement Countable interface --- -- Iteration 1 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 2 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 3 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 4 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 5 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sizeof_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/sizeof_basic1.phpt +++ php-src/ext/standard/tests/array/sizeof_basic1.phpt --TEST-- Test sizeof() function : basic functionality - for scalar types --FILE-- ?php /* Prototype : int sizeof(mixed $var[, int $mode] ) * Description: Counts an elements in an array. If Standard PHP library is * installed, it will return the properties of an object. * Source code: ext/standard/basic_functions.c * Alias to functions: count() */ /* Testing the sizeof() for some of the scalar types(integer, float) values * in default, COUNT_NORMAL and COUNT_RECURSIVE modes. */ echo *** Testing sizeof() : basic functionality ***\n; $intval = 10; $floatval = 10.5; $stringval = String; echo --
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array
Thanks Antony. I have committed the fixes. Please re-run and confirm. With Regards, Raghubansh Antony Dovgal [EMAIL PROTECTED] 14/11/07 07:14 PM To Raghubansh Kumar/India/[EMAIL PROTECTED] cc php-cvs@lists.php.net Subject Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array On 14.11.2007 16:40, Raghubansh Kumar wrote: Hi Antony, Could you pls send me the diff files for ksort and krsort failure that you mentioned ? Sure, see below. # cat ext/standard/tests/array/krsort_variation3.diff 206+ array(5) { 207+ [2147483648]= 208+ int(2) 206- array(4) { 218- array(4) { 220+ array(5) { 221+ [2147483648]= 222+ int(2) 230- array(4) { 234+ array(5) { 235+ [2147483648]= 236+ int(2) # cat ext/standard/tests/array/ksort_variation3.diff 206+ array(5) { 206- array(4) { 215+ [2147483648]= 216+ int(2) 218- array(4) { 220+ array(5) { 229+ [2147483648]= 230+ int(2) 230- array(4) { 234+ array(5) { 243+ [2147483648]= 244+ int(2) -- Wbr, Antony Dovgal
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array krsort_variation3.phpt ksort_variation3.phpt
kraghubaFri Nov 16 17:04:20 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array krsort_variation3.phpt ksort_variation3.phpt Log: fix tests: removed values that generate diff. output on Linux64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/krsort_variation3.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/array/krsort_variation3.phpt diff -u php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1.4.2 php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1.4.3 --- php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1.4.2 Mon Nov 12 15:54:35 2007 +++ php-src/ext/standard/tests/array/krsort_variation3.phpt Fri Nov 16 17:04:19 2007 @@ -27,10 +27,7 @@ // mixed value array with different types of keys array(1 = .0001, 2 = .0021, -3 = -.01, 4 = -1, 5 = 0, 6 = .09, 7 = 2, -8 = -.9, 9 = 10.6E-2, --10 = -10.6E-2, 11 = 33), - - // array keys contains minimum and maximum ranges - array( 2147483647 = 1 , 2147483648 = 2, -2147483647 = 3, -2147483648 = 4, -0 = 5) +-10 = -10.6E-2, 11 = 33) ); // set of possible flag values @@ -262,42 +259,4 @@ [-10]= float(-0.106) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/ksort_variation3.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/array/ksort_variation3.phpt diff -u php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1.4.2 php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1.4.3 --- php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1.4.2 Mon Nov 12 15:55:10 2007 +++ php-src/ext/standard/tests/array/ksort_variation3.phpt Fri Nov 16 17:04:19 2007 @@ -1,5 +1,5 @@ --TEST-- -Test ksort() function : usage variations - sort integer/float values (Bug - not raised) +Test ksort() function : usage variations - sort integer/float values --FILE-- ?php /* Prototype : bool ksort ( array $array [, int $sort_flags] ) @@ -27,11 +27,7 @@ // mixed value array with different types of keys array(1 = .0001, 2 = .0021, -3 = -.01, 4 = -1, 5 = 0, 6 = .09, 7 = 2, -8 = -.9, -9 = 10.6E-2, -10 = -10.6E-2, 11 = 33), - - // array keys contains minimum and maximum ranges - array( 2147483647 = 1 , 2147483648 = 2, -2147483647 = 3, -2147483648 = 4, -0 = 5) - +9 = 10.6E-2, -10 = -10.6E-2, 11 = 33) ); // set of possible flag values @@ -263,42 +259,4 @@ [11]= int(33) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array krsort_variation3.phpt ksort_variation3.phpt
kraghubaFri Nov 16 17:06:43 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array ksort_variation3.phpt krsort_variation3.phpt Log: fix tests: removed values that generate diff. output on Linux64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/ksort_variation3.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/ksort_variation3.phpt diff -u php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1.2.2 php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/ksort_variation3.phpt:1.1.2.2 Mon Nov 12 15:53:20 2007 +++ php-src/ext/standard/tests/array/ksort_variation3.phpt Fri Nov 16 17:06:43 2007 @@ -1,5 +1,5 @@ --TEST-- -Test ksort() function : usage variations - sort integer/float values (Bug - not raised) +Test ksort() function : usage variations - sort integer/float values --FILE-- ?php /* Prototype : bool ksort ( array $array [, int $sort_flags] ) @@ -27,11 +27,7 @@ // mixed value array with different types of keys array(1 = .0001, 2 = .0021, -3 = -.01, 4 = -1, 5 = 0, 6 = .09, 7 = 2, -8 = -.9, -9 = 10.6E-2, -10 = -10.6E-2, 11 = 33), - - // array keys contains minimum and maximum ranges - array( 2147483647 = 1 , 2147483648 = 2, -2147483647 = 3, -2147483648 = 4, -0 = 5) - +9 = 10.6E-2, -10 = -10.6E-2, 11 = 33) ); // set of possible flag values @@ -263,42 +259,4 @@ [11]= int(33) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [-2147483648]= - int(4) - [-2147483647]= - int(3) - [0]= - int(5) - [2147483647]= - int(1) -} Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/krsort_variation3.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/krsort_variation3.phpt diff -u php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1.2.2 php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/krsort_variation3.phpt:1.1.2.2 Mon Nov 12 15:52:25 2007 +++ php-src/ext/standard/tests/array/krsort_variation3.phpt Fri Nov 16 17:06:43 2007 @@ -27,10 +27,7 @@ // mixed value array with different types of keys array(1 = .0001, 2 = .0021, -3 = -.01, 4 = -1, 5 = 0, 6 = .09, 7 = 2, -8 = -.9, 9 = 10.6E-2, --10 = -10.6E-2, 11 = 33), - - // array keys contains minimum and maximum ranges - array( 2147483647 = 1 , 2147483648 = 2, -2147483647 = 3, -2147483648 = 4, -0 = 5) +-10 = -10.6E-2, 11 = 33) ); // set of possible flag values @@ -262,42 +259,4 @@ [-10]= float(-0.106) } - --- Iteration 4 -- -- With defualt sort flag - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_REGULAR - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} -- Sort flag = SORT_NUMERIC - -bool(true) -array(4) { - [2147483647]= - int(1) - [0]= - int(5) - [-2147483647]= - int(3) - [-2147483648]= - int(4) -} Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/strings strcspn_variation3.phpt strspn_variation3.phpt strspn_variation4.phpt
kraghubaFri Nov 16 17:35:38 2007 UTC Modified files: /php-src/ext/standard/tests/strings strcspn_variation3.phpt strspn_variation3.phpt strspn_variation4.phpt Log: fix test for linux64 - choosing smaller float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcspn_variation3.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/strings/strcspn_variation3.phpt diff -u php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.3 php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.4 --- php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.3 Fri Nov 9 07:29:18 2007 +++ php-src/ext/standard/tests/strings/strcspn_variation3.phpt Fri Nov 16 17:35:38 2007 @@ -43,8 +43,8 @@ // float data 10.5, -10.5, - 10.1234567e10, - 10.7654321E-10, + 10.1234567e8, + 10.7654321E-8, .5, // array data @@ -109,11 +109,11 @@ int(0) int(0) --- Iteration with start value as 101234567000 -- -int(0) -int(0) +-- Iteration with start value as 1012345670 -- +bool(false) +bool(false) --- Iteration with start value as 1.07654321E-9 -- +-- Iteration with start value as 1.07654321E-7 -- int(0) int(0) @@ -252,11 +252,11 @@ int(0) int(0) --- Iteration with start value as 101234567000 -- -int(0) -int(0) +-- Iteration with start value as 1012345670 -- +bool(false) +bool(false) --- Iteration with start value as 1.07654321E-9 -- +-- Iteration with start value as 1.07654321E-7 -- int(0) int(0) @@ -376,7 +376,7 @@ int(0) int(0) --- Iteration with start value as Resource id #5 -- +-- Iteration with start value as Resource id #%d -- Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d NULL http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strspn_variation3.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/strspn_variation3.phpt diff -u php-src/ext/standard/tests/strings/strspn_variation3.phpt:1.2 php-src/ext/standard/tests/strings/strspn_variation3.phpt:1.3 --- php-src/ext/standard/tests/strings/strspn_variation3.phpt:1.2 Fri Nov 9 07:29:18 2007 +++ php-src/ext/standard/tests/strings/strspn_variation3.phpt Fri Nov 16 17:35:38 2007 @@ -43,8 +43,8 @@ // float data 10.5, -10.5, - 10.1234567e10, - 10.7654321E-10, + 10.1234567e8, + 10.7654321E-8, .5, // array data @@ -109,11 +109,11 @@ int(2) int(2) --- Iteration with start value as 101234567000 -- -int(2) -int(2) +-- Iteration with start value as 1012345670 -- +bool(false) +bool(false) --- Iteration with start value as 1.07654321E-9 -- +-- Iteration with start value as 1.07654321E-7 -- int(2) int(2) @@ -252,11 +252,11 @@ int(2) int(2) --- Iteration with start value as 101234567000 -- -int(2) -int(2) +-- Iteration with start value as 1012345670 -- +bool(false) +bool(false) --- Iteration with start value as 1.07654321E-9 -- +-- Iteration with start value as 1.07654321E-7 -- int(2) int(2) @@ -376,7 +376,7 @@ int(2) int(2) --- Iteration with start value as Resource id #5 -- +-- Iteration with start value as Resource id #%d -- Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d NULL http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strspn_variation4.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/strspn_variation4.phpt diff -u php-src/ext/standard/tests/strings/strspn_variation4.phpt:1.2 php-src/ext/standard/tests/strings/strspn_variation4.phpt:1.3 --- php-src/ext/standard/tests/strings/strspn_variation4.phpt:1.2 Fri Nov 9 07:29:18 2007 +++ php-src/ext/standard/tests/strings/strspn_variation4.phpt Fri Nov 16 17:35:38 2007 @@ -43,8 +43,8 @@ // float data 10.5, -10.5, - 10.1234567e10, - 10.7654321E-10, + 10.1234567e8, + 10.7654321E-8, .5, // array data @@ -106,10 +106,10 @@ -- Iteration with len value as -10.5 -- int(0) --- Iteration with len value as 101234567000 -- -int(0) +-- Iteration with len value as 1012345670 -- +int(2) --- Iteration with len value as 1.07654321E-9 -- +-- Iteration with len value as 1.07654321E-7 -- int(0) -- Iteration with len value as 0.5 -- @@ -203,10 +203,10 @@ -- Iteration with len value as -10.5 -- int(0) --- Iteration with len value as 101234567000 -- -int(0) +-- Iteration with len value as 1012345670 -- +int(2) --- Iteration with len value as 1.07654321E-9 -- +-- Iteration with len value as 1.07654321E-7 -- int(0) -- Iteration with len value as 0.5 -- @@ -286,7 +286,7 @@ -- Iteration with len value as -- int(0) --- Iteration with len value as Resource id #5 -- +-- Iteration with len value as Resource id #%d -- Warning: strspn() expects parameter 4 to be long, resource given in %s on
[PHP-CVS] cvs: php-src /ext/standard/tests/array sizeof_basic1.phpt sizeof_basic2.phpt sizeof_error.phpt sizeof_object1.phpt sizeof_object2.phpt sizeof_variation1.phpt sizeof_variation2.phpt sizeof_va
kraghubaFri Nov 16 17:52:26 2007 UTC Added files: /php-src/ext/standard/tests/array sizeof_variation1.phpt sizeof_variation2.phpt sizeof_variation3.phpt sizeof_object1.phpt sizeof_variation4.phpt sizeof_object2.phpt sizeof_variation5.phpt sizeof_basic1.phpt sizeof_basic2.phpt sizeof_error.phpt Log: New testcases for sizeof() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sizeof_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/sizeof_variation1.phpt +++ php-src/ext/standard/tests/array/sizeof_variation1.phpt --TEST-- Test sizeof() function : usage variations - for all scalar types and resource variable --FILE-- ?php /* Prototype : int sizeof($mixed var[, int $mode]) * Description: Counts an elements in an array. If Standard PHP library is installed, * it will return the properties of an object. * Source code: ext/standard/basic_functions.c * Alias to functions: count() */ echo *** Testing sizeof() : usage variations ***\n; echo --- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode ---\n; // get a resource variable $fp = fopen(__FILE__, r); // array containing all scalar types $values = array ( // int values /* 1 */ 0, 1, // float values /* 3 */ 10.5, -10.5, 12.3456789000e10, 12.3456789000E-10, /* 7 */ .5, // NULL values /* 8 */ NULL, null, // boolean values /* 10 */ TRUE, FALSE, true, /* 13 */ false, // string data /* 14 */ , '', string, /* 17 */ 'string', // undefined variable @$undefined_var, // resource variable /* 19 */ $fp ); // loop through the each value of the array for 'var' argument and check the behaviour of sizeof() $counter = 1; for($i = 0; $i count($values); $i++) { echo -- Iteration $counter --\n; $var = $values[$i]; echo Default Mode: ; var_dump( sizeof($var) ); echo \n; echo COUNT_NORMAL Mode: ; var_dump( sizeof($var, COUNT_NORMAL) ); echo \n; echo COUNT_RECURSIVE Mode: ; var_dump( sizeof($var, COUNT_RECURSIVE) ); echo \n; $counter++; } echo Done; ? --EXPECTF-- *** Testing sizeof() : usage variations *** --- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode --- -- Iteration 1 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 2 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 3 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 4 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 5 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 6 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 7 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 8 -- Default Mode: int(0) COUNT_NORMAL Mode: int(0) COUNT_RECURSIVE Mode: int(0) -- Iteration 9 -- Default Mode: int(0) COUNT_NORMAL Mode: int(0) COUNT_RECURSIVE Mode: int(0) -- Iteration 10 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 11 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 12 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 13 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 14 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 15 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 16 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 17 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration 18 -- Default Mode: int(0) COUNT_NORMAL Mode: int(0) COUNT_RECURSIVE Mode: int(0) -- Iteration 19 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) Done --UEXPECTF-- *** Testing sizeof() : usage variations *** --- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode --- -- Iteration 1 -- Default Mode: int(1) COUNT_NORMAL Mode: int(1) COUNT_RECURSIVE Mode: int(1) -- Iteration
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array sizeof_basic1.phpt sizeof_basic2.phpt sizeof_error.phpt sizeof_object1.phpt sizeof_object2.phpt sizeof_variation1.phpt sizeof_variation2.phpt
kraghubaFri Nov 16 17:54:31 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array sizeof_object1.phpt sizeof_basic2.phpt sizeof_object2.phpt sizeof_error.phpt sizeof_variation1.phpt sizeof_variation2.phpt sizeof_variation3.phpt sizeof_variation4.phpt sizeof_variation5.phpt sizeof_basic1.phpt Log: New testcases for sizeof() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sizeof_object1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/sizeof_object1.phpt +++ php-src/ext/standard/tests/array/sizeof_object1.phpt --TEST-- Test sizeof() function : objects - object with Countable interface --SKIPIF-- ?php // Skip the test case if Standard PHP Library(spl) is not installed if( !extension_loaded('spl') ) { die('skip SPL not installed'); } ? --FILE-- ?php /* Prototype : int sizeof($mixed var[, int $mode]) * Description: Counts an elements in an array. If Standard PHP library is installed, * it will return the properties of an object. * Source code: ext/standard/basic_functions.c * Alias to functions: count() */ echo *** Testing sizeof() with object functionality ***\n; echo -- Testing sizeof() with an object which implements Countable interface --\n; class sizeof_class implements Countable { public $member1; private $member2; protected $member3; public function count() { return 3; // return the count of member variables in the object } } $obj = new sizeof_class(); echo -- Testing sizeof() in default mode --\n; var_dump( sizeof($obj) ); echo -- Testing sizeof() in COUNT_NORMAL mode --\n; var_dump( sizeof($obj, COUNT_NORMAL) ); echo -- Testing sizeof() in COUNT_RECURSIVE mode --\n; var_dump( sizeof($obj, COUNT_RECURSIVE) ); echo Done; ? --EXPECTF-- *** Testing sizeof() with object functionality *** -- Testing sizeof() with an object which implements Countable interface -- -- Testing sizeof() in default mode -- int(3) -- Testing sizeof() in COUNT_NORMAL mode -- int(3) -- Testing sizeof() in COUNT_RECURSIVE mode -- int(3) Done --UEXPECTF-- *** Testing sizeof() with object functionality *** -- Testing sizeof() with an object which implements Countable interface -- -- Testing sizeof() in default mode -- int(3) -- Testing sizeof() in COUNT_NORMAL mode -- int(3) -- Testing sizeof() in COUNT_RECURSIVE mode -- int(3) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sizeof_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/sizeof_basic2.phpt +++ php-src/ext/standard/tests/array/sizeof_basic2.phpt --TEST-- Test sizeof() function : basic functionality - for non-scalar type(array) --FILE-- ?php /* Prototype : int sizeof(mixed $var[, int $mode] ) * Description: Counts an elements in an array. If Standard PHP library is * installed, it will return the properties of an object. * Source code: ext/standard/basic_functions.c * Alias to functions: count() */ /* Testing the sizeof() for non-scalar type(array) value * in default, COUNT_NORMAL and COUNT_RECURSIVE modes. * Sizeof() has been tested for simple integer, string, * indexed and mixed arrays. */ echo *** Testing sizeof() : basic functionality ***\n; $int_array = array(1, 2, 3, 4); $string_array = array(Saffron, White, Green); $indexed_array = array(Agression = Saffron, Peace = White, Growth = Green); $mixed_array = array(1, 2, Aggression = Saffron, 10 = Ten, Ten = 10); echo -- Testing sizeof() with integer array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n; echo default mode: ; var_dump( sizeof($int_array) ); echo \n; echo COUNT_NORMAL mode: ; var_dump( sizeof($int_array, COUNT_NORMAL) ); echo \n; echo COUNT_RECURSIVE mode: ; var_dump( sizeof($int_array, COUNT_RECURSIVE) ); echo \n; echo -- Testing sizeof() with string array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n; echo default mode: ; var_dump( sizeof($string_array) ); echo \n; echo COUNT_NORMAL mode: ; var_dump( sizeof($string_array, COUNT_NORMAL) ); echo \n; echo COUNT_RECURSIVE mode: ; var_dump( sizeof($string_array, COUNT_RECURSIVE) ); echo \n; echo -- Testing sizeof() with indexed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n; echo default mode: ; var_dump( sizeof($indexed_array) ); echo \n; echo COUNT_NORMAL mode: ; var_dump( sizeof($indexed_array, COUNT_NORMAL) ); echo \n; echo COUNT_RECURSIVE mode: ; var_dump( sizeof($indexed_array, COUNT_RECURSIVE) ); echo \n; echo -- Testing sizeof() with mixed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --\n; echo default mode: ; var_dump( sizeof($mixed_array)
Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array
Hi Antony, Could you pls send me the diff files for ksort and krsort failure that you mentioned ? With Regards, Raghubansh Antony Dovgal [EMAIL PROTECTED] 13/11/07 04:49 AM To Raghubansh Kumar [EMAIL PROTECTED] cc php-cvs@lists.php.net, SoftVirus [EMAIL PROTECTED], Raghubansh Kumar/India/[EMAIL PROTECTED] Subject Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array These tests fail on Linux 64bit: ext/standard/tests/array/krsort_variation3.phpt ext/standard/tests/array/ksort_variation3.phpt ..as well as already mentioned.. ext/standard/tests/strings/strcspn_variation3.phpt ext/standard/tests/strings/strspn_variation3.phpt ext/standard/tests/strings/strspn_variation4.phpt -- Wbr, Antony Dovgal
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings strcspn_variation3.phpt strspn_variation3.phpt strspn_variation4.phpt
kraghubaWed Nov 14 16:30:10 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings strcspn_variation3.phpt strspn_variation3.phpt strspn_variation4.phpt Log: fix test for linux64 - choosing smaller float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcspn_variation3.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/strings/strcspn_variation3.phpt diff -u php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.1.2.2 php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.1.2.3 --- php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.1.2.2 Fri Nov 9 07:09:52 2007 +++ php-src/ext/standard/tests/strings/strcspn_variation3.phpt Wed Nov 14 16:30:09 2007 @@ -1,243 +1,243 @@ ---TEST-- -Test strcspn() function : usage variations - unexpected values of start argument ---FILE-- -?php -/* Prototype : proto int strcspn(string str, string mask [,int start [,int len]]) - * Description: Finds length of initial segment consisting entirely of characters not found in mask. -If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars) - * Source code: ext/standard/string.c - * Alias to functions: none -*/ - -error_reporting(E_ALL ~E_NOTICE); - -/* -* Testing strcspn() : with unexpected values of start argument -*/ - -echo *** Testing strcspn() : with unexpected values of start argument ***\n; - -// initialing required variables -$str = 'string_val'; -$mask = 'soibtFTf1234567890'; -$len = 10; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// declaring class -class sample { - public function __toString() { -return object; - } -} - -// creating a file resource -$file_handle = fopen(__FILE__, 'r'); - - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' = 'red', 'item' = 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - , - '', - - // string data - string, - 'string', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for start - -foreach($values as $value) { - echo \n-- Iteration with start value as \$value\ --\n; - var_dump( strcspn($str,$mask,$value) ); // with default len value - var_dump( strcspn($str,$mask,$value,$len) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo Done -? ---EXPECTF-- -*** Testing strcspn() : with unexpected values of start argument *** - --- Iteration with start value as 10.5 -- -int(0) -int(0) - --- Iteration with start value as -10.5 -- -int(0) -int(0) - --- Iteration with start value as 101234567000 -- -int(0) -int(0) - --- Iteration with start value as 1.07654321E-9 -- -int(0) -int(0) - --- Iteration with start value as 0.5 -- -int(0) -int(0) - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line 89 -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as 1 -- -int(0) -int(0) - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as 1 -- -int(0) -int(0) - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as -- - -Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d -NULL - -Warning: strcspn() expects
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings strcspn_variation3.phpt strspn_variation3.phpt strspn_variation4.phpt
kraghubaWed Nov 14 16:31:45 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings strcspn_variation3.phpt strspn_variation3.phpt strspn_variation4.phpt Log: fix test for linux64 - choosing smaller float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcspn_variation3.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/strcspn_variation3.phpt diff -u php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/strings/strcspn_variation3.phpt:1.1.2.1.2.1 Fri Nov 9 07:19:00 2007 +++ php-src/ext/standard/tests/strings/strcspn_variation3.phpt Wed Nov 14 16:31:45 2007 @@ -1,243 +1,243 @@ ---TEST-- -Test strcspn() function : usage variations - unexpected values of start argument ---FILE-- -?php -/* Prototype : proto int strcspn(string str, string mask [,int start [,int len]]) - * Description: Finds length of initial segment consisting entirely of characters not found in mask. -If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars) - * Source code: ext/standard/string.c - * Alias to functions: none -*/ - -error_reporting(E_ALL ~E_NOTICE); - -/* -* Testing strcspn() : with unexpected values of start argument -*/ - -echo *** Testing strcspn() : with unexpected values of start argument ***\n; - -// initialing required variables -$str = 'string_val'; -$mask = 'soibtFTf1234567890'; -$len = 10; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// declaring class -class sample { - public function __toString() { -return object; - } -} - -// creating a file resource -$file_handle = fopen(__FILE__, 'r'); - - -//array of values to iterate over -$values = array( - - // float data - 10.5, - -10.5, - 10.1234567e10, - 10.7654321E-10, - .5, - - // array data - array(), - array(0), - array(1), - array(1, 2), - array('color' = 'red', 'item' = 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - , - '', - - // string data - string, - 'string', - - // object data - new sample(), - - // undefined data - $undefined_var, - - // unset data - $unset_var, - - // resource - $file_handle -); - -// loop through each element of the array for start - -foreach($values as $value) { - echo \n-- Iteration with start value as \$value\ --\n; - var_dump( strcspn($str,$mask,$value) ); // with default len value - var_dump( strcspn($str,$mask,$value,$len) ); // with all args -}; - -// closing the resource -fclose($file_handle); - -echo Done -? ---EXPECTF-- -*** Testing strcspn() : with unexpected values of start argument *** - --- Iteration with start value as 10.5 -- -int(0) -int(0) - --- Iteration with start value as -10.5 -- -int(0) -int(0) - --- Iteration with start value as 101234567000 -- -int(0) -int(0) - --- Iteration with start value as 1.07654321E-9 -- -int(0) -int(0) - --- Iteration with start value as 0.5 -- -int(0) -int(0) - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line 89 -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as Array -- - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d -NULL - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as 1 -- -int(0) -int(0) - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as 1 -- -int(0) -int(0) - --- Iteration with start value as -- -int(0) -int(0) - --- Iteration with start value as -- - -Warning: strcspn() expects parameter 3 to be long, string given in %s on line %d -NULL -
Re: [PHP-CVS] cvs: php-src(PHP_5_3)
Hi Antony, I have committed fix for these failure. Please give a run on the linux-64bit machine and let me know how they go. With Regards, Raghubansh Antony Dovgal [EMAIL PROTECTED] 09/11/07 06:19 PM To Raghubansh Kumar [EMAIL PROTECTED] cc php-cvs@lists.php.net Subject Re: [PHP-CVS] cvs: php-src(PHP_5_3) The tests below do not pass anymore after the update (on Linux 64bit): ext/standard/tests/strings/strcspn_variation3.phpt # cat ext/standard/tests/strings/strcspn_variation3.diff 012+ bool(false) 013+ bool(false) 012- int(0) ext/standard/tests/strings/strspn_variation3.phpt # cat ext/standard/tests/strings/strspn_variation3.diff 012+ bool(false) 013+ bool(false) 012- int(2) 013- int(2) ext/standard/tests/strings/strspn_variation4.phpt # cat ext/standard/tests/strings/strspn_variation4.diff 010+ int(2) 010- int(0) On 09.11.2007 10:19, Raghubansh Kumar wrote: kraghuba Fri Nov 9 07:19:00 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings strspn_variation2.phpt chunk_split_variation1.phpt crc32_variation1.phpt strcspn_variation4.phpt strcspn_variation1.phpt strtok_variation1.phpt strspn_variation1.phpt chunk_split_variation2.phpt strspn_variation4.phpt strcspn_variation2.phpt chunk_split_variation3.phpt strspn_variation3.phpt strcspn_variation3.phpt ucwords_variation1.phpt Log: fix tests: better float values -- Wbr, Antony Dovgal
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array uasort_basic1.phpt uasort_basic2.phpt uasort_error.phpt uasort_object1.phpt uasort_object2.phpt uasort_variation1.phpt uasort_variation10.phpt
kraghubaWed Nov 14 17:17:50 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array uasort_error.phpt uasort_variation1.phpt uasort_variation2.phpt uasort_variation3.phpt uasort_variation4.phpt uasort_variation5.phpt uasort_basic1.phpt uasort_variation6.phpt uasort_variation7.phpt uasort_basic2.phpt uasort_variation8.phpt uasort_variation9.phpt uasort_object1.phpt uasort_variation10.phpt uasort_object2.phpt uasort_variation11.phpt Log: New testcases for uasort() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_error.phpt +++ php-src/ext/standard/tests/array/uasort_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation1.phpt +++ php-src/ext/standard/tests/array/uasort_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation2.phpt +++ php-src/ext/standard/tests/array/uasort_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation3.phpt +++ php-src/ext/standard/tests/array/uasort_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation4.phpt +++ php-src/ext/standard/tests/array/uasort_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation5.phpt +++ php-src/ext/standard/tests/array/uasort_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_basic1.phpt +++ php-src/ext/standard/tests/array/uasort_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation6.phpt +++ php-src/ext/standard/tests/array/uasort_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation7.phpt +++ php-src/ext/standard/tests/array/uasort_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_basic2.phpt +++ php-src/ext/standard/tests/array/uasort_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation8.phpt +++ php-src/ext/standard/tests/array/uasort_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation9.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation9.phpt +++ php-src/ext/standard/tests/array/uasort_variation9.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_object1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_object1.phpt +++ php-src/ext/standard/tests/array/uasort_object1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation10.phpt +++ php-src/ext/standard/tests/array/uasort_variation10.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_object2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_object2.phpt +++ php-src/ext/standard/tests/array/uasort_object2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation11.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation11.phpt +++ php-src/ext/standard/tests/array/uasort_variation11.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array uasort_basic1.phpt uasort_basic2.phpt uasort_error.phpt uasort_object1.phpt uasort_object2.phpt uasort_variation1.phpt uasort_variation10.phpt
kraghubaWed Nov 14 17:19:45 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array uasort_error.phpt uasort_variation1.phpt uasort_variation2.phpt uasort_variation3.phpt uasort_variation4.phpt uasort_variation5.phpt uasort_basic1.phpt uasort_variation6.phpt uasort_variation7.phpt uasort_basic2.phpt uasort_variation8.phpt uasort_variation9.phpt uasort_object1.phpt uasort_variation10.phpt uasort_object2.phpt uasort_variation11.phpt Log: New testcases for uasort() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_error.phpt +++ php-src/ext/standard/tests/array/uasort_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation1.phpt +++ php-src/ext/standard/tests/array/uasort_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation2.phpt +++ php-src/ext/standard/tests/array/uasort_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation3.phpt +++ php-src/ext/standard/tests/array/uasort_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation4.phpt +++ php-src/ext/standard/tests/array/uasort_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation5.phpt +++ php-src/ext/standard/tests/array/uasort_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_basic1.phpt +++ php-src/ext/standard/tests/array/uasort_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation6.phpt +++ php-src/ext/standard/tests/array/uasort_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation7.phpt +++ php-src/ext/standard/tests/array/uasort_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_basic2.phpt +++ php-src/ext/standard/tests/array/uasort_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation8.phpt +++ php-src/ext/standard/tests/array/uasort_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation9.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation9.phpt +++ php-src/ext/standard/tests/array/uasort_variation9.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_object1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_object1.phpt +++ php-src/ext/standard/tests/array/uasort_object1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation10.phpt +++ php-src/ext/standard/tests/array/uasort_variation10.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_object2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_object2.phpt +++ php-src/ext/standard/tests/array/uasort_object2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/uasort_variation11.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/uasort_variation11.phpt +++ php-src/ext/standard/tests/array/uasort_variation11.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/strings join_variation1.phpt
kraghubaFri Nov 9 08:49:29 2007 UTC Modified files: /php-src/ext/standard/tests/strings join_variation1.phpt Log: fix test : better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/join_variation1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/join_variation1.phpt diff -u php-src/ext/standard/tests/strings/join_variation1.phpt:1.2 php-src/ext/standard/tests/strings/join_variation1.phpt:1.3 --- php-src/ext/standard/tests/strings/join_variation1.phpt:1.2 Tue Oct 9 11:51:48 2007 +++ php-src/ext/standard/tests/strings/join_variation1.phpt Fri Nov 9 08:49:28 2007 @@ -1,171 +1,171 @@ ---TEST-- -Test join() function : usage variations - unexpected values for 'glue' argument ---FILE-- -?php -/* Prototype : string join( string $glue, array $pieces ) - * Description: Join array elements with a string - * Source code: ext/standard/string.c - * Alias of function: implode() -*/ - -/* - * testing join() by passing different unexpected values for glue argument -*/ - -echo *** Testing join() : usage variations ***\n; -// initialize all required variables -$pieces = array(element1, element2); - -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// get a resource variable -$fp = fopen(__FILE__, r); - -// define a class -class test -{ - var $t = 10; - function __toString() { - return testObject; - } -} - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' = 'red', 'item' = 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new test(), - - // empty string - , - '', - - // null vlaues - NULL, - null, - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of join() -// when $glue arugment is supplied with different values -echo \n--- Testing join() by supplying different values for 'glue' argument ---\n; -$counter = 1; -for($index = 0; $index count($values); $index ++) { - echo -- Iteration $counter --\n; - $glue = $values [$index]; - - var_dump( join($glue, $pieces) ); - - $counter ++; -} - -echo Done\n; -? ---EXPECTF-- -*** Testing join() : usage variations *** - Testing join() by supplying different values for 'glue' argument --- --- Iteration 1 -- -string(17) element10element2 --- Iteration 2 -- -string(17) element11element2 --- Iteration 3 -- -string(21) element112345element2 --- Iteration 4 -- -string(21) element1-2345element2 --- Iteration 5 -- -string(20) element110.5element2 --- Iteration 6 -- -string(21) element1-10.5element2 --- Iteration 7 -- -string(28) element11050element2 --- Iteration 8 -- -string(23) element11.06E-9element2 --- Iteration 9 -- -string(19) element10.5element2 --- Iteration 10 -- - -Notice: Array to string conversion in %s on line %d -string(0) --- Iteration 11 -- - -Notice: Array to string conversion in %s on line %d -string(1) 0 --- Iteration 12 -- - -Notice: Array to string conversion in %s on line %d -string(1) 1 --- Iteration 13 -- - -Notice: Array to string conversion in %s on line %d -string(7) 1Array2 --- Iteration 14 -- - -Notice: Array to string conversion in %s on line %d -string(11) redArraypen --- Iteration 15 -- -string(17) element11element2 --- Iteration 16 -- -string(16) element1element2 --- Iteration 17 -- -string(17) element11element2 --- Iteration 18 -- -string(16) element1element2 --- Iteration 19 -- -string(26) element1testObjectelement2 --- Iteration 20 -- -string(16) element1element2 --- Iteration 21 -- -string(16) element1element2 --- Iteration 22 -- -string(16) element1element2 --- Iteration 23 -- -string(16) element1element2 --- Iteration 24 -- -string(%d) element1Resource id #%delement2 --- Iteration 25 -- -string(16) element1element2 --- Iteration 26 -- -string(16) element1element2 -Done ---UEXPECTF-- +--TEST-- +Test join() function : usage variations - unexpected values for 'glue' argument +--FILE-- +?php +/* Prototype : string join( string $glue, array $pieces ) + * Description: Join array elements with a string + * Source code: ext/standard/string.c + * Alias of function: implode() +*/ + +/* + * testing join() by passing different unexpected value for glue argument +*/ + +echo *** Testing join() : usage variations ***\n; +// initialize all required variables +$pieces = array(element1, element2); + +// get an unset variable +$unset_var = 'string_val'; +unset($unset_var); + +// get a resource variable +$fp = fopen(__FILE__, r); + +// define a class +class test +{ + var $t = 10; + function __toString() { + return testObject; + } +} + +// array with different values +$values = array ( + + // integer
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings join_variation1.phpt
kraghubaFri Nov 9 08:52:28 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings join_variation1.phpt Log: fix test : better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/join_variation1.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/standard/tests/strings/join_variation1.phpt diff -u php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.4.3 php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.4.4 --- php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.4.3 Tue Oct 9 11:04:17 2007 +++ php-src/ext/standard/tests/strings/join_variation1.phpt Fri Nov 9 08:52:27 2007 @@ -1,167 +1,167 @@ ---TEST-- -Test join() function : usage variations - unexpected values for 'glue' argument ---FILE-- -?php -/* Prototype : string join( string $glue, array $pieces ) - * Description: Join array elements with a string - * Source code: ext/standard/string.c - * Alias of function: implode() -*/ - -/* - * testing join() by passing different unexpected value for glue argument -*/ - -echo *** Testing join() : usage variations ***\n; -// initialize all required variables -$pieces = array(element1, element2); - -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// get a resource variable -$fp = fopen(__FILE__, r); - -// define a class -class test -{ - var $t = 10; - function __toString() { - return testObject; - } -} - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' = 'red', 'item' = 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new test(), - - // empty string - , - '', - - // null vlaues - NULL, - null, - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of join() -// when $glue arugment is supplied with different values -echo \n--- Testing join() by supplying different values for 'glue' argument ---\n; -$counter = 1; -for($index = 0; $index count($values); $index ++) { - echo -- Iteration $counter --\n; - $glue = $values [$index]; - - var_dump( join($glue, $pieces) ); - - $counter ++; -} - -echo Done\n; -? ---EXPECTF-- -*** Testing join() : usage variations *** - Testing join() by supplying different values for 'glue' argument --- --- Iteration 1 -- -string(17) element10element2 --- Iteration 2 -- -string(17) element11element2 --- Iteration 3 -- -string(21) element112345element2 --- Iteration 4 -- -string(21) element1-2345element2 --- Iteration 5 -- -string(20) element110.5element2 --- Iteration 6 -- -string(21) element1-10.5element2 --- Iteration 7 -- -string(28) element11050element2 --- Iteration 8 -- -string(23) element11.06E-9element2 --- Iteration 9 -- -string(19) element10.5element2 --- Iteration 10 -- - -Notice: Array to string conversion in %s on line %d -string(0) --- Iteration 11 -- - -Notice: Array to string conversion in %s on line %d -string(1) 0 --- Iteration 12 -- - -Notice: Array to string conversion in %s on line %d -string(1) 1 --- Iteration 13 -- - -Notice: Array to string conversion in %s on line %d -string(7) 1Array2 --- Iteration 14 -- - -Notice: Array to string conversion in %s on line %d -string(11) redArraypen --- Iteration 15 -- -string(17) element11element2 --- Iteration 16 -- -string(16) element1element2 --- Iteration 17 -- -string(17) element11element2 --- Iteration 18 -- -string(16) element1element2 --- Iteration 19 -- -string(26) element1testObjectelement2 --- Iteration 20 -- -string(16) element1element2 --- Iteration 21 -- -string(16) element1element2 --- Iteration 22 -- -string(16) element1element2 --- Iteration 23 -- -string(16) element1element2 --- Iteration 24 -- -string(%d) element1Resource id #%delement2 --- Iteration 25 -- -string(16) element1element2 --- Iteration 26 -- -string(16) element1element2 -Done +--TEST-- +Test join() function : usage variations - unexpected values for 'glue' argument +--FILE-- +?php +/* Prototype : string join( string $glue, array $pieces ) + * Description: Join array elements with a string + * Source code: ext/standard/string.c + * Alias of function: implode() +*/ + +/* + * testing join() by passing different unexpected value for glue argument +*/ + +echo *** Testing join() : usage variations ***\n; +// initialize all required variables +$pieces = array(element1, element2); + +// get an unset variable +$unset_var = 'string_val'; +unset($unset_var); + +// get a resource variable +$fp = fopen(__FILE__, r); + +// define a class +class test +{ + var $t = 10; + function __toString() { + return testObject; + } +} + +// array with different values +$values
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings join_variation1.phpt
kraghubaFri Nov 9 08:57:18 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings join_variation1.phpt Log: fix test: better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/join_variation1.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/standard/tests/strings/join_variation1.phpt diff -u php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.2.3 php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.2.4 --- php-src/ext/standard/tests/strings/join_variation1.phpt:1.1.2.3 Tue Oct 9 10:56:45 2007 +++ php-src/ext/standard/tests/strings/join_variation1.phpt Fri Nov 9 08:57:18 2007 @@ -1,167 +1,167 @@ ---TEST-- -Test join() function : usage variations - unexpected values for 'glue' argument ---FILE-- -?php -/* Prototype : string join( string $glue, array $pieces ) - * Description: Join array elements with a string - * Source code: ext/standard/string.c - * Alias of function: implode() -*/ - -/* - * testing join() by passing different unexpected value for glue argument -*/ - -echo *** Testing join() : usage variations ***\n; -// initialize all required variables -$pieces = array(element1, element2); - -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// get a resource variable -$fp = fopen(__FILE__, r); - -// define a class -class test -{ - var $t = 10; - function __toString() { - return testObject; - } -} - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' = 'red', 'item' = 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new test(), - - // empty string - , - '', - - // null vlaues - NULL, - null, - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop through each element of the array and check the working of join() -// when $glue arugment is supplied with different values -echo \n--- Testing join() by supplying different values for 'glue' argument ---\n; -$counter = 1; -for($index = 0; $index count($values); $index ++) { - echo -- Iteration $counter --\n; - $glue = $values [$index]; - - var_dump( join($glue, $pieces) ); - - $counter ++; -} - -echo Done\n; -? ---EXPECTF-- -*** Testing join() : usage variations *** - Testing join() by supplying different values for 'glue' argument --- --- Iteration 1 -- -string(17) element10element2 --- Iteration 2 -- -string(17) element11element2 --- Iteration 3 -- -string(21) element112345element2 --- Iteration 4 -- -string(21) element1-2345element2 --- Iteration 5 -- -string(20) element110.5element2 --- Iteration 6 -- -string(21) element1-10.5element2 --- Iteration 7 -- -string(28) element11050element2 --- Iteration 8 -- -string(23) element11.06E-9element2 --- Iteration 9 -- -string(19) element10.5element2 --- Iteration 10 -- - -Notice: Array to string conversion in %s on line %d -string(0) --- Iteration 11 -- - -Notice: Array to string conversion in %s on line %d -string(1) 0 --- Iteration 12 -- - -Notice: Array to string conversion in %s on line %d -string(1) 1 --- Iteration 13 -- - -Notice: Array to string conversion in %s on line %d -string(7) 1Array2 --- Iteration 14 -- - -Notice: Array to string conversion in %s on line %d -string(11) redArraypen --- Iteration 15 -- -string(17) element11element2 --- Iteration 16 -- -string(16) element1element2 --- Iteration 17 -- -string(17) element11element2 --- Iteration 18 -- -string(16) element1element2 --- Iteration 19 -- -string(26) element1testObjectelement2 --- Iteration 20 -- -string(16) element1element2 --- Iteration 21 -- -string(16) element1element2 --- Iteration 22 -- -string(16) element1element2 --- Iteration 23 -- -string(16) element1element2 --- Iteration 24 -- -string(%d) element1Resource id #%delement2 --- Iteration 25 -- -string(16) element1element2 --- Iteration 26 -- -string(16) element1element2 -Done +--TEST-- +Test join() function : usage variations - unexpected values for 'glue' argument +--FILE-- +?php +/* Prototype : string join( string $glue, array $pieces ) + * Description: Join array elements with a string + * Source code: ext/standard/string.c + * Alias of function: implode() +*/ + +/* + * testing join() by passing different unexpected value for glue argument +*/ + +echo *** Testing join() : usage variations ***\n; +// initialize all required variables +$pieces = array(element1, element2); + +// get an unset variable +$unset_var = 'string_val'; +unset($unset_var); + +// get a resource variable +$fp = fopen(__FILE__, r); + +// define a class +class test +{ + var $t = 10; + function __toString() { + return testObject; + } +} + +// array with different values +$values
[PHP-CVS] cvs: php-src /ext/standard/tests/strings str_replace.phpt stripos_variation10.phpt strrchr_variation10.phpt strrchr_variation11.phpt strrpos_variation10.phpt
kraghubaFri Nov 9 12:06:08 2007 UTC Modified files: /php-src/ext/standard/tests/strings strrchr_variation10.phpt stripos_variation10.phpt strrchr_variation11.phpt strrpos_variation10.phpt str_replace.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrchr_variation10.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/strrchr_variation10.phpt diff -u php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2 php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.3 --- php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2 Sat Sep 29 09:24:27 2007 +++ php-src/ext/standard/tests/strings/strrchr_variation10.phpt Fri Nov 9 12:06:07 2007 @@ -180,7 +180,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- @@ -243,7 +243,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripos_variation10.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/stripos_variation10.phpt diff -u php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2 php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.3 --- php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2 Sat Sep 29 09:22:42 2007 +++ php-src/ext/standard/tests/strings/stripos_variation10.phpt Fri Nov 9 12:06:08 2007 @@ -165,7 +165,7 @@ bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) @@ -254,7 +254,7 @@ bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrchr_variation11.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/strrchr_variation11.phpt diff -u php-src/ext/standard/tests/strings/strrchr_variation11.phpt:1.2 php-src/ext/standard/tests/strings/strrchr_variation11.phpt:1.3 --- php-src/ext/standard/tests/strings/strrchr_variation11.phpt:1.2 Sat Sep 29 09:24:27 2007 +++ php-src/ext/standard/tests/strings/strrchr_variation11.phpt Fri Nov 9 12:06:08 2007 @@ -80,8 +80,6 @@ $counter = 1; for($index = 0; $index count($values); $index ++) { echo -- Iteration $counter --\n; - $haystack = $values[$index]; - var_dump( strrchr($values[$index], $values[$index]) ); $counter ++; } @@ -151,7 +149,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- @@ -224,7 +222,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrpos_variation10.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/strrpos_variation10.phpt diff -u php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.2 php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.3 --- php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.2 Fri Oct 5 18:35:49 2007 +++ php-src/ext/standard/tests/strings/strrpos_variation10.phpt Fri Nov 9 12:06:08 2007 @@ -142,7 +142,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- @@ -205,7 +205,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_replace.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/strings/str_replace.phpt diff -u php-src/ext/standard/tests/strings/str_replace.phpt:1.4 php-src/ext/standard/tests/strings/str_replace.phpt:1.5 --- php-src/ext/standard/tests/strings/str_replace.phpt:1.4 Mon May 14 13:05:29 2007 +++ php-src/ext/standard/tests/strings/str_replace.phpt Fri Nov 9 12:06:08 2007 @@ -27,8 +27,9 @@ var_dump( $count ); $fp = fopen( __FILE__, r ); -var_dump( str_replace($fp, $fp, $fp, $fp) ); -var_dump( $fp ); +$fp_copy = $fp; +var_dump( str_replace($fp_copy, $fp_copy, $fp_copy, $fp_copy) ); +var_dump( $fp_copy ); echo \n*** Testing str_replace() with various search values ***; $search_arr = array( TRUE, FALSE, 1, 0, -1, 1, 0, -1, NULL, @@ -230,12 +231,11 @@ var_dump( str_replace(1, 2) ); var_dump( str_replace(1,2,3,$var,5) ); -echo Done\n; [EMAIL PROTECTED]($fp); [EMAIL PROTECTED]($resource1); [EMAIL PROTECTED]($resource2); ---CLEAN-- -fclose($fp); -fclose($resource1); -closedir($resource2); +echo Done\n; ? --EXPECTF-- @@ -956,721 +956,3 @@ Warning: str_replace() expects at most 4 parameters, 5 given in %s on line
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings str_replace.phpt stripos_variation10.phpt strpos.phpt strrchr_variation10.phpt strrchr_variation11.phpt strrpos_variation10.phpt strstr.phpt
kraghubaFri Nov 9 12:02:42 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings strrpos_variation10.phpt str_replace.phpt strstr.phpt strrchr_variation10.phpt stripos_variation10.phpt strrchr_variation11.phpt strpos.phpt Log: fix tests http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrpos_variation10.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/strings/strrpos_variation10.phpt diff -u php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.1.4.2 php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.1.4.3 --- php-src/ext/standard/tests/strings/strrpos_variation10.phpt:1.1.4.2 Fri Oct 5 18:33:23 2007 +++ php-src/ext/standard/tests/strings/strrpos_variation10.phpt Fri Nov 9 12:02:42 2007 @@ -41,8 +41,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -142,7 +142,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_replace.phpt?r1=1.1.2.6r2=1.1.2.6.2.1diff_format=u Index: php-src/ext/standard/tests/strings/str_replace.phpt diff -u php-src/ext/standard/tests/strings/str_replace.phpt:1.1.2.6 php-src/ext/standard/tests/strings/str_replace.phpt:1.1.2.6.2.1 --- php-src/ext/standard/tests/strings/str_replace.phpt:1.1.2.6 Fri May 18 11:29:55 2007 +++ php-src/ext/standard/tests/strings/str_replace.phpt Fri Nov 9 12:02:42 2007 @@ -27,8 +27,10 @@ var_dump( $count ); $fp = fopen( __FILE__, r ); -var_dump( str_replace($fp, $fp, $fp, $fp) ); -var_dump( $fp ); +$fp_copy = $fp; +var_dump( str_replace($fp_copy, $fp_copy, $fp_copy, $fp_copy) ); +var_dump( $fp_copy ); +fclose($fp); echo \n*** Testing str_replace() with various search values ***; $search_arr = array( TRUE, FALSE, 1, 0, -1, 1, 0, -1, NULL, @@ -230,12 +232,9 @@ var_dump( str_replace(1, 2) ); var_dump( str_replace(1,2,3,$var,5) ); -echo Done\n; - ---CLEAN-- -fclose($fp); fclose($resource1); closedir($resource2); +echo Done\n; ? --EXPECTF-- @@ -248,7 +247,7 @@ int(1) string(0) int(0) -string(14) Resource id #5 +string(%d) Resource id #%d int(1) *** Testing str_replace() with various search values *** @@ -910,9 +909,9 @@ int(1) -- Testing Resources -- -string(14) Resource id #6 +string(%d) Resource id #%d int(0) -string(14) Resource id #7 +string(%d) Resource id #%d int(0) -- Testing a longer and heredoc string -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strstr.phpt?r1=1.2.6.1.2.1r2=1.2.6.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/strstr.phpt diff -u php-src/ext/standard/tests/strings/strstr.phpt:1.2.6.1.2.1 php-src/ext/standard/tests/strings/strstr.phpt:1.2.6.1.2.2 --- php-src/ext/standard/tests/strings/strstr.phpt:1.2.6.1.2.1 Sun Sep 30 14:37:33 2007 +++ php-src/ext/standard/tests/strings/strstr.phpt Fri Nov 9 12:02:42 2007 @@ -337,8 +337,8 @@ string(20) !$%**()%**[][[[@#~! -- passing Resources as string and needle -- -bool(false) -bool(false) +%s +%s -- Posiibilities with null -- bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strrchr_variation10.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/strrchr_variation10.phpt diff -u php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2.2.2 php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2.2.3 --- php-src/ext/standard/tests/strings/strrchr_variation10.phpt:1.2.2.2 Sat Sep 29 16:59:07 2007 +++ php-src/ext/standard/tests/strings/strrchr_variation10.phpt Fri Nov 9 12:02:42 2007 @@ -79,8 +79,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -180,7 +180,7 @@ -- Iteration 23 -- bool(false) -- Iteration 24 -- -bool(false) +%s -- Iteration 25 -- bool(false) -- Iteration 26 -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripos_variation10.phpt?r1=1.2.2.3r2=1.2.2.4diff_format=u Index: php-src/ext/standard/tests/strings/stripos_variation10.phpt diff -u php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2.2.3 php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2.2.4 --- php-src/ext/standard/tests/strings/stripos_variation10.phpt:1.2.2.3 Sun Sep 30 14:37:33 2007 +++ php-src/ext/standard/tests/strings/stripos_variation10.phpt Fri Nov 9 12:02:42 2007 @@ -41,8 +41,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -182,7 +182,7 @@ -- Iteration 24 -- Warning:
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings sprintf_variation6.phpt sprintf_variation7.phpt sprintf_variation8.phpt sprintf_variation9.phpt
kraghubaFri Nov 9 04:20:10 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings sprintf_variation6.phpt sprintf_variation7.phpt sprintf_variation8.phpt sprintf_variation9.phpt Log: missing testcases - sprintf() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sprintf_variation6.phpt +++ php-src/ext/standard/tests/strings/sprintf_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sprintf_variation7.phpt +++ php-src/ext/standard/tests/strings/sprintf_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sprintf_variation8.phpt +++ php-src/ext/standard/tests/strings/sprintf_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation9.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sprintf_variation9.phpt +++ php-src/ext/standard/tests/strings/sprintf_variation9.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array sort_object2.phpt
kraghubaMon Nov 5 16:19:55 2007 UTC Modified files: /php-src/ext/standard/tests/array sort_object2.phpt Log: Fix test title http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sort_object2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/sort_object2.phpt diff -u php-src/ext/standard/tests/array/sort_object2.phpt:1.1 php-src/ext/standard/tests/array/sort_object2.phpt:1.2 --- php-src/ext/standard/tests/array/sort_object2.phpt:1.1 Mon Nov 5 15:17:10 2007 +++ php-src/ext/standard/tests/array/sort_object2.phpt Mon Nov 5 16:19:55 2007 @@ -1,9 +1,5 @@ --TEST-- - .mine -Test sort() function : object functionality - sorting objects with diff. accessiblity of member vars -=== -Test sort() function : usage variations - sorting objects with diff. accessiblity of member vars - .r17831 +Test sort() function : object functionality - sorting objects with diff. accessibility of member vars --FILE-- ?php /* Prototype : bool sort ( array $array [, int $sort_flags] ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array sort_object2.phpt
kraghubaMon Nov 5 16:22:37 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array sort_object2.phpt Log: fix typo in title http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sort_object2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/array/sort_object2.phpt diff -u php-src/ext/standard/tests/array/sort_object2.phpt:1.1.2.2 php-src/ext/standard/tests/array/sort_object2.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/sort_object2.phpt:1.1.2.2 Mon Nov 5 15:30:49 2007 +++ php-src/ext/standard/tests/array/sort_object2.phpt Mon Nov 5 16:22:37 2007 @@ -1,5 +1,5 @@ --TEST-- -Test sort() function : object functionality - sorting objects with diff. accessiblity of member vars +Test sort() function : object functionality - sorting objects with diff. accessibility of member vars --FILE-- ?php /* Prototype : bool sort ( array $array [, int $sort_flags] ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array sort_object2.phpt
kraghubaMon Nov 5 16:24:37 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array sort_object2.phpt Log: better test title http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/sort_object2.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/array/sort_object2.phpt diff -u php-src/ext/standard/tests/array/sort_object2.phpt:1.1.4.2 php-src/ext/standard/tests/array/sort_object2.phpt:1.1.4.3 --- php-src/ext/standard/tests/array/sort_object2.phpt:1.1.4.2 Mon Nov 5 15:38:03 2007 +++ php-src/ext/standard/tests/array/sort_object2.phpt Mon Nov 5 16:24:37 2007 @@ -1,5 +1,5 @@ --TEST-- -Test sort() function : object functionality - sorting objects, with diff. visibility modes, 'sort_flags' as defualt/SORT_REGULAR +Test sort() function : object functionality - sorting objects with diff. accessibility of member vars --FILE-- ?php /* Prototype : bool sort ( array $array [, int $sort_flags] ) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fileinode_variation.phpt filetype_variation.phpt
kraghubaFri Nov 2 03:16:22 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filefiletype_variation.phpt fileinode_variation.phpt Log: fix tests: proper temp file names http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/standard/tests/file/filetype_variation.phpt diff -u php-src/ext/standard/tests/file/filetype_variation.phpt:1.1.2.3 php-src/ext/standard/tests/file/filetype_variation.phpt:1.1.2.4 --- php-src/ext/standard/tests/file/filetype_variation.phpt:1.1.2.3 Tue Jun 5 11:35:04 2007 +++ php-src/ext/standard/tests/file/filetype_variation.phpt Fri Nov 2 03:16:22 2007 @@ -6,7 +6,7 @@ die('skip no link()/symlink() on Windows'); } if (!function_exists(posix_mkfifo)) { - die(skip no posix_mkfifo()); +die(skip no posix_mkfifo()); } ? --FILE-- @@ -17,39 +17,44 @@ dir, block, link, file, and unknown. */ -include file.inc; - echo *** Testing filetype() with various types ***\n; +$file_path = dirname(__FILE__); +$file1 = $file_path./filetype1_variation.tmp; +$file2 = $file_path./filetype2_variation.tmp; +$file3 = $file_path./filetype3_variation.tmp; +$link1 = $file_path./filetype1_variation_link.tmp; +$link2 = $file_path./filetype2_variation_link.tmp; -create_files( dirname(__FILE__), 2); +fclose( fopen($file1, w) ); +fclose( fopen($file2, w) ); echo -- Checking with files --\n; -print( filetype( dirname(__FILE__)./file1.tmp) ).\n; -print( filetype( dirname(__FILE__)./file2.tmp) ).\n; +print( filetype($file1) ).\n; +print( filetype($file2) ).\n; clearstatcache(); echo -- Checking with links: hardlink --\n; -link( dirname(__FILE__)./file1.tmp, dirname(__FILE__)./link1.tmp); -print( filetype( dirname(__FILE__)./link1.tmp ) ).\n; +link( $file1, $link1); +print( filetype($link1 ) ).\n; echo -- Checking with links: symlink --\n; -symlink( dirname(__FILE__)./file2.tmp, dirname(__FILE__)./link2.tmp); -print( filetype( dirname(__FILE__)./link2.tmp) ).\n; +symlink( $file2, $link2); +print( filetype($link2) ).\n; -delete_files( dirname(__FILE__), 2, link); +unlink($link1); +unlink($link2); +unlink($file1); +unlink($file2); -delete_files( dirname(__FILE__), 2, file); - -$file_path = dirname(__FILE__); echo -- Checking with directory --\n; -mkdir($file_path/temp); -print( filetype($file_path/temp) ).\n; -rmdir( $file_path/temp ); +mkdir($file_path/filetype_variation); +print( filetype($file_path/filetype_variation) ).\n; +rmdir( $file_path/filetype_variation ); echo -- Checking with fifo --\n; -posix_mkfifo( dirname(__FILE__)./file3.tmp, 0755); -print( filetype( dirname(__FILE__)./file3.tmp) ).\n; -delete_files( dirname(__FILE__), 1, file, 3); +posix_mkfifo( $file3, 0755); +print( filetype( $file3) ).\n; +unlink($file3); /* Checking with block in file */ /* To test this PEAR package should be installed */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileinode_variation.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/file/fileinode_variation.phpt diff -u php-src/ext/standard/tests/file/fileinode_variation.phpt:1.1.2.2 php-src/ext/standard/tests/file/fileinode_variation.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/fileinode_variation.phpt:1.1.2.2Tue Jun 5 11:35:04 2007 +++ php-src/ext/standard/tests/file/fileinode_variation.phptFri Nov 2 03:16:22 2007 @@ -5,6 +5,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip no link()/symlink() on Windows'); } +? --FILE-- ?php /* @@ -12,46 +13,52 @@ Description: Returns the inode number of the file, or FALSE in case of an error. */ -include file.inc; - echo *** Testing fileinode() with files, links and directories ***\n; +$file_path = dirname(__FILE__); +$file1 = $file_path./fileinode1_variation.tmp; +$file2 = $file_path./fileinode2_variation.tmp; +$link1 = $file_path./fileinode1_variation_link.tmp; +$link2 = $file_path./fileinode2_variation_link.tmp; + echo -- Testing with files --\n; -create_files( dirname(__FILE__), 2); +//creating the files +fclose( fopen( $file1, w ) ); +fclose( fopen( $file2, w ) ); -print( fileinode( dirname(__FILE__)./file1.tmp) ).\n; -print( fileinode( dirname(__FILE__)./file2.tmp) ).\n; +print( fileinode( $file1) ).\n; +print( fileinode( $file2) ).\n; clearstatcache(); echo -- Testing with links: hard link --\n; -link( dirname(__FILE__)./file1.tmp, dirname(__FILE__)./link1.tmp); // Creating an hard link -print( fileinode( dirname(__FILE__)./file1.tmp) ).\n; +link( $file1, $link1); // Creating an hard link +print( fileinode( $file1) ).\n; clearstatcache(); -print( fileinode( dirname(__FILE__)./link1.tmp) ).\n; +print( fileinode( $link1) ).\n; clearstatcache(); echo -- Testing with links: soft link --\n; -symlink( dirname(__FILE__)./file2.tmp, dirname(__FILE__)./link2.tmp); // Creating a soft link
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file fileinode_variation.phpt filetype_variation.phpt
kraghubaFri Nov 2 03:14:10 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filefileinode_variation.phpt filetype_variation.phpt Log: fix tests: proper temp file names http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileinode_variation.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u Index: php-src/ext/standard/tests/file/fileinode_variation.phpt diff -u php-src/ext/standard/tests/file/fileinode_variation.phpt:1.1.2.2 php-src/ext/standard/tests/file/fileinode_variation.phpt:1.1.2.2.2.1 --- php-src/ext/standard/tests/file/fileinode_variation.phpt:1.1.2.2Tue Jun 5 11:35:04 2007 +++ php-src/ext/standard/tests/file/fileinode_variation.phptFri Nov 2 03:14:10 2007 @@ -5,6 +5,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip no link()/symlink() on Windows'); } +? --FILE-- ?php /* @@ -12,46 +13,52 @@ Description: Returns the inode number of the file, or FALSE in case of an error. */ -include file.inc; - echo *** Testing fileinode() with files, links and directories ***\n; +$file_path = dirname(__FILE__); +$file1 = $file_path./fileinode1_variation.tmp; +$file2 = $file_path./fileinode2_variation.tmp; +$link1 = $file_path./fileinode1_variation_link.tmp; +$link2 = $file_path./fileinode2_variation_link.tmp; + echo -- Testing with files --\n; -create_files( dirname(__FILE__), 2); +//creating the files +fclose( fopen( $file1, w ) ); +fclose( fopen( $file2, w ) ); -print( fileinode( dirname(__FILE__)./file1.tmp) ).\n; -print( fileinode( dirname(__FILE__)./file2.tmp) ).\n; +print( fileinode( $file1) ).\n; +print( fileinode( $file2) ).\n; clearstatcache(); echo -- Testing with links: hard link --\n; -link( dirname(__FILE__)./file1.tmp, dirname(__FILE__)./link1.tmp); // Creating an hard link -print( fileinode( dirname(__FILE__)./file1.tmp) ).\n; +link( $file1, $link1); // Creating an hard link +print( fileinode( $file1) ).\n; clearstatcache(); -print( fileinode( dirname(__FILE__)./link1.tmp) ).\n; +print( fileinode( $link1) ).\n; clearstatcache(); echo -- Testing with links: soft link --\n; -symlink( dirname(__FILE__)./file2.tmp, dirname(__FILE__)./link2.tmp); // Creating a soft link -print( fileinode( dirname(__FILE__)./file2.tmp) ).\n; +symlink( $file2, $link2); // Creating a soft link +print( fileinode( $file2) ).\n; clearstatcache(); -print( fileinode( dirname(__FILE__)./link2.tmp) ).\n; +print( fileinode( $link2) ).\n; -delete_files( dirname(__FILE__), 2, link); +unlink( $link1 ); +unlink( $link2 ); echo -- Testing after copying a file --\n; -copy( dirname(__FILE__)./file1.tmp, dirname(__FILE__)./file1_new.tmp); -print( fileinode( dirname(__FILE__)./file1.tmp) ).\n; +copy( $file1, $file_path./fileinode1_variation_new.tmp); +print( fileinode( $file1) ).\n; clearstatcache(); -print( fileinode( dirname(__FILE__)./file1_new.tmp) ).\n; +print( fileinode( $file_path./fileinode1_variation_new.tmp) ).\n; -unlink( dirname(__FILE__)./file1_new.tmp); - -delete_files( dirname(__FILE__), 2); +unlink( $file_path./fileinode1_variation_new.tmp); +unlink( $file1); +unlink( $file2); echo -- Testing after renaming the file --\n; -$file_path = dirname(__FILE__); -fopen($file_path/old.txt, w); +fclose( fopen($file_path/old.txt, w) ); print( fileinode($file_path/old.txt) ).\n; clearstatcache(); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u Index: php-src/ext/standard/tests/file/filetype_variation.phpt diff -u php-src/ext/standard/tests/file/filetype_variation.phpt:1.1.2.3 php-src/ext/standard/tests/file/filetype_variation.phpt:1.1.2.3.2.1 --- php-src/ext/standard/tests/file/filetype_variation.phpt:1.1.2.3 Tue Jun 5 11:35:04 2007 +++ php-src/ext/standard/tests/file/filetype_variation.phpt Fri Nov 2 03:14:10 2007 @@ -6,7 +6,7 @@ die('skip no link()/symlink() on Windows'); } if (!function_exists(posix_mkfifo)) { - die(skip no posix_mkfifo()); +die(skip no posix_mkfifo()); } ? --FILE-- @@ -17,39 +17,44 @@ dir, block, link, file, and unknown. */ -include file.inc; - echo *** Testing filetype() with various types ***\n; +$file_path = dirname(__FILE__); +$file1 = $file_path./filetype1_variation.tmp; +$file2 = $file_path./filetype2_variation.tmp; +$file3 = $file_path./filetype3_variation.tmp; +$link1 = $file_path./filetype1_variation_link.tmp; +$link2 = $file_path./filetype2_variation_link.tmp; -create_files( dirname(__FILE__), 2); +fclose( fopen($file1, w) ); +fclose( fopen($file2, w) ); echo -- Checking with files --\n; -print( filetype( dirname(__FILE__)./file1.tmp) ).\n; -print( filetype( dirname(__FILE__)./file2.tmp) ).\n; +print( filetype($file1) ).\n; +print( filetype($file2) ).\n; clearstatcache(); echo -- Checking with links: hardlink --\n; -link( dirname(__FILE__)./file1.tmp, dirname(__FILE__)./link1.tmp); -print(
[PHP-CVS] cvs: php-src /ext/standard/tests/file fileinode_variation.phpt filetype_variation.phpt
kraghubaFri Nov 2 03:11:00 2007 UTC Modified files: /php-src/ext/standard/tests/filefiletype_variation.phpt fileinode_variation.phpt Log: fix tests: proper temp file names http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/file/filetype_variation.phpt diff -u php-src/ext/standard/tests/file/filetype_variation.phpt:1.5 php-src/ext/standard/tests/file/filetype_variation.phpt:1.6 --- php-src/ext/standard/tests/file/filetype_variation.phpt:1.5 Tue Jun 5 11:32:45 2007 +++ php-src/ext/standard/tests/file/filetype_variation.phpt Fri Nov 2 03:11:00 2007 @@ -6,7 +6,7 @@ die('skip no link()/symlink() on Windows'); } if (!function_exists(posix_mkfifo)) { - die(skip no posix_mkfifo()); +die(skip no posix_mkfifo()); } ? --FILE-- @@ -17,39 +17,44 @@ dir, block, link, file, and unknown. */ -include file.inc; - echo *** Testing filetype() with various types ***\n; +$file_path = dirname(__FILE__); +$file1 = $file_path./filetype1_variation.tmp; +$file2 = $file_path./filetype2_variation.tmp; +$file3 = $file_path./filetype3_variation.tmp; +$link1 = $file_path./filetype1_variation_link.tmp; +$link2 = $file_path./filetype2_variation_link.tmp; -create_files( dirname(__FILE__), 2); +fclose( fopen($file1, w) ); +fclose( fopen($file2, w) ); echo -- Checking with files --\n; -print( filetype( dirname(__FILE__)./file1.tmp) ).\n; -print( filetype( dirname(__FILE__)./file2.tmp) ).\n; +print( filetype($file1) ).\n; +print( filetype($file2) ).\n; clearstatcache(); echo -- Checking with links: hardlink --\n; -link( dirname(__FILE__)./file1.tmp, dirname(__FILE__)./link1.tmp); -print( filetype( dirname(__FILE__)./link1.tmp ) ).\n; +link( $file1, $link1); +print( filetype($link1 ) ).\n; echo -- Checking with links: symlink --\n; -symlink( dirname(__FILE__)./file2.tmp, dirname(__FILE__)./link2.tmp); -print( filetype( dirname(__FILE__)./link2.tmp) ).\n; +symlink( $file2, $link2); +print( filetype($link2) ).\n; -delete_files( dirname(__FILE__), 2, link); +unlink($link1); +unlink($link2); +unlink($file1); +unlink($file2); -delete_files( dirname(__FILE__), 2, file); - -$file_path = dirname(__FILE__); echo -- Checking with directory --\n; -mkdir($file_path/temp); -print( filetype($file_path/temp) ).\n; -rmdir( $file_path/temp ); +mkdir($file_path/filetype_variation); +print( filetype($file_path/filetype_variation) ).\n; +rmdir( $file_path/filetype_variation ); echo -- Checking with fifo --\n; -posix_mkfifo( dirname(__FILE__)./file3.tmp, 0755); -print( filetype( dirname(__FILE__)./file3.tmp) ).\n; -delete_files( dirname(__FILE__), 1, file, 3); +posix_mkfifo( $file3, 0755); +print( filetype( $file3) ).\n; +unlink($file3); /* Checking with block in file */ /* To test this PEAR package should be installed */ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileinode_variation.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/file/fileinode_variation.phpt diff -u php-src/ext/standard/tests/file/fileinode_variation.phpt:1.5 php-src/ext/standard/tests/file/fileinode_variation.phpt:1.6 --- php-src/ext/standard/tests/file/fileinode_variation.phpt:1.5Tue Jun 5 11:32:45 2007 +++ php-src/ext/standard/tests/file/fileinode_variation.phptFri Nov 2 03:11:00 2007 @@ -13,45 +13,52 @@ Description: Returns the inode number of the file, or FALSE in case of an error. */ -include file.inc; - echo *** Testing fileinode() with files, links and directories ***\n; +$file_path = dirname(__FILE__); +$file1 = $file_path./fileinode1_variation.tmp; +$file2 = $file_path./fileinode2_variation.tmp; +$link1 = $file_path./fileinode1_variation_link.tmp; +$link2 = $file_path./fileinode2_variation_link.tmp; + echo -- Testing with files --\n; -create_files( dirname(__FILE__), 2); +//creating the files +fclose( fopen( $file1, w ) ); +fclose( fopen( $file2, w ) ); -print( fileinode( dirname(__FILE__)./file1.tmp) ).\n; -print( fileinode( dirname(__FILE__)./file2.tmp) ).\n; +print( fileinode( $file1) ).\n; +print( fileinode( $file2) ).\n; clearstatcache(); echo -- Testing with links: hard link --\n; -link( dirname(__FILE__)./file1.tmp, dirname(__FILE__)./link1.tmp); // Creating an hard link -print( fileinode( dirname(__FILE__)./file1.tmp) ).\n; +link( $file1, $link1); // Creating an hard link +print( fileinode( $file1) ).\n; clearstatcache(); -print( fileinode( dirname(__FILE__)./link1.tmp) ).\n; +print( fileinode( $link1) ).\n; clearstatcache(); echo -- Testing with links: soft link --\n; -symlink( dirname(__FILE__)./file2.tmp, dirname(__FILE__)./link2.tmp); // Creating a soft link -print( fileinode( dirname(__FILE__)./file2.tmp) ).\n; +symlink( $file2, $link2); // Creating a soft link +print( fileinode( $file2) ).\n; clearstatcache(); -print( fileinode(
[PHP-CVS] cvs: php-src /ext/standard/tests/strings chop_variation1.phpt chop_variation2.phpt
kraghubaFri Nov 2 03:06:13 2007 UTC Modified files: /php-src/ext/standard/tests/strings chop_variation2.phpt chop_variation1.phpt Log: fix tests: better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation2.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/chop_variation2.phpt diff -u php-src/ext/standard/tests/strings/chop_variation2.phpt:1.2 php-src/ext/standard/tests/strings/chop_variation2.phpt:1.3 --- php-src/ext/standard/tests/strings/chop_variation2.phpt:1.2 Fri Sep 14 19:14:52 2007 +++ php-src/ext/standard/tests/strings/chop_variation2.phpt Fri Nov 2 03:06:13 2007 @@ -41,8 +41,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/strings/chop_variation1.phpt diff -u php-src/ext/standard/tests/strings/chop_variation1.phpt:1.2 php-src/ext/standard/tests/strings/chop_variation1.phpt:1.3 --- php-src/ext/standard/tests/strings/chop_variation1.phpt:1.2 Fri Sep 14 19:14:52 2007 +++ php-src/ext/standard/tests/strings/chop_variation1.phpt Fri Nov 2 03:06:13 2007 @@ -42,8 +42,8 @@ // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -128,11 +128,11 @@ string(5) -10.5 string(4) -10. -- Iteration 7 -- -string(12) 1050 +string(12) 101234567000 string(0) -- Iteration 8 -- -string(7) 1.06E-9 -string(6) 1.06E- +string(13) 1.07654321E-9 +string(12) 1.07654321E- -- Iteration 9 -- string(3) 0.5 string(2) 0. @@ -240,11 +240,11 @@ unicode(5) -10.5 unicode(4) -10. -- Iteration 7 -- -unicode(12) 1050 +unicode(12) 101234567000 unicode(0) -- Iteration 8 -- -unicode(7) 1.06E-9 -unicode(6) 1.06E- +unicode(13) 1.07654321E-9 +unicode(12) 1.07654321E- -- Iteration 9 -- unicode(3) 0.5 unicode(2) 0. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings chop_variation1.phpt chop_variation2.phpt
kraghubaFri Nov 2 03:00:18 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings chop_variation1.phpt chop_variation2.phpt Log: Fix test: better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation1.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/strings/chop_variation1.phpt diff -u php-src/ext/standard/tests/strings/chop_variation1.phpt:1.1.2.2 php-src/ext/standard/tests/strings/chop_variation1.phpt:1.1.2.3 --- php-src/ext/standard/tests/strings/chop_variation1.phpt:1.1.2.2 Tue Oct 9 12:12:19 2007 +++ php-src/ext/standard/tests/strings/chop_variation1.phpt Fri Nov 2 03:00:18 2007 @@ -1,210 +1,210 @@ ---TEST-- -Test chop() function : usage variations - unexpected values for str argument ---FILE-- -?php -/* Prototype : string chop ( string $str [, string $charlist] ) - * Description: Strip whitespace (or other characters) from the end of a string - * Source code: ext/standard/string.c -*/ - -/* - * Testing chop() : with different unexpected values for $str argument passed to the function -*/ - -echo *** Testing chop() : with unexpected values for str argument ***\n; -// initialize all required variables - -$charlist = @#$%1234567890; -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// declaring class -class sample { - public function __toString() { -return @#$%Object @#$%; - } -} -$sample_obj = new sample; - -// creating a file resource -$file_handle = fopen(__FILE__, 'r'); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' = 'red', 'item' = 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // empty string - , - '', - - // null vlaues - NULL, - null, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // object - $sample_obj, - - // resource - $file_handle -); - - -// loop through each element of the array and check the working of chop() -// when $str arugment is supplied with different values - -echo \n--- Testing chop() by supplying different values for 'str' argument ---\n; -$counter = 1; -for($index = 0; $index count($values); $index ++) { - echo -- Iteration $counter --\n; - $str = $values [$index]; - - var_dump( chop($str) ); - var_dump( chop($str, $charlist) ); - - $counter ++; -} - -// closing the resource -fclose( $file_handle); - -echo Done\n; -? ---EXPECTF-- -*** Testing chop() : with unexpected values for str argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - Testing chop() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) 0 -string(0) --- Iteration 2 -- -string(1) 1 -string(0) --- Iteration 3 -- -string(5) 12345 -string(0) --- Iteration 4 -- -string(5) -2345 -string(1) - --- Iteration 5 -- -string(4) 10.5 -string(3) 10. --- Iteration 6 -- -string(5) -10.5 -string(4) -10. --- Iteration 7 -- -string(12) 1050 -string(0) --- Iteration 8 -- -string(7) 1.06E-9 -string(6) 1.06E- --- Iteration 9 -- -string(3) 0.5 -string(2) 0. --- Iteration 10 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 11 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 12 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 13 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 14 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 15 -- -string(1) 1 -string(0) --- Iteration 16 -- -string(0) -string(0) --- Iteration 17 -- -string(1) 1 -string(0) --- Iteration 18 -- -string(0) -string(0) --- Iteration 19 -- -string(0) -string(0) --- Iteration 20 -- -string(0) -string(0) --- Iteration 21 -- -string(0) -string(0) --- Iteration 22 -- -string(0) -string(0) --- Iteration 23 -- -string(0) -string(0) --- Iteration 24 -- -string(0) -string(0) --- Iteration 25 -- -string(16) @#$%Object @#$% -string(11) @#$%Object --- Iteration 26 -- -string(%d) Resource id #%d -string(11) Resource id -Done +--TEST-- +Test chop() function : usage variations - unexpected values for str argument +--FILE-- +?php +/* Prototype : string chop (
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings chop_variation1.phpt chop_variation2.phpt
kraghubaFri Nov 2 03:03:26 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings chop_variation1.phpt chop_variation2.phpt Log: fix tests: better float values http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation1.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/chop_variation1.phpt diff -u php-src/ext/standard/tests/strings/chop_variation1.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/strings/chop_variation1.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/strings/chop_variation1.phpt:1.1.2.1.2.1 Tue Oct 9 12:17:48 2007 +++ php-src/ext/standard/tests/strings/chop_variation1.phpt Fri Nov 2 03:03:26 2007 @@ -1,210 +1,210 @@ ---TEST-- -Test chop() function : usage variations - unexpected values for str argument ---FILE-- -?php -/* Prototype : string chop ( string $str [, string $charlist] ) - * Description: Strip whitespace (or other characters) from the end of a string - * Source code: ext/standard/string.c -*/ - -/* - * Testing chop() : with different unexpected values for $str argument passed to the function -*/ - -echo *** Testing chop() : with unexpected values for str argument ***\n; -// initialize all required variables - -$charlist = @#$%1234567890; -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// declaring class -class sample { - public function __toString() { -return @#$%Object @#$%; - } -} -$sample_obj = new sample; - -// creating a file resource -$file_handle = fopen(__FILE__, 'r'); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' = 'red', 'item' = 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // empty string - , - '', - - // null vlaues - NULL, - null, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // object - $sample_obj, - - // resource - $file_handle -); - - -// loop through each element of the array and check the working of chop() -// when $str arugment is supplied with different values - -echo \n--- Testing chop() by supplying different values for 'str' argument ---\n; -$counter = 1; -for($index = 0; $index count($values); $index ++) { - echo -- Iteration $counter --\n; - $str = $values [$index]; - - var_dump( chop($str) ); - var_dump( chop($str, $charlist) ); - - $counter ++; -} - -// closing the resource -fclose( $file_handle); - -echo Done\n; -? ---EXPECTF-- -*** Testing chop() : with unexpected values for str argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - Testing chop() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) 0 -string(0) --- Iteration 2 -- -string(1) 1 -string(0) --- Iteration 3 -- -string(5) 12345 -string(0) --- Iteration 4 -- -string(5) -2345 -string(1) - --- Iteration 5 -- -string(4) 10.5 -string(3) 10. --- Iteration 6 -- -string(5) -10.5 -string(4) -10. --- Iteration 7 -- -string(12) 1050 -string(0) --- Iteration 8 -- -string(7) 1.06E-9 -string(6) 1.06E- --- Iteration 9 -- -string(3) 0.5 -string(2) 0. --- Iteration 10 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 11 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 12 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 13 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 14 -- - -Notice: Array to string conversion in %s on line %d -string(5) Array - -Notice: Array to string conversion in %s on line %d -string(5) Array --- Iteration 15 -- -string(1) 1 -string(0) --- Iteration 16 -- -string(0) -string(0) --- Iteration 17 -- -string(1) 1 -string(0) --- Iteration 18 -- -string(0) -string(0) --- Iteration 19 -- -string(0) -string(0) --- Iteration 20 -- -string(0) -string(0) --- Iteration 21 -- -string(0) -string(0) --- Iteration 22 -- -string(0) -string(0) --- Iteration 23 -- -string(0) -string(0) --- Iteration 24 -- -string(0) -string(0) --- Iteration 25 -- -string(16) @#$%Object @#$% -string(11) @#$%Object --- Iteration 26 -- -string(%d) Resource id #%d -string(11) Resource id -Done +--TEST-- +Test chop() function : usage variations - unexpected values for str argument +--FILE-- +?php +/* Prototype :
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file file_basic.phpt file_variation.phpt
kraghubaFri Nov 2 03:56:02 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filefile_basic.phpt file_variation.phpt Log: fix tests: proper temp file names http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_basic.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u Index: php-src/ext/standard/tests/file/file_basic.phpt diff -u php-src/ext/standard/tests/file/file_basic.phpt:1.1.2.2 php-src/ext/standard/tests/file/file_basic.phpt:1.1.2.2.2.1 --- php-src/ext/standard/tests/file/file_basic.phpt:1.1.2.2 Wed Jun 6 12:53:58 2007 +++ php-src/ext/standard/tests/file/file_basic.phpt Fri Nov 2 03:56:02 2007 @@ -13,17 +13,17 @@ $filetypes = array(numeric, text, empty, text_with_new_line); foreach( $filetypes as $type ) { - create_files($file_path, 1, $type, 0755, 100, w, file, 1, byte); - print_r( file($file_path./file1.tmp) ); - delete_files($file_path, 1); + create_files($file_path, 1, $type, 0755, 100, w, file_basic, 1, byte); + print_r( file($file_path./file_basic1.tmp) ); + delete_files($file_path, 1, file_basic); } echo *** Testing for return type of file function ***\n; foreach( $filetypes as $type ) { - create_files($file_path, 1, $type); - $ret_arr = file($file_path./file1.tmp); + create_files($file_path, 1, $type, 0755, 1, w, file_basic); + $ret_arr = file($file_path./file_basic1.tmp); var_dump( is_array($ret_arr) ); - delete_files($file_path, 1); + delete_files($file_path, 1, file_basic); } echo \n--- Done ---; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_variation.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u Index: php-src/ext/standard/tests/file/file_variation.phpt diff -u php-src/ext/standard/tests/file/file_variation.phpt:1.1.2.2 php-src/ext/standard/tests/file/file_variation.phpt:1.1.2.2.2.1 --- php-src/ext/standard/tests/file/file_variation.phpt:1.1.2.2 Wed Jun 6 12:53:58 2007 +++ php-src/ext/standard/tests/file/file_variation.phpt Fri Nov 2 03:56:02 2007 @@ -10,7 +10,7 @@ $file_path = dirname(__FILE__); require($file_path./file.inc); -$filename = $file_path./file.tmp; +$filename = $file_path./file_variation.tmp; $data_array = array( Garbage data, Gar\nba\nge d\nata, Gar\n\nbage \n\n data ); @@ -27,18 +27,18 @@ } echo *** Testing with variation in use_include_path argument ***\n; -$dir = /file; +$dir = /file_variation; $file_path = dirname(__FILE__).$dir; mkdir($file_path); ini_set( 'include_path', $file_path ); -$filename = $file_path./file1.tmp; +$filename = $file_path./file1_variation.tmp; $buffer_types = array(text, numeric, alphanumeric, text_with_new_line); foreach( $buffer_types as $type) { fill_buffer($buffer, $type, 100); file_put_contents($filename, $buffer ); - var_dump( file(file1.tmp, FILE_USE_INCLUDE_PATH) ); + var_dump( file(file1_variation.tmp, FILE_USE_INCLUDE_PATH) ); var_dump( file($filename, FILE_IGNORE_NEW_LINES) ); var_dump( file($filename, FILE_SKIP_EMPTY_LINES) ); @@ -52,11 +52,11 @@ // Removing the temporary files and directory $file_path = dirname(__FILE__); -unlink($file_path./file.tmp); +unlink($file_path./file_variation.tmp); -$dir = /file; +$dir = /file_variation; $file_path = dirname(__FILE__).$dir; -unlink($file_path./file1.tmp); +unlink($file_path./file1_variation.tmp); rmdir($file_path); ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file file_basic.phpt file_variation.phpt
kraghubaFri Nov 2 03:54:06 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filefile_variation.phpt file_basic.phpt Log: fix tests: proper temp file names http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_variation.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/file/file_variation.phpt diff -u php-src/ext/standard/tests/file/file_variation.phpt:1.1.2.2 php-src/ext/standard/tests/file/file_variation.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/file_variation.phpt:1.1.2.2 Wed Jun 6 12:53:58 2007 +++ php-src/ext/standard/tests/file/file_variation.phpt Fri Nov 2 03:54:05 2007 @@ -10,7 +10,7 @@ $file_path = dirname(__FILE__); require($file_path./file.inc); -$filename = $file_path./file.tmp; +$filename = $file_path./file_variation.tmp; $data_array = array( Garbage data, Gar\nba\nge d\nata, Gar\n\nbage \n\n data ); @@ -27,18 +27,18 @@ } echo *** Testing with variation in use_include_path argument ***\n; -$dir = /file; +$dir = /file_variation; $file_path = dirname(__FILE__).$dir; mkdir($file_path); ini_set( 'include_path', $file_path ); -$filename = $file_path./file1.tmp; +$filename = $file_path./file1_variation.tmp; $buffer_types = array(text, numeric, alphanumeric, text_with_new_line); foreach( $buffer_types as $type) { fill_buffer($buffer, $type, 100); file_put_contents($filename, $buffer ); - var_dump( file(file1.tmp, FILE_USE_INCLUDE_PATH) ); + var_dump( file(file1_variation.tmp, FILE_USE_INCLUDE_PATH) ); var_dump( file($filename, FILE_IGNORE_NEW_LINES) ); var_dump( file($filename, FILE_SKIP_EMPTY_LINES) ); @@ -52,11 +52,11 @@ // Removing the temporary files and directory $file_path = dirname(__FILE__); -unlink($file_path./file.tmp); +unlink($file_path./file_variation.tmp); -$dir = /file; +$dir = /file_variation; $file_path = dirname(__FILE__).$dir; -unlink($file_path./file1.tmp); +unlink($file_path./file1_variation.tmp); rmdir($file_path); ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_basic.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/file/file_basic.phpt diff -u php-src/ext/standard/tests/file/file_basic.phpt:1.1.2.2 php-src/ext/standard/tests/file/file_basic.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/file_basic.phpt:1.1.2.2 Wed Jun 6 12:53:58 2007 +++ php-src/ext/standard/tests/file/file_basic.phpt Fri Nov 2 03:54:05 2007 @@ -13,17 +13,17 @@ $filetypes = array(numeric, text, empty, text_with_new_line); foreach( $filetypes as $type ) { - create_files($file_path, 1, $type, 0755, 100, w, file, 1, byte); - print_r( file($file_path./file1.tmp) ); - delete_files($file_path, 1); + create_files($file_path, 1, $type, 0755, 100, w, file_basic, 1, byte); + print_r( file($file_path./file_basic1.tmp) ); + delete_files($file_path, 1, file_basic); } echo *** Testing for return type of file function ***\n; foreach( $filetypes as $type ) { - create_files($file_path, 1, $type); - $ret_arr = file($file_path./file1.tmp); + create_files($file_path, 1, $type, 0755, 1, w, file_basic); + $ret_arr = file($file_path./file_basic1.tmp); var_dump( is_array($ret_arr) ); - delete_files($file_path, 1); + delete_files($file_path, 1, file_basic); } echo \n--- Done ---; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file file_basic.phpt file_variation.phpt
kraghubaFri Nov 2 03:57:49 2007 UTC Modified files: /php-src/ext/standard/tests/filefile_variation.phpt file_basic.phpt Log: fix tests: proper temp file names http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_variation.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/file/file_variation.phpt diff -u php-src/ext/standard/tests/file/file_variation.phpt:1.1 php-src/ext/standard/tests/file/file_variation.phpt:1.2 --- php-src/ext/standard/tests/file/file_variation.phpt:1.1 Wed Jun 6 12:50:06 2007 +++ php-src/ext/standard/tests/file/file_variation.phpt Fri Nov 2 03:57:48 2007 @@ -1,5 +1,5 @@ --TEST-- -Test file() function : Variations +Test file() function : usage variations --FILE-- ?php /* @@ -15,39 +15,39 @@ $file_path = dirname(__FILE__); foreach( $data_array as $data ) { echo --Iteration $count --\n; - $fh = fopen($file_path./file.tmp, w); + $fh = fopen($file_path./file_variation.tmp, w); fwrite($fh, (binary)$data); - var_dump( file($file_path./file.tmp, FILE_IGNORE_NEW_LINES) ); - var_dump( file($file_path./file.tmp, FILE_SKIP_EMPTY_LINES) ); + var_dump( file($file_path./file_variation.tmp, FILE_IGNORE_NEW_LINES) ); + var_dump( file($file_path./file_variation.tmp, FILE_SKIP_EMPTY_LINES) ); $count++; fclose($fh); } echo *** Testing with variation in use_include_path argument ***\n; -$file_path1 = dirname(__FILE__)./file; +$file_path1 = dirname(__FILE__)./file_variation; mkdir($file_path1); -ini_set( 'include_path',$file_path.'/file' ); +ini_set( 'include_path',$file_path.'/file_variation' ); -file_put_contents( $file_path1./file1.tmp, aaabbb12 ); -var_dump( file(file1.tmp, FILE_USE_INCLUDE_PATH) ); -var_dump( file($file_path1./file1.tmp, 1) ); +file_put_contents( $file_path1./file1_variation.tmp, aaabbb12 ); +var_dump( file(file1_variation.tmp, FILE_USE_INCLUDE_PATH) ); +var_dump( file($file_path1./file1_variation.tmp, 1) ); echo *** Using file function to remove line containing a key string ***\n; -$file_handle = fopen($file_path./file2.tmp, w); +$file_handle = fopen($file_path./file2_variation.tmp, w); $key = SEARCH_KEY; fwrite( $file_handle, (binary)The key string to be searched is SEARCH_KEY\nLine without key string\nThe key string to be searched is SEARCH_KEY ); -$out_array = file($file_path./file2.tmp); +$out_array = file($file_path./file2_variation.tmp); echo File contents in array form Before replacement of the key\n; var_dump( $out_array ); -$file_handle2 = fopen($file_path./file3.tmp, w); +$file_handle2 = fopen($file_path./file3_variation.tmp, w); // Loop through file content array foreach($out_array as $line) { if( !strstr( $line, $key ) ) fputs($file_handle2,$line); } echo File contents in array form After replacement of the key\n; -var_dump( file($file_path./file3.tmp )); +var_dump( file($file_path./file3_variation.tmp )); fclose($file_handle); fclose($file_handle2); @@ -57,11 +57,11 @@ --CLEAN-- ?php $file_path = dirname(__FILE__); -unlink($file_path./file.tmp); -unlink($file_path./file/file1.tmp); -unlink($file_path./file2.tmp); -unlink($file_path./file3.tmp); -rmdir($file_path./file); +unlink($file_path./file_variation.tmp); +unlink($file_path./file_variation/file1_variation.tmp); +unlink($file_path./file2_variation.tmp); +unlink($file_path./file3_variation.tmp); +rmdir($file_path./file_variation); ? --EXPECTF-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/file/file_basic.phpt diff -u php-src/ext/standard/tests/file/file_basic.phpt:1.1 php-src/ext/standard/tests/file/file_basic.phpt:1.2 --- php-src/ext/standard/tests/file/file_basic.phpt:1.1 Wed Jun 6 12:50:06 2007 +++ php-src/ext/standard/tests/file/file_basic.phpt Fri Nov 2 03:57:48 2007 @@ -13,17 +13,17 @@ $filetypes = array(numeric, text, empty, text_with_new_line); foreach( $filetypes as $type ) { - create_files($file_path, 1, $type, 0755, 100, w, file, 1, byte); - print_r( file($file_path./file1.tmp) ); - delete_files($file_path, 1); + create_files($file_path, 1, $type, 0755, 100, w, file_basic, 1, byte); + print_r( file($file_path./file_basic1.tmp) ); + delete_files($file_path, 1, file_basic); } echo *** Testing for return type of file() function ***\n; foreach( $filetypes as $type ) { - create_files($file_path, 1, $type); - $ret_arr = file($file_path./file1.tmp); + create_files($file_path, 1, $type, 0755, 1, w, file_basic); + $ret_arr = file($file_path./file_basic1.tmp); var_dump( is_array($ret_arr) ); - delete_files($file_path, 1); + delete_files($file_path, 1, file_basic); } echo \n--- Done ---; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array shuffle_basic1.phpt shuffle_basic2.phpt shuffle_error.phpt shuffle_variation1.phpt shuffle_variation2.phpt shuffle_variation3.phpt shuffle_variation4.p
kraghubaSat Oct 27 12:24:06 2007 UTC Added files: /php-src/ext/standard/tests/array shuffle_variation1.phpt shuffle_variation2.phpt shuffle_variation3.phpt shuffle_variation4.phpt shuffle_variation5.phpt shuffle_basic1.phpt shuffle_basic2.phpt shuffle_error.phpt Log: New testcases for shuffle() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/shuffle_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/shuffle_variation1.phpt +++ php-src/ext/standard/tests/array/shuffle_variation1.phpt --TEST-- Test shuffle() function : usage variations - unexpected values for 'array_arg' argument --FILE-- ?php /* Prototype : bool shuffle(array $array_arg) * Description: Randomly shuffle the contents of an array * Source code: ext/standard/array.c */ /* * Test behaviour of shuffle() when unexpected values are passed for 'array_arg' * argument and verify that function outputs required warning messages wherever applicable */ echo *** Testing shuffle() : with unexpected values for 'array_arg' argument ***\n; //get an unset variable $unset_var = 10; unset ($unset_var); //get a resource variable $fp = fopen(__FILE__, r); //define a class class test { var $t = 10; function __toString() { return object; } } //array of values to iterate over $values = array( // int data /*1*/ 0, 1, 12345, -2345, // float data /*5*/ 10.5, -10.5, 12.3456789000e10, 12.3456789000E-10, .5, // null data /*10*/ NULL, null, // boolean data /*12*/ true, false, TRUE, FALSE, // empty data /*16*/ , '', // string data /*18*/ string, 'string', // object data /*20*/ new test(), // undefined data /*21*/ @$undefined_var, // unset data /*22*/ @$unset_var, /*23*/ // resource data $fp ); // loop through the array to test shuffle() function // with each element of the array $count = 1; foreach($values as $value) { echo \n-- Iteration $count --\n; var_dump( shuffle($value) ); $count++; }; // closing the resource fclose($fp); echo Done; ? --EXPECTF-- *** Testing shuffle() : with unexpected values for 'array_arg' argument *** -- Iteration 1 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 2 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 3 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 4 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 5 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 6 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 7 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 8 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 9 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 10 -- Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d bool(false) -- Iteration 11 -- Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d bool(false) -- Iteration 12 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 13 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 14 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 15 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 16 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 17 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 18 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 19 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 20 -- Warning: shuffle() expects parameter 1 to be array, object given in %s on line %d bool(false) -- Iteration 21 -- Warning: shuffle() expects parameter 1 to be array, null given in %s on line
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array shuffle_basic1.phpt shuffle_basic2.phpt shuffle_error.phpt shuffle_variation1.phpt shuffle_variation2.phpt shuffle_variation3.phpt shuffle_var
kraghubaSat Oct 27 12:27:49 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array shuffle_error.phpt shuffle_variation1.phpt shuffle_variation2.phpt shuffle_variation3.phpt shuffle_variation4.phpt shuffle_variation5.phpt shuffle_basic1.phpt shuffle_basic2.phpt Log: New testcases for shuffle() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/shuffle_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/shuffle_error.phpt +++ php-src/ext/standard/tests/array/shuffle_error.phpt --TEST-- Test shuffle() function : error conditions --FILE-- ?php /* Prototype : bool shuffle(array $array_arg) * Description: Randomly shuffle the contents of an array * Source code: ext/standard/array.c */ /* Test shuffle() to see that warning messages are emitted * when invalid number of arguments are passed to the function */ echo *** Testing shuffle() : error conditions ***\n; // zero arguments echo \n-- Testing shuffle() function with Zero arguments --\n; var_dump( shuffle() ); // more than the expected number of arguments echo \n-- Testing shuffle() function with more than expected no. of arguments --\n; $array_arg = array(1, two = 2); $extra_arg = 10; var_dump( shuffle($array_arg, $extra_arg) ); // printing the input array to check that it is not affected // by above shuffle() function calls echo \n-- original input array --\n; var_dump( $array_arg ); echo Done; ? --EXPECTF-- *** Testing shuffle() : error conditions *** -- Testing shuffle() function with Zero arguments -- Warning: shuffle() expects exactly 1 parameter, 0 given in %s on line %d bool(false) -- Testing shuffle() function with more than expected no. of arguments -- Warning: shuffle() expects exactly 1 parameter, 2 given in %s on line %d bool(false) -- original input array -- array(2) { [0]= int(1) [two]= int(2) } Done --UEXPECTF-- *** Testing shuffle() : error conditions *** -- Testing shuffle() function with Zero arguments -- Warning: shuffle() expects exactly 1 parameter, 0 given in %s on line %d bool(false) -- Testing shuffle() function with more than expected no. of arguments -- Warning: shuffle() expects exactly 1 parameter, 2 given in %s on line %d bool(false) -- original input array -- array(2) { [0]= int(1) [utwo]= int(2) } Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/shuffle_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/shuffle_variation1.phpt +++ php-src/ext/standard/tests/array/shuffle_variation1.phpt --TEST-- Test shuffle() function : usage variations - unexpected values for 'array_arg' argument --FILE-- ?php /* Prototype : bool shuffle(array $array_arg) * Description: Randomly shuffle the contents of an array * Source code: ext/standard/array.c */ /* * Test behaviour of shuffle() when unexpected values are passed for 'array_arg' * argument and verify that function outputs required warning messages wherever applicable */ echo *** Testing shuffle() : with unexpected values for 'array_arg' argument ***\n; //get an unset variable $unset_var = 10; unset ($unset_var); //get a resource variable $fp = fopen(__FILE__, r); //define a class class test { var $t = 10; function __toString() { return object; } } //array of values to iterate over $values = array( // int data /*1*/ 0, 1, 12345, -2345, // float data /*5*/ 10.5, -10.5, 12.3456789000e10, 12.3456789000E-10, .5, // null data /*10*/ NULL, null, // boolean data /*12*/ true, false, TRUE, FALSE, // empty data /*16*/ , '', // string data /*18*/ string, 'string', // object data /*20*/ new test(), // undefined data /*21*/ @$undefined_var, // unset data /*22*/ @$unset_var, /*23*/ // resource data $fp ); // loop through the array to test shuffle() function // with each element of the array $count = 1; foreach($values as $value) { echo \n-- Iteration $count --\n; var_dump( shuffle($value) ); $count++; }; // closing the resource fclose($fp); echo Done; ? --EXPECTF-- *** Testing shuffle() : with unexpected values for 'array_arg' argument *** -- Iteration 1 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 2 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 3 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 4 -- Warning: shuffle() expects
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array shuffle_basic1.phpt shuffle_basic2.phpt shuffle_error.phpt shuffle_variation1.phpt shuffle_variation2.phpt shuffle_variation3.phpt shuffle_var
kraghubaSat Oct 27 12:29:25 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array shuffle_variation1.phpt shuffle_error.phpt shuffle_variation2.phpt shuffle_variation3.phpt shuffle_variation4.phpt shuffle_variation5.phpt shuffle_basic1.phpt shuffle_basic2.phpt Log: New testcases for shuffle() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/shuffle_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/shuffle_variation1.phpt +++ php-src/ext/standard/tests/array/shuffle_variation1.phpt --TEST-- Test shuffle() function : usage variations - unexpected values for 'array_arg' argument --FILE-- ?php /* Prototype : bool shuffle(array $array_arg) * Description: Randomly shuffle the contents of an array * Source code: ext/standard/array.c */ /* * Test behaviour of shuffle() when unexpected values are passed for 'array_arg' * argument and verify that function outputs required warning messages wherever applicable */ echo *** Testing shuffle() : with unexpected values for 'array_arg' argument ***\n; //get an unset variable $unset_var = 10; unset ($unset_var); //get a resource variable $fp = fopen(__FILE__, r); //define a class class test { var $t = 10; function __toString() { return object; } } //array of values to iterate over $values = array( // int data /*1*/ 0, 1, 12345, -2345, // float data /*5*/ 10.5, -10.5, 12.3456789000e10, 12.3456789000E-10, .5, // null data /*10*/ NULL, null, // boolean data /*12*/ true, false, TRUE, FALSE, // empty data /*16*/ , '', // string data /*18*/ string, 'string', // object data /*20*/ new test(), // undefined data /*21*/ @$undefined_var, // unset data /*22*/ @$unset_var, /*23*/ // resource data $fp ); // loop through the array to test shuffle() function // with each element of the array $count = 1; foreach($values as $value) { echo \n-- Iteration $count --\n; var_dump( shuffle($value) ); $count++; }; // closing the resource fclose($fp); echo Done; ? --EXPECTF-- *** Testing shuffle() : with unexpected values for 'array_arg' argument *** -- Iteration 1 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 2 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 3 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 4 -- Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d bool(false) -- Iteration 5 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 6 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 7 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 8 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 9 -- Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d bool(false) -- Iteration 10 -- Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d bool(false) -- Iteration 11 -- Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d bool(false) -- Iteration 12 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 13 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 14 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 15 -- Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d bool(false) -- Iteration 16 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 17 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 18 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 19 -- Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d bool(false) -- Iteration 20 -- Warning: shuffle() expects parameter 1 to be array, object given in %s on line %d bool(false) -- Iteration 21 -- Warning: shuffle() expects parameter 1 to be array, null
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_unshift_object.phpt
kraghubaFri Oct 26 11:52:59 2007 UTC Modified files: /php-src/ext/standard/tests/array array_unshift_object.phpt Log: more testcases for array_unshift() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unshift_object.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_unshift_object.phpt diff -u /dev/null php-src/ext/standard/tests/array/array_unshift_object.phpt:1.2 --- /dev/null Fri Oct 26 11:52:59 2007 +++ php-src/ext/standard/tests/array/array_unshift_object.phpt Fri Oct 26 11:52:59 2007 @@ -0,0 +1,471 @@ +--TEST-- +Test array_unshift() function : passing object for 'var' argument +--FILE-- +?php +/* Prototype : int array_unshift(array $array, mixed $var [, mixed ...]) + * Description: Pushes elements onto the beginning of the array + * Source code: ext/standard/array.c +*/ + +/* + * Testing the functionality of array_unshift() by passing + * an object to the $var argument +*/ + +echo *** Testing array_unshift() : Passing object to \$var argument ***\n; + +// simple class with a variable and method +class SimpleClass +{ + public $var1 = 1; + public function fun1() { +return $var1; + } +} + +// class without members +class EmptyClass +{ +} + +// abstract class +abstract class AbstractClass +{ + protected $var2 = 5; + abstract function emptyFunction(); +} + +// class deriving the above abstract class +class ChildClass extends AbstractClass +{ + private $var3; + public function emptyFunction() { +echo defined in child; + } +} + +// class with final method +class FinalClass +{ + private $var4; + final function finalMethod() { +echo This function can't be overloaded; + } +} + +// class with static members +class StaticClass +{ + static $var5 = 2; + public static function staticMethod() { +echo This is a static method; + } +} + +// array to be passed to $array argument +$array = array('f' = first, s = 'second', 1, 2.222); + +// array containing different types of objects as elements +$vars = array( + new SimpleClass(), + new EmptyClass(), + new ChildClass(), + new FinalClass(), + new StaticClass() +); + +// loop through the various elements of $arrays to check the functionality of array_unshift +$iterator = 1; +foreach($vars as $var) { + echo -- Iteration $iterator --\n; + + /* with default argument */ + // returns element count in the resulting array after arguments are pushed to + // beginning of the given array + $temp_array = $array; + var_dump( array_unshift($temp_array, $var) ); + + // dump the resulting array + var_dump($temp_array); + + /* with optional arguments */ + // returns element count in the resulting array after arguments are pushed to + // beginning of the given array + $temp_array = $array; + var_dump( array_unshift($temp_array, $var, hello, 'world') ); + + // dump the resulting array + var_dump($temp_array); + $iterator++; +} + +echo Done; +? +--EXPECTF-- +*** Testing array_unshift() : Passing object to $var argument *** +-- Iteration 1 -- +int(5) +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[var1]= +int(1) + } + [f]= + string(5) first + [s]= + string(6) second + [1]= + int(1) + [2]= + float(2.222) +} +int(7) +array(7) { + [0]= + object(SimpleClass)#%d (1) { +[var1]= +int(1) + } + [1]= + string(5) hello + [2]= + string(5) world + [f]= + string(5) first + [s]= + string(6) second + [3]= + int(1) + [4]= + float(2.222) +} +-- Iteration 2 -- +int(5) +array(5) { + [0]= + object(EmptyClass)#%d (0) { + } + [f]= + string(5) first + [s]= + string(6) second + [1]= + int(1) + [2]= + float(2.222) +} +int(7) +array(7) { + [0]= + object(EmptyClass)#%d (0) { + } + [1]= + string(5) hello + [2]= + string(5) world + [f]= + string(5) first + [s]= + string(6) second + [3]= + int(1) + [4]= + float(2.222) +} +-- Iteration 3 -- +int(5) +array(5) { + [0]= + object(ChildClass)#%d (2) { +[var3:ChildClass:private]= +NULL +[var2:protected]= +int(5) + } + [f]= + string(5) first + [s]= + string(6) second + [1]= + int(1) + [2]= + float(2.222) +} +int(7) +array(7) { + [0]= + object(ChildClass)#%d (2) { +[var3:ChildClass:private]= +NULL +[var2:protected]= +int(5) + } + [1]= + string(5) hello + [2]= + string(5) world + [f]= + string(5) first + [s]= + string(6) second + [3]= + int(1) + [4]= + float(2.222) +} +-- Iteration 4 -- +int(5) +array(5) { + [0]= + object(FinalClass)#%d (1) { +[var4:FinalClass:private]= +NULL + } + [f]= + string(5) first + [s]= + string(6) second + [1]= + int(1) + [2]= + float(2.222) +} +int(7) +array(7) { + [0]= + object(FinalClass)#%d (1) { +[var4:FinalClass:private]= +NULL + } + [1]= + string(5) hello + [2]= + string(5) world + [f]= + string(5) first + [s]= + string(6) second + [3]= + int(1) + [4]= + float(2.222) +} +-- Iteration 5 -- +int(5) +array(5) { + [0]= +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_unshift_object.phpt
kraghubaFri Oct 26 11:49:50 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_unshift_object.phpt Log: more testcases for array_unshift() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unshift_object.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_unshift_object.phpt +++ php-src/ext/standard/tests/array/array_unshift_object.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_unshift_object.phpt
kraghubaFri Oct 26 11:47:49 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_unshift_object.phpt Log: more testcases for array_unshift() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_unshift_object.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_unshift_object.phpt +++ php-src/ext/standard/tests/array/array_unshift_object.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_filter_object.phpt
kraghubaMon Oct 22 11:13:50 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_filter_object.phpt Log: more testcase for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_object.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_object.phpt +++ php-src/ext/standard/tests/array/array_filter_object.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_filter_object.phpt
kraghubaMon Oct 22 11:16:03 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_filter_object.phpt Log: more testcases for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_object.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_object.phpt +++ php-src/ext/standard/tests/array/array_filter_object.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_filter_object.phpt
kraghubaMon Oct 22 11:17:18 2007 UTC Modified files: /php-src/ext/standard/tests/array array_filter_object.phpt Log: more testcases for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_object.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_filter_object.phpt diff -u /dev/null php-src/ext/standard/tests/array/array_filter_object.phpt:1.2 --- /dev/null Mon Oct 22 11:17:18 2007 +++ php-src/ext/standard/tests/array/array_filter_object.phpt Mon Oct 22 11:17:18 2007 @@ -0,0 +1,210 @@ +--TEST-- +Test array_filter() function : object functionality +--FILE-- +?php +/* Prototype : array array_filter(array $input [, callback $callback]) + * Description: Filters elements from the array via the callback. + * Source code: ext/standard/array.c +*/ + +/* This file uses 'input' array with different types of objects and passes + * it to array_filter() to test object functionality + * i.e. object of simple class with members and functions + * object of empty class + * object of child class extending abstract class + * object of class containing static member + */ + +echo *** Testing array_filter() : object functionality ***\n; + +// simple class with members - variable and method +class SimpleClass +{ + public $var1 = 10; + public function check() { +return $var1; + } +} + +// class without members +class EmptyClass +{ +} + +// abstract class +abstract class AbstractClass +{ + protected $var2 = 5; + abstract function emptyMethod(); +} + +// class deriving above abstract class +class ChildClass extends AbstractClass +{ + private $var3; + public function emptyMethod() { +echo defined in child; + } +} + +// class with final method +class FinalClass +{ + private $var4; + final function finalMethod() { +echo 'This can not be overloaded'; + } +} + +// class with static members +class StaticClass +{ + static $var5 = 5; + public static function staticMethod() { +echo 'this is static method'; + } +} + +// Callback function which returns always true +function always_true($input) +{ + return true; +} + +// Callback function which returns always false +function always_false($input) +{ + return false; +} + +// 'input' array containing objects as elements +$input = array( + new SimpleClass(), + new EmptyClass(), + new ChildClass(), + new FinalClass(), + new StaticClass() +); + + +// with default callback +var_dump( array_filter($input) ); + +// with always_true callback function +var_dump( array_filter($input, always_true) ); + +// with always_false callback function +var_dump( array_filter($input, always_false) ); + +echo Done +? +--EXPECTF-- +*** Testing array_filter() : object functionality *** +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[var1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[var3:ChildClass:private]= +NULL +[var2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[var4:FinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[var1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[var3:ChildClass:private]= +NULL +[var2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[var4:FinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(0) { +} +Done +--UEXPECTF-- +*** Testing array_filter() : object functionality *** +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[uvar1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[uvar3:uChildClass:private]= +NULL +[uvar2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[uvar4:uFinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[uvar1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[uvar3:uChildClass:private]= +NULL +[uvar2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[uvar4:uFinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(0) { +} +Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array array_filter_basic.phpt array_filter_error.phpt array_filter_variation1.phpt array_filter_variation2.phpt array_filter_variation3.phpt array_f
kraghubaFri Oct 19 18:18:16 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_filter_basic.phpt array_filter_variation1.phpt array_filter_variation2.phpt array_filter_variation3.phpt array_filter_variation4.phpt array_filter_variation5.phpt array_filter_variation6.phpt array_filter_variation7.phpt array_filter_error.phpt array_filter_variation8.phpt array_filter_variation9.phpt Log: New testcases for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_basic.phpt +++ php-src/ext/standard/tests/array/array_filter_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation1.phpt +++ php-src/ext/standard/tests/array/array_filter_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation2.phpt +++ php-src/ext/standard/tests/array/array_filter_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation3.phpt +++ php-src/ext/standard/tests/array/array_filter_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation4.phpt +++ php-src/ext/standard/tests/array/array_filter_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation5.phpt +++ php-src/ext/standard/tests/array/array_filter_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation6.phpt +++ php-src/ext/standard/tests/array/array_filter_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation7.phpt +++ php-src/ext/standard/tests/array/array_filter_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_error.phpt +++ php-src/ext/standard/tests/array/array_filter_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation8.phpt +++ php-src/ext/standard/tests/array/array_filter_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation9.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation9.phpt +++ php-src/ext/standard/tests/array/array_filter_variation9.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_filter_basic.phpt array_filter_error.phpt array_filter_variation1.phpt array_filter_variation2.phpt array_filter_variation3.phpt array_f
kraghubaFri Oct 19 18:20:02 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_filter_basic.phpt array_filter_variation1.phpt array_filter_variation2.phpt array_filter_variation3.phpt array_filter_variation4.phpt array_filter_variation5.phpt array_filter_variation6.phpt array_filter_variation7.phpt array_filter_variation8.phpt array_filter_variation9.phpt array_filter_error.phpt Log: New testcases for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_basic.phpt +++ php-src/ext/standard/tests/array/array_filter_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation1.phpt +++ php-src/ext/standard/tests/array/array_filter_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation2.phpt +++ php-src/ext/standard/tests/array/array_filter_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation3.phpt +++ php-src/ext/standard/tests/array/array_filter_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation4.phpt +++ php-src/ext/standard/tests/array/array_filter_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation5.phpt +++ php-src/ext/standard/tests/array/array_filter_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation6.phpt +++ php-src/ext/standard/tests/array/array_filter_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation7.phpt +++ php-src/ext/standard/tests/array/array_filter_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation8.phpt +++ php-src/ext/standard/tests/array/array_filter_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation9.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_variation9.phpt +++ php-src/ext/standard/tests/array/array_filter_variation9.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_error.phpt +++ php-src/ext/standard/tests/array/array_filter_error.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_filter_basic.phpt array_filter_error.phpt array_filter_variation1.phpt array_filter_variation2.phpt array_filter_variation3.phpt array_filter_var
kraghubaFri Oct 19 18:22:56 2007 UTC Modified files: /php-src/ext/standard/tests/array array_filter_variation5.phpt array_filter_variation6.phpt array_filter_variation7.phpt array_filter_variation8.phpt array_filter_variation9.phpt array_filter_error.phpt array_filter_basic.phpt array_filter_variation1.phpt array_filter_variation2.phpt array_filter_variation3.phpt array_filter_variation4.phpt Log: New testcases for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation5.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_filter_variation5.phpt diff -u /dev/null php-src/ext/standard/tests/array/array_filter_variation5.phpt:1.2 --- /dev/null Fri Oct 19 18:22:55 2007 +++ php-src/ext/standard/tests/array/array_filter_variation5.phpt Fri Oct 19 18:22:55 2007 @@ -0,0 +1,151 @@ +--TEST-- +Test array_filter() function : usage variations - 'input' argument with different false entries +--FILE-- +?php +/* Prototype : array array_filter(array $input [, callback $callback]) + * Description: Filters elements from the array via the callback. + * Source code: ext/standard/array.c +*/ + +/* +* With default callback function argument, array_filter() removes elements which are interpreted as false +* Here Testing all the false array element possibilities +*/ + +// callback function always_true +function always_true($input) +{ + return true; +} + +// callback function always_false +function always_false($input) +{ + return false; +} + +echo *** Testing array_filter() : usage variations - different false elements in 'input' ***\n; + +// unset variable +$unset_var = 10; +unset($unset_var); + +// empty heredoc string +$empty_heredoc =EOT +EOT; + +// input array with different false elements +$input = array( + false, + False, + '', + , + 0, + 0.0, + null, + NULL, + 0, + '0', + array(), + !1, + 1==2, + $empty_heredoc, + @$unset_var, + @$undefined_var, +); + +// With default callback function +var_dump( array_filter($input) ); + +// With callback function which returns always true +var_dump( array_filter($input, 'always_true') ); + +// With callback function which returns always false +var_dump( array_filter($input, 'always_false') ); + +echo Done +? +--EXPECTF-- +*** Testing array_filter() : usage variations - different false elements in 'input' *** +array(0) { +} +array(16) { + [0]= + bool(false) + [1]= + bool(false) + [2]= + string(0) + [3]= + string(0) + [4]= + int(0) + [5]= + float(0) + [6]= + NULL + [7]= + NULL + [8]= + string(1) 0 + [9]= + string(1) 0 + [10]= + array(0) { + } + [11]= + bool(false) + [12]= + bool(false) + [13]= + string(0) + [14]= + NULL + [15]= + NULL +} +array(0) { +} +Done +--UEXPECTF-- +*** Testing array_filter() : usage variations - different false elements in 'input' *** +array(0) { +} +array(16) { + [0]= + bool(false) + [1]= + bool(false) + [2]= + unicode(0) + [3]= + unicode(0) + [4]= + int(0) + [5]= + float(0) + [6]= + NULL + [7]= + NULL + [8]= + unicode(1) 0 + [9]= + unicode(1) 0 + [10]= + array(0) { + } + [11]= + bool(false) + [12]= + bool(false) + [13]= + unicode(0) + [14]= + NULL + [15]= + NULL +} +array(0) { +} +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation6.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_filter_variation6.phpt diff -u /dev/null php-src/ext/standard/tests/array/array_filter_variation6.phpt:1.2 --- /dev/null Fri Oct 19 18:22:55 2007 +++ php-src/ext/standard/tests/array/array_filter_variation6.phpt Fri Oct 19 18:22:55 2007 @@ -0,0 +1,143 @@ +--TEST-- +Test array_filter() function : usage variations - 'input' array containing references +--FILE-- +?php +/* Prototype : array array_filter(array $input [, callback $callback]) + * Description: Filters elements from the array via the callback. + * Source code: ext/standard/array.c +*/ + +/* +* Passing 'input' array which contains elements as reference to other data +*/ + +echo *** Testing array_filter() : usage variations - 'input' containing references ***\n; + +// Callback function +/* Prototype : bool callback(array $input) + * Parameter : $input - array of which each element need to be checked in function + * Return Type : returns true or false + * Description : This function checks each element of an input array if element 5 then + * returns true else returns false + */ +function callback($input) +{ +