[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring/tests mb_substitute_character_variation1.phpt
wharmby Tue Jun 9 20:18:28 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring/tests mb_substitute_character_variation1.phpt Log: Fix test - remove bogus variation http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_substitute_character_variation1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/mbstring/tests/mb_substitute_character_variation1.phpt diff -u php-src/ext/mbstring/tests/mb_substitute_character_variation1.phpt:1.1.2.1 php-src/ext/mbstring/tests/mb_substitute_character_variation1.phpt:1.1.2.2 --- php-src/ext/mbstring/tests/mb_substitute_character_variation1.phpt:1.1.2.1 Wed Dec 3 13:03:56 2008 +++ php-src/ext/mbstring/tests/mb_substitute_character_variation1.phpt Tue Jun 9 20:18:28 2009 @@ -105,9 +105,6 @@ // unset data 'unset var' = @$unset_var, - - // resource variable - 'resource' = $fp ); // loop through each element of the array for substchar @@ -232,7 +229,4 @@ --unset var-- Error: 2 - mb_substitute_character(): Unknown character., %s(%d) bool(false) - ---resource-- -bool(true) ===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_format_variation2.phpt
wharmby Wed Apr 22 10:42:23 2009 UTC Modified files: /php-src/ext/date/tests date_format_variation2.phpt Log: PHP 6 version of a new date test missed from earlier drop http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_format_variation2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/date_format_variation2.phpt diff -u /dev/null php-src/ext/date/tests/date_format_variation2.phpt:1.2 --- /dev/null Wed Apr 22 10:42:23 2009 +++ php-src/ext/date/tests/date_format_variation2.phpt Wed Apr 22 10:42:23 2009 @@ -0,0 +1,208 @@ +--TEST-- +Test date_format() function : usage variation - Passing unexpected values to second argument $format. +--FILE-- +?php +/* Prototype : string date_format ( DateTime $object , string $format ) + * Description: Returns date formatted according to given format + * Source code: ext/date/php_date.c + * Alias to functions: DateTime::format + */ + +echo *** Testing date_format() : usage variation - unexpected values to second argument \$format***\n; + +//Set the default time zone +date_default_timezone_set(Europe/London); + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + +// define some classes +class classWithToString +{ + public function __toString() { + return Class A object; + } +} + +class classWithoutToString +{ +} + +// heredoc string +$heredoc = EOT +hello world +EOT; + +// add arrays +$index_array = array (1, 2, 3); +$assoc_array = array ('one' = 1, 'two' = 2); + +// resource +$file_handle = fopen(__FILE__, 'r'); + +//array of values to iterate over +$inputs = array( + + // int data + 'int 0' = 0, + 'int 1' = 1, + 'int 12345' = 12345, + 'int -12345' = -12345, + + // float data + 'float 10.5' = 10.5, + 'float -10.5' = -10.5, + 'float .5' = .5, + + // array data + 'empty array' = array(), + 'int indexed array' = $index_array, + 'associative array' = $assoc_array, + 'nested arrays' = array('foo', $index_array, $assoc_array), + + // null data + 'uppercase NULL' = NULL, + 'lowercase null' = null, + + // boolean data + 'lowercase true' = true, + 'lowercase false' =false, + 'uppercase TRUE' =TRUE, + 'uppercase FALSE' =FALSE, + + // empty data + 'empty string DQ' = , + 'empty string SQ' = '', + + // string data + 'string DQ' = string, + 'string SQ' = 'string', + 'mixed case string' = sTrInG, + 'heredoc' = $heredoc, + + // object data + 'instance of classWithToString' = new classWithToString(), + 'instance of classWithoutToString' = new classWithoutToString(), + + // undefined data + 'undefined var' = @$undefined_var, + + // unset data + 'unset var' = @$unset_var, + + // resource + 'resource' = $file_handle +); + +$object = date_create(2005-07-14 22:30:41); + +foreach($inputs as $variation =$format) { + echo \n-- $variation --\n; + var_dump( date_format($object, $format) ); +}; + +// closing the resource +fclose( $file_handle ); + +? +===DONE=== +--EXPECTF-- +*** Testing date_format() : usage variation - unexpected values to second argument $format*** + +-- int 0 -- +unicode(1) 0 + +-- int 1 -- +unicode(1) 1 + +-- int 12345 -- +unicode(5) 12345 + +-- int -12345 -- +unicode(6) -12345 + +-- float 10.5 -- +unicode(4) 10.5 + +-- float -10.5 -- +unicode(5) -10.5 + +-- float .5 -- +unicode(3) 0.5 + +-- empty array -- + +Warning: date_format() expects parameter 2 to be binary string, array given in %s on line %d +bool(false) + +-- int indexed array -- + +Warning: date_format() expects parameter 2 to be binary string, array given in %s on line %d +bool(false) + +-- associative array -- + +Warning: date_format() expects parameter 2 to be binary string, array given in %s on line %d +bool(false) + +-- nested arrays -- + +Warning: date_format() expects parameter 2 to be binary string, array given in %s on line %d +bool(false) + +-- uppercase NULL -- +unicode(0) + +-- lowercase null -- +unicode(0) + +-- lowercase true -- +unicode(1) 1 + +-- lowercase false -- +unicode(0) + +-- uppercase TRUE -- +unicode(1) 1 + +-- uppercase FALSE -- +unicode(0) + +-- empty string DQ -- +unicode(0) + +-- empty string SQ -- +unicode(0) + +-- string DQ -- +unicode(40) 4131Thu, 14 Jul 2005 22:30:41 +010030710 + +-- string SQ -- +unicode(40) 4131Thu, 14 Jul 2005 22:30:41 +010030710 + +-- mixed case string -- +unicode(40) 41BSTThu, 14 Jul 2005 22:30:41 +01001722 + +-- heredoc -- +unicode(82) 10Europe/LondonThursdayThursday2005 42005Thu, 14 Jul 2005 22:30:41 +0100Thursday14 + +-- instance of classWithToString -- +unicode(66) CThursdaypm4141 PM 2005b14Europe/London2005-07-14T22:30:41+01:0031 + +-- instance of classWithoutToString -- + +Warning: date_format() expects parameter 2 to be binary string, object given in %s on line %d +bool(false) + +-- undefined var -- +unicode(0) + +-- unset
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file filetype_variation2.phpt
wharmby Tue Apr 21 08:53:25 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filefiletype_variation2.phpt Log: Fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation2.phpt?r1=1.1.4.4r2=1.1.4.5diff_format=u Index: php-src/ext/standard/tests/file/filetype_variation2.phpt diff -u php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.4.4 php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.4.5 --- php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.4.4Wed Apr 15 20:56:58 2009 +++ php-src/ext/standard/tests/file/filetype_variation2.phptTue Apr 21 08:53:25 2009 @@ -9,6 +9,7 @@ } if (!file_exists(/dev/console)) { die('skip /dev/console not available'); +} ? --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/file filetype_variation2.phpt
wharmby Tue Apr 21 08:53:26 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/filefiletype_variation2.phpt Log: Fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/file/filetype_variation2.phpt diff -u php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.2.2 php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/filetype_variation2.phpt:1.1.2.2Wed Apr 15 20:57:26 2009 +++ php-src/ext/standard/tests/file/filetype_variation2.phptTue Apr 21 08:53:26 2009 @@ -9,6 +9,7 @@ } if (!file_exists(/dev/console)) { die('skip /dev/console not available'); +} ? --FILE-- ?php -- 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 filetype_variation2.phpt
wharmby Tue Apr 21 08:53:27 2009 UTC Modified files: /php-src/ext/standard/tests/filefiletype_variation2.phpt Log: Fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/filetype_variation2.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/file/filetype_variation2.phpt diff -u php-src/ext/standard/tests/file/filetype_variation2.phpt:1.4 php-src/ext/standard/tests/file/filetype_variation2.phpt:1.5 --- php-src/ext/standard/tests/file/filetype_variation2.phpt:1.4Wed Apr 15 20:56:49 2009 +++ php-src/ext/standard/tests/file/filetype_variation2.phptTue Apr 21 08:53:27 2009 @@ -9,6 +9,7 @@ } if (!file_exists(/dev/console)) { die('skip /dev/console not available'); +} ? --FILE-- ?php -- 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 DateTimeZone_getOffset_basic1.phpt timezone_offset_get_basic1.phpt
wharmby Mon Mar 30 12:35:29 2009 UTC Modified files: /php-src/ext/date/tests timezone_offset_get_basic1.phpt DateTimeZone_getOffset_basic1.phpt Log: Fix date tests which started failing after change to BST http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/timezone_offset_get_basic1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/date/tests/timezone_offset_get_basic1.phpt diff -u php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.2 php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.3 --- php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.2 Wed Mar 18 23:35:10 2009 +++ php-src/ext/date/tests/timezone_offset_get_basic1.phpt Mon Mar 30 12:35:29 2009 @@ -28,7 +28,7 @@ ===DONE=== --EXPECTF-- *** Testing timezone_offset_get() : basic functionality *** -int(0) +%rint\(0\)|int\(3600\)%r %rint\(-18000\)|int\(-14400\)%r %rint\(-28800\)|int\(-25200\)%r ===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt diff -u php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.2 php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.3 --- php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.2 Wed Mar 18 11:13:01 2009 +++ php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt Mon Mar 30 12:35:29 2009 @@ -27,7 +27,7 @@ ===DONE=== --EXPECTF-- *** Testing DateTimeZone::getOffset() : basic functionality *** -int(0) +%rint\(0\)|int\(3600\)%r %rint\(-18000\)|int\(-14400\)%r %rint\(-28800\)|int\(-25200\)%r ===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_2) /ext/date/tests DateTimeZone_getOffset_basic1.phpt timezone_offset_get_basic1.phpt
wharmby Mon Mar 30 12:35:30 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date/tests timezone_offset_get_basic1.phpt DateTimeZone_getOffset_basic1.phpt Log: Fix date tests which started failing after change to BST http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/timezone_offset_get_basic1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/date/tests/timezone_offset_get_basic1.phpt diff -u php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.1.2.1 php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.1.2.2 --- php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.1.2.1 Wed Mar 18 23:34:56 2009 +++ php-src/ext/date/tests/timezone_offset_get_basic1.phpt Mon Mar 30 12:35:30 2009 @@ -28,7 +28,7 @@ ===DONE=== --EXPECTF-- *** Testing timezone_offset_get() : basic functionality *** -int(0) +%rint\(0\)|int\(3600\)%r %rint\(-18000\)|int\(-14400\)%r %rint\(-28800\)|int\(-25200\)%r ===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt diff -u php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.1.2.1 php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.1.2.2 --- php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.1.2.1 Wed Mar 18 11:12:59 2009 +++ php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt Mon Mar 30 12:35:30 2009 @@ -27,7 +27,7 @@ ===DONE=== --EXPECTF-- *** Testing DateTimeZone::getOffset() : basic functionality *** -int(0) +%rint\(0\)|int\(3600\)%r %rint\(-18000\)|int\(-14400\)%r %rint\(-28800\)|int\(-25200\)%r ===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/date/tests DateTimeZone_getOffset_basic1.phpt timezone_offset_get_basic1.phpt
wharmby Mon Mar 30 12:35:31 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/date/tests DateTimeZone_getOffset_basic1.phpt timezone_offset_get_basic1.phpt Log: Fix date tests which started failing after change to BST http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt diff -u php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.2.2.2 php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.2.2.3 --- php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt:1.2.2.2 Wed Mar 18 11:13:03 2009 +++ php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt Mon Mar 30 12:35:31 2009 @@ -27,7 +27,7 @@ ===DONE=== --EXPECTF-- *** Testing DateTimeZone::getOffset() : basic functionality *** -int(0) +%rint\(0\)|int\(3600\)%r %rint\(-18000\)|int\(-14400\)%r %rint\(-28800\)|int\(-25200\)%r ===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/timezone_offset_get_basic1.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/date/tests/timezone_offset_get_basic1.phpt diff -u php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.2.2.2 php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.2.2.3 --- php-src/ext/date/tests/timezone_offset_get_basic1.phpt:1.2.2.2 Wed Mar 18 23:35:24 2009 +++ php-src/ext/date/tests/timezone_offset_get_basic1.phpt Mon Mar 30 12:35:31 2009 @@ -28,7 +28,7 @@ ===DONE=== --EXPECTF-- *** Testing timezone_offset_get() : basic functionality *** -int(0) +%rint\(0\)|int\(3600\)%r %rint\(-18000\)|int\(-14400\)%r %rint\(-28800\)|int\(-25200\)%r ===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_2) /ext/date/tests DateTimeZone_clone_basic1.phpt DateTimeZone_clone_basic2.phpt DateTimeZone_clone_basic3.phpt DateTimeZone_clone_basic4.phpt DateTimeZone_compare_basic1.
wharmby Wed Mar 18 11:13:00 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests DateTimeZone_clone_basic2.phpt DateTimeZone_construct_basic.phpt DateTimeZone_verify.phpt DateTimeZone_getTransitions_error.phpt DateTimeZone_compare_basic1.phpt DateTimeZone_clone_basic1.phpt DateTimeZone_serialize.phpt DateTimeZone_getOffset_basic1.phpt DateTimeZone_getName_basic1.phpt DateTimeZone_getName_error.phpt DateTimeZone_construct_error.phpt DateTimeZone_extends_basic1.phpt DateTimeZone_getOffset_variation1.phpt DateTimeZone_getTransitions_basic1.phpt DateTimeZone_clone_basic3.phpt DateTimeZone_listAbbreviations_basic1.phpt DateTimeZone_clone_basic4.phpt DateTimeZone_listIdentifiers_basic1.phpt DateTimeZone_getOffset_error.phpt DateTimeZone_construct_variation1.phpt Log: New tests for date extension DateTimeZone methods Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_clone_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_clone_basic2.phpt +++ php-src/ext/date/tests/DateTimeZone_clone_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_construct_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_construct_basic.phpt +++ php-src/ext/date/tests/DateTimeZone_construct_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_verify.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_verify.phpt +++ php-src/ext/date/tests/DateTimeZone_verify.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getTransitions_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getTransitions_error.phpt +++ php-src/ext/date/tests/DateTimeZone_getTransitions_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_compare_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_compare_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_compare_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_clone_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_clone_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_clone_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_serialize.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_serialize.phpt +++ php-src/ext/date/tests/DateTimeZone_serialize.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getName_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getName_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_getName_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getName_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getName_error.phpt +++ php-src/ext/date/tests/DateTimeZone_getName_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_construct_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_construct_error.phpt +++ php-src/ext/date/tests/DateTimeZone_construct_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_extends_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_extends_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_extends_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getOffset_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getOffset_variation1.phpt +++ php-src/ext/date/tests/DateTimeZone_getOffset_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_clone_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_clone_basic3.phpt +++ php-src/ext/date/tests/DateTimeZone_clone_basic3.phpt
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests DateTimeZone_clone_basic1.phpt DateTimeZone_clone_basic2.phpt DateTimeZone_clone_basic3.phpt DateTimeZone_clone_basic4.phpt DateTimeZone_compare_basic1.
wharmby Wed Mar 18 11:13:04 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests DateTimeZone_getName_basic1.phpt DateTimeZone_construct_basic.phpt DateTimeZone_clone_basic4.phpt DateTimeZone_extends_basic1.phpt DateTimeZone_listAbbreviations_basic1.phpt DateTimeZone_clone_basic1.phpt DateTimeZone_verify.phpt DateTimeZone_getOffset_error.phpt DateTimeZone_getOffset_basic1.phpt DateTimeZone_getName_error.phpt DateTimeZone_construct_variation1.phpt DateTimeZone_serialize.phpt DateTimeZone_compare_basic1.phpt DateTimeZone_listIdentifiers_basic1.phpt DateTimeZone_getTransitions_basic1.phpt DateTimeZone_clone_basic2.phpt DateTimeZone_construct_error.phpt DateTimeZone_getTransitions_error.phpt DateTimeZone_clone_basic3.phpt DateTimeZone_getOffset_variation1.phpt Log: New tests for date extension DateTimeZone methods Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getName_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getName_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_getName_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_construct_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_construct_basic.phpt +++ php-src/ext/date/tests/DateTimeZone_construct_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_clone_basic4.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_clone_basic4.phpt +++ php-src/ext/date/tests/DateTimeZone_clone_basic4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_extends_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_extends_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_extends_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_clone_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_clone_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_clone_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_verify.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_verify.phpt +++ php-src/ext/date/tests/DateTimeZone_verify.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getOffset_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getOffset_error.phpt +++ php-src/ext/date/tests/DateTimeZone_getOffset_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_getOffset_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getName_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getName_error.phpt +++ php-src/ext/date/tests/DateTimeZone_getName_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_construct_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_construct_variation1.phpt +++ php-src/ext/date/tests/DateTimeZone_construct_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_serialize.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_serialize.phpt +++ php-src/ext/date/tests/DateTimeZone_serialize.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_compare_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_compare_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_compare_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_listIdentifiers_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_listIdentifiers_basic1.phpt +++ php-src/ext/date/tests/DateTimeZone_listIdentifiers_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTimeZone_getTransitions_basic1.phpt +++
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests DateTime_clone_basic1.phpt DateTime_clone_basic2.phpt DateTime_clone_basic3.phpt DateTime_clone_basic4.phpt DateTime_compare_basic1.phpt DateTime_constr
wharmby Wed Mar 18 11:33:00 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests DateTime_construct_error.phpt DateTime_format_variation1.phpt DateTime_setTimezone_basic1.phpt DateTime_setDate_error.phpt DateTime_extends_basic3.phpt DateTime_setTime_variation2.phpt DateTime_serialize.phpt DateTime_format_error.phpt DateTime_setDate_basic1.phpt DateTime_extends_basic1.phpt DateTime_setTime_basic1.phpt DateTime_setISODate_variation3.phpt DateTime_construct_variation1.phpt DateTime_clone_basic3.phpt DateTime_extends_basic2.phpt DateTime_setISODate_variation1.phpt DateTime_setTime_variation3.phpt DateTime_setDate_variation1.phpt DateTime_construct_variation2.phpt DateTime_clone_basic2.phpt DateTime_getOffset_basic1.phpt DateTime_setTime_variation1.phpt DateTime_clone_basic1.phpt DateTime_modify_basic1.phpt DateTime_verify.phpt DateTime_modify_variation1.phpt DateTime_setTimezone_variation1.phpt DateTime_compare_basic1.phpt DateTime_setTimezone_error.phpt DateTime_setTime_error.phpt DateTime_clone_basic4.phpt DateTime_setISODate_basic1.phpt DateTime_setDate_variation3.phpt DateTime_setDate_variation2.phpt DateTime_getTimeZone_basic1.phpt DateTime_setISODate_variation2.phpt DateTime_format_basic1.phpt DateTime_construct_basic1.phpt DateTime_setISODate_error.phpt DateTime_getOffset_error.phpt DateTime_format_basic2.phpt DateTime_modify_error.phpt Log: New tests for date extension DateTime methods Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_construct_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_construct_error.phpt +++ php-src/ext/date/tests/DateTime_construct_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_format_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_format_variation1.phpt +++ php-src/ext/date/tests/DateTime_format_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_setTimezone_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_setTimezone_basic1.phpt +++ php-src/ext/date/tests/DateTime_setTimezone_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_setDate_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_setDate_error.phpt +++ php-src/ext/date/tests/DateTime_setDate_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_extends_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_extends_basic3.phpt +++ php-src/ext/date/tests/DateTime_extends_basic3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_setTime_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_setTime_variation2.phpt +++ php-src/ext/date/tests/DateTime_setTime_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_serialize.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_serialize.phpt +++ php-src/ext/date/tests/DateTime_serialize.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_format_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_format_error.phpt +++ php-src/ext/date/tests/DateTime_format_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_setDate_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_setDate_basic1.phpt +++ php-src/ext/date/tests/DateTime_setDate_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/DateTime_extends_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/DateTime_extends_basic1.phpt +++
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests checkdate_basic1.phpt checkdate_error.phpt checkdate_variation1.phpt checkdate_variation2.phpt checkdate_variation3.phpt date_basic1.phpt date_create_ba
wharmby Wed Mar 18 23:34:57 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests date_isodate_set_variation3.phpt date_timezone_set_variation2.phpt date_format_variation1.phpt timezone_name_from_abbr_variation3.phpt mktime_variation4.phpt date_timezone_set_basic1.phpt mktime_error.phpt mktime_variation6.phpt localtime_error.phpt date_error.phpt date_isodate_set_variation4.phpt date_time_set_variation3.phpt date_isodate_set_error.phpt checkdate_variation2.phpt date_offset_get_error.phpt date_format_variation2.phpt date_create_variation2.phpt date_timezone_set_error.phpt date_time_set_variation1.phpt date_isodate_set_variation1.phpt mktime_variation5.phpt mktime_basic1.phpt checkdate_variation3.phpt timezone_transitions_get_basic1.phpt timezone_name_from_abbr_variation1.phpt timezone_open_basic1.phpt mktime_variation7.phpt timezone_name_from_abbr_error.phpt timezone_open_error.phpt timezone_offset_get_basic1.phpt checkdate_error.phpt checkdate_variation1.phpt date_variation1.phpt date_parse_basic1.phpt timezone_offset_get_variation1.phpt date_date_set_error.phpt mktime_variation3.phpt date_parse_variation1.phpt date_date_set_variation1.phpt date_time_set_variation2.phpt date_timezone_get_variation1.phpt date_variation2.phpt timezone_offset_get_variation2.phpt checkdate_basic1.phpt date_basic1.phpt date_date_set_basic1.phpt date_date_set_variation4.phpt timezone_name_from_abbr_variation2.phpt date_timezone_get_error.phpt timezone_transitions_get_variation1.phpt timezone_transitions_get_error.phpt date_format_basic1.phpt date_modify_variation1.phpt date_create_error.phpt mktime_variation1.phpt date_parse_error.phpt date_modify_variation2.phpt timezone_name_from_abbr_basic1.phpt date_offset_get_basic1.phpt date_time_set_variation4.phpt idate_error.phpt date_isodate_set_variation2.phpt date_time_set_basic1.phpt timezone_identifiers_list_basic1.phpt date_modify_basic1.phpt timezone_abbreviations_list_basic1.phpt date_timezone_set_variation1.phpt mktime_variation2.phpt timezone_offset_get_error.phpt timezone_name_get_error.phpt date_isodate_set_basic1.phpt timezone_open_variation1.phpt date_date_set_variation2.phpt date_create_basic.phpt date_offset_get_variation1.phpt date_timezone_get_basic1.phpt date_create_variation1.phpt date_format_error.phpt date_modify_error.phpt date_time_set_error.phpt date_date_set_variation3.phpt Log: New tests for various date extension functions. Tested on Windows, Linux and linux 64
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests checkdate_basic1.phpt checkdate_error.phpt checkdate_variation1.phpt checkdate_variation2.phpt checkdate_variation3.phpt date_basic1.phpt date_create_ba
wharmby Wed Mar 18 23:35:25 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests date_time_set_variation3.phpt mktime_variation4.phpt date_isodate_set_basic1.phpt date_offset_get_variation1.phpt date_time_set_variation4.phpt date_parse_error.phpt checkdate_error.phpt date_basic1.phpt timezone_name_from_abbr_variation1.phpt checkdate_variation1.phpt date_timezone_set_variation2.phpt date_date_set_variation3.phpt timezone_name_from_abbr_error.phpt mktime_basic1.phpt date_parse_basic1.phpt timezone_offset_get_variation1.phpt date_offset_get_basic1.phpt date_modify_basic1.phpt timezone_name_get_error.phpt checkdate_variation3.phpt timezone_abbreviations_list_basic1.phpt mktime_variation6.phpt date_date_set_variation2.phpt date_isodate_set_variation3.phpt date_modify_variation1.phpt timezone_transitions_get_variation1.phpt checkdate_basic1.phpt localtime_error.phpt date_format_variation1.phpt timezone_transitions_get_variation2.phpt date_create_error.phpt timezone_transitions_get_error.phpt mktime_variation7.phpt date_isodate_set_variation2.phpt date_modify_error.phpt date_time_set_variation1.phpt timezone_offset_get_basic1.phpt date_timezone_get_basic1.phpt timezone_open_variation1.phpt timezone_name_from_abbr_basic1.phpt date_timezone_set_variation1.phpt date_format_basic1.phpt date_modify_variation2.phpt date_parse_variation1.phpt mktime_variation2.phpt date_create_basic.phpt timezone_offset_get_variation2.phpt date_create_variation1.phpt date_timezone_get_variation1.phpt date_timezone_set_error.phpt timezone_transitions_get_variation3.phpt date_error.phpt date_isodate_set_error.phpt checkdate_variation2.phpt date_format_variation2.phpt date_format_error.phpt date_time_set_error.phpt date_create_variation2.phpt timezone_identifiers_list_basic1.phpt mktime_variation1.phpt timezone_open_basic1.phpt timezone_offset_get_error.phpt date_date_set_basic1.phpt timezone_transitions_get_basic1.phpt date_date_set_variation4.phpt date_date_set_error.phpt date_time_set_variation2.phpt mktime_error.phpt date_timezone_set_basic1.phpt idate_error.phpt date_variation2.phpt date_isodate_set_variation4.phpt timezone_name_from_abbr_variation2.phpt date_isodate_set_variation1.phpt date_offset_get_error.phpt mktime_variation3.phpt timezone_name_from_abbr_variation3.phpt date_date_set_variation1.phpt date_time_set_basic1.phpt timezone_open_error.phpt date_timezone_get_error.phpt date_variation1.phpt mktime_variation5.phpt
[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions floatval_basic.phpt floatval_error.phpt floatval_variation1.phpt
wharmby Sun Feb 1 18:32:38 2009 UTC Added files: /php-src/ext/standard/tests/general_functions floatval_variation1.phpt floatval_basic.phpt floatval_error.phpt Log: New floatval() tests. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/floatval_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/floatval_variation1.phpt +++ php-src/ext/standard/tests/general_functions/floatval_variation1.phpt --TEST-- Testing floatval() and its alias doubleval() functions : usage variations - different data types as $y arg --FILE-- ?php /* Prototype: float floatval( mixed $var ); * Description: Returns the float value of var. */ // get a resource type variable $fp = fopen (__FILE__, r); fclose($fp); $dfp = opendir ( dirname(__FILE__) ); closedir($dfp); // other types in an array $not_float_types = array ( -2147483648 = -2147483648, // max negative integer value 2147483647 = 2147483648, // max positive integer value file resoruce = $fp, directory resource = $dfp, \0.0\ = 0.0, // string \1.0\ = 1.0, \-1.3e3\ = -1.3e3, \bob-1.3e3\ = bob-1.3e3, \10 Some dollars\ = 10 Some dollars, \10.2 Some Dollars\ = 10.2 Some Dollars, \10.0 dollar\ + 1 = 10.0 dollar + 1, \10.0 dollar\ + 1.0 = 10.0 dollar + 1.0, \\ = , true = true, NULL = NULL, null = null, ); /* loop through the $not_float_types to see working of floatval() on non float types, expected output: float value valid floating point numbers */ echo \n*** Testing floatval() on non floating types ***\n; foreach ($not_float_types as $key = $type ) { echo \n-- Iteration : $key --\n; var_dump( floatval($type) ); } echo \n*** Testing doubleval() on non floating types ***\n; /* loop through the $not_float_types to see working of doubleval() on non float types, expected output: float value valid floating point numbers */ foreach ($not_float_types as $key = $type ) { echo \n-- Iteration : $key --\n; var_dump( doubleval($type) ); } ? ===DONE=== --EXPECTF-- *** Testing floatval() on non floating types *** -- Iteration : -2147483648 -- float(-2147483648) -- Iteration : 2147483647 -- float(2147483648) -- Iteration : file resoruce -- float(%d) -- Iteration : directory resource -- float(%d) -- Iteration : 0.0 -- float(0) -- Iteration : 1.0 -- float(1) -- Iteration : -1.3e3 -- float(-1300) -- Iteration : bob-1.3e3 -- float(0) -- Iteration : 10 Some dollars -- float(10) -- Iteration : 10.2 Some Dollars -- float(10.2) -- Iteration : 10.0 dollar + 1 -- float(11) -- Iteration : 10.0 dollar + 1.0 -- float(11) -- Iteration : -- float(0) -- Iteration : true -- float(1) -- Iteration : NULL -- float(0) -- Iteration : null -- float(0) *** Testing doubleval() on non floating types *** -- Iteration : -2147483648 -- float(-2147483648) -- Iteration : 2147483647 -- float(2147483648) -- Iteration : file resoruce -- float(%d) -- Iteration : directory resource -- float(%d) -- Iteration : 0.0 -- float(0) -- Iteration : 1.0 -- float(1) -- Iteration : -1.3e3 -- float(-1300) -- Iteration : bob-1.3e3 -- float(0) -- Iteration : 10 Some dollars -- float(10) -- Iteration : 10.2 Some Dollars -- float(10.2) -- Iteration : 10.0 dollar + 1 -- float(11) -- Iteration : 10.0 dollar + 1.0 -- float(11) -- Iteration : -- float(0) -- Iteration : true -- float(1) -- Iteration : NULL -- float(0) -- Iteration : null -- float(0) ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/floatval_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/floatval_basic.phpt +++ php-src/ext/standard/tests/general_functions/floatval_basic.phpt --TEST-- Testing floatval() and its alias doubleval() Functions --INI-- precision = 14 --FILE-- ?php /* Prototype: float floatval( mixed $var ); * Description: Returns the float value of var. */ // different valid float values $valid_floats = array( 0.0 = 0.0, 1.0 = 1.0, -1.0 = -1.0, 1.234 = 1.234, -1.234 = -1.234, 1.2e3 = 1.2e3, -1.2e3 = -1.2e3, 10.005 = 10.005, 10.5e+5 = 10.5e+5, 1e5 = 1e5, -1e5 = -1e5, 1e5 = 1e-5, -1e-1 = -1e-1, 1e+5 = 1e+5, -1e+5 =-1e+5, 1E5 = 1E5, -1E5 = -1E5, 1E+5 = 1E+5, -1E5 = -1E+5, .5e+7 = .5e+7, -.5e+7 =-.5e+7 ); /* loop to check that floatval() recognizes different float values,
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions floatval_basic.phpt floatval_error.phpt floatval_variation1.phpt
wharmby Sun Feb 1 18:32:42 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions floatval_error.phpt floatval_variation1.phpt floatval_basic.phpt Log: New floatval() tests. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/floatval_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/floatval_error.phpt +++ php-src/ext/standard/tests/general_functions/floatval_error.phpt --TEST-- Testing floatval() and its alias doubleval() : error conditions - wrong numbers of parametersns --FILE-- ?php /* Prototype: float floatval( mixed $var ); * Description: Returns the float value of var. */ echo *** Testing floatval() and doubleval() : error conditions ***\n; echo \n-- Testing floatval() and doubleval() function with no arguments --\n; var_dump( floatval() ); var_dump( doubleval() ); echo \n-- Testing floatval() and doubleval() function with more than expected no. of arguments --\n; var_dump( floatval(10.5, FALSE) ); var_dump( doubleval(10.5, FALSE) ); ? ===DONE=== --EXPECTF-- *** Testing floatval() and doubleval() : error conditions *** -- Testing floatval() and doubleval() function with no arguments -- Warning: floatval() expects exactly 1 parameter, 0 given in %s on line %d NULL Warning: doubleval() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing floatval() and doubleval() function with more than expected no. of arguments -- Warning: floatval() expects exactly 1 parameter, 2 given in %s on line %d NULL Warning: doubleval() expects exactly 1 parameter, 2 given in %s on line %d NULL ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/floatval_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/floatval_variation1.phpt +++ php-src/ext/standard/tests/general_functions/floatval_variation1.phpt --TEST-- Testing floatval() and its alias doubleval() functions : usage variations - different data types as $y arg --FILE-- ?php /* Prototype: float floatval( mixed $var ); * Description: Returns the float value of var. */ // get a resource type variable $fp = fopen (__FILE__, r); fclose($fp); $dfp = opendir ( dirname(__FILE__) ); closedir($dfp); // other types in an array $not_float_types = array ( -2147483648 = -2147483648, // max negative integer value 2147483647 = 2147483648, // max positive integer value file resoruce = $fp, directory resource = $dfp, \0.0\ = 0.0, // string \1.0\ = 1.0, \-1.3e3\ = -1.3e3, \bob-1.3e3\ = bob-1.3e3, \10 Some dollars\ = 10 Some dollars, \10.2 Some Dollars\ = 10.2 Some Dollars, \10.0 dollar\ + 1 = 10.0 dollar + 1, \10.0 dollar\ + 1.0 = 10.0 dollar + 1.0, \\ = , true = true, NULL = NULL, null = null, ); /* loop through the $not_float_types to see working of floatval() on non float types, expected output: float value valid floating point numbers */ echo \n*** Testing floatval() on non floating types ***\n; foreach ($not_float_types as $key = $type ) { echo \n-- Iteration : $key --\n; var_dump( floatval($type) ); } echo \n*** Testing doubleval() on non floating types ***\n; /* loop through the $not_float_types to see working of doubleval() on non float types, expected output: float value valid floating point numbers */ foreach ($not_float_types as $key = $type ) { echo \n-- Iteration : $key --\n; var_dump( doubleval($type) ); } ? ===DONE=== --EXPECTF-- *** Testing floatval() on non floating types *** -- Iteration : -2147483648 -- float(-2147483648) -- Iteration : 2147483647 -- float(2147483648) -- Iteration : file resoruce -- float(%d) -- Iteration : directory resource -- float(%d) -- Iteration : 0.0 -- float(0) -- Iteration : 1.0 -- float(1) -- Iteration : -1.3e3 -- float(-1300) -- Iteration : bob-1.3e3 -- float(0) -- Iteration : 10 Some dollars -- float(10) -- Iteration : 10.2 Some Dollars -- float(10.2) -- Iteration : 10.0 dollar + 1 -- float(11) -- Iteration : 10.0 dollar + 1.0 -- float(11) -- Iteration : -- float(0) -- Iteration : true -- float(1) -- Iteration : NULL -- float(0) -- Iteration : null -- float(0) *** Testing doubleval() on non floating types *** -- Iteration : -2147483648 -- float(-2147483648) -- Iteration : 2147483647 -- float(2147483648) -- Iteration : file resoruce -- float(%d) -- Iteration : directory resource -- float(%d) -- Iteration : 0.0 -- float(0) -- Iteration : 1.0 -- float(1) -- Iteration : -1.3e3 -- float(-1300) -- Iteration : bob-1.3e3 -- float(0) -- Iteration : 10 Some dollars -- float(10) --
[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions escapeshellarg_basic-win32.phpt escapeshellarg_basic.phpt escapeshellarg_error.phpt escapeshellarg_variation1-win32.phpt escapeshellarg_var
wharmby Sun Feb 1 18:39:48 2009 UTC Added files: /php-src/ext/standard/tests/general_functions escapeshellarg_basic-win32.phpt escapeshellarg_variation1.phpt escapeshellarg_variation1-win32.phpt escapeshellarg_error.phpt escapeshellarg_basic.phpt Log: New escapeshellarg() tests. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_basic-win32.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_basic-win32.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_basic-win32.phpt --TEST-- Test escapeshellarg() function: basic test --SKIPIF-- ?php if( substr(PHP_OS, 0, 3) != WIN ) die(skip.. only for Windows); ? --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c * Alias to functions: */ echo Simple testcase for escapeshellarg() function\n; var_dump(escapeshellarg(Mr O'Neil)); var_dump(escapeshellarg(Mr O\'Neil)); var_dump(escapeshellarg(%FILENAME)); var_dump(escapeshellarg()); echo Done\n; ? --EXPECT-- Simple testcase for escapeshellarg() function string(11) Mr O'Neil string(12) Mr O\'Neil string(11) FILENAME string(2) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt --TEST-- Test escapeshellarg() function : usage variations - different data types as $y arg --SKIPIF-- ?php if( substr(PHP_OS, 0, 3) == WIN ) die(skip.. Do not run on Windows); ? --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c */ echo *** Testing escapeshellarg() : usage variations ***\n; //get an unset variable $unset_var = 10; unset ($unset_var); // heredoc string $heredoc = EOT abc xyz EOT; // get a resource variable $fp = fopen(__FILE__, r); $inputs = array( // int data /*1*/ 0, 1, 12, -12, 2147483647, // float data /*6*/ 10.5, -10.5, 1.234567e2, 1.234567E-2, .5, // null data /*11*/ NULL, null, // boolean data /*13*/ true, false, TRUE, FALSE, // empty data /*17*/ , '', // undefined data /*19*/ @$undefined_var, // unset data /*20*/ @$unset_var, ); // loop through each element of $inputs to check the behaviour of escapeshellarg() $iterator = 1; foreach($inputs as $input) { echo \n-- Iteration $iterator --\n; var_dump(escapeshellarg($input)); $iterator++; }; ? ===Done=== --EXPECT-- *** Testing escapeshellarg() : usage variations *** -- Iteration 1 -- string(3) '0' -- Iteration 2 -- string(3) '1' -- Iteration 3 -- string(4) '12' -- Iteration 4 -- string(5) '-12' -- Iteration 5 -- string(12) '2147483647' -- Iteration 6 -- string(6) '10.5' -- Iteration 7 -- string(7) '-10.5' -- Iteration 8 -- string(10) '123.4567' -- Iteration 9 -- string(12) '0.01234567' -- Iteration 10 -- string(5) '0.5' -- Iteration 11 -- string(2) '' -- Iteration 12 -- string(2) '' -- Iteration 13 -- string(3) '1' -- Iteration 14 -- string(2) '' -- Iteration 15 -- string(3) '1' -- Iteration 16 -- string(2) '' -- Iteration 17 -- string(2) '' -- Iteration 18 -- string(2) '' -- Iteration 19 -- string(2) '' -- Iteration 20 -- string(2) '' ===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt --TEST-- Test escapeshellarg() function : usage variations - different data types as $arg arg --SKIPIF-- ?php if( substr(PHP_OS, 0, 3) != WIN ) die(skip.. only for Windows); ? --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c */ echo *** Testing escapeshellarg() : usage variations ***\n; //get an unset variable $unset_var = 10; unset ($unset_var); // heredoc string $heredoc = EOT abc xyz EOT; // get a resource variable $fp = fopen(__FILE__, r); $inputs = array( // int data /*1*/ 0, 1, 12, -12,
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions escapeshellarg_basic-win32.phpt escapeshellarg_basic.phpt escapeshellarg_error.phpt escapeshellarg_variation1-win32.phpt escapeshe
wharmby Sun Feb 1 18:39:50 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions escapeshellarg_basic.phpt escapeshellarg_error.phpt escapeshellarg_variation1-win32.phpt escapeshellarg_variation1.phpt escapeshellarg_basic-win32.phpt Log: New escapeshellarg() tests. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_basic.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_basic.phpt --TEST-- Test escapeshellarg() function: basic test --SKIPIF-- ?php if( substr(PHP_OS, 0, 3) == WIN ) die(skip.. Do not run on Windows); ? --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c * Alias to functions: */ echo Simple testcase for escapeshellarg() function\n; var_dump(escapeshellarg(Mr O'Neil)); var_dump(escapeshellarg(Mr O\'Neil)); var_dump(escapeshellarg(%FILENAME)); var_dump(escapeshellarg()); echo Done\n; ? --EXPECT-- Simple testcase for escapeshellarg() function string(14) 'Mr O'\''Neil' string(15) 'Mr O\'\''Neil' string(11) '%FILENAME' string(2) '' Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_error.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_error.phpt --TEST-- Test escapeshellarg() function : error conditions - wrong numbers of parameters --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c */ /* * Pass an incorrect number of arguments to escapeshellarg() to test behaviour */ echo *** Testing escapeshellarg() : error conditions ***\n; echo \n-- Testing escapeshellarg() function with no arguments --\n; var_dump( escapeshellarg() ); echo \n-- Testing escapeshellarg() function with more than expected no. of arguments --\n; $arg = Mr O'Neil; $extra_arg = 10; var_dump( escapeshellarg($arg, $extra_arg) ); echo \n-- Testing escapeshellarg() function with a object supplied for argument --\n; class classA { } $arg = new classA(); var_dump( escapeshellarg($arg)); echo \n-- Testing escapeshellarg() function with a resource supplied for argument --\n; $fp = fopen(__FILE__, r); var_dump( escapeshellarg($fp)); fclose($fp); echo \n-- Testing escapeshellarg() function with a array supplied for argument --\n; $arg = array(1,2,3); var_dump( escapeshellarg($arg)); ? ===Done=== --EXPECTF-- *** Testing escapeshellarg() : error conditions *** -- Testing escapeshellarg() function with no arguments -- Warning: escapeshellarg() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing escapeshellarg() function with more than expected no. of arguments -- Warning: escapeshellarg() expects exactly 1 parameter, 2 given in %s on line %d NULL -- Testing escapeshellarg() function with a object supplied for argument -- Warning: escapeshellarg() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d NULL -- Testing escapeshellarg() function with a resource supplied for argument -- Warning: escapeshellarg() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d NULL -- Testing escapeshellarg() function with a array supplied for argument -- Warning: escapeshellarg() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d NULL ===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt --TEST-- Test escapeshellarg() function : usage variations - different data types as $arg arg --SKIPIF-- ?php if( substr(PHP_OS, 0, 3) != WIN ) die(skip.. only for Windows); ? --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c */ echo *** Testing escapeshellarg() : usage variations ***\n; //get an unset variable $unset_var = 10; unset ($unset_var); // heredoc string $heredoc = EOT abc xyz EOT; // get a resource variable $fp = fopen(__FILE__, r); $inputs = array( // int data /*1*/ 0,
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions escapeshellarg_basic-win32.phpt escapeshellarg_basic.phpt escapeshellarg_error.phpt escapeshellarg_variation1-win32.phpt escapeshe
wharmby Sun Feb 1 18:39:52 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions escapeshellarg_error.phpt escapeshellarg_variation1.phpt escapeshellarg_basic.phpt escapeshellarg_basic-win32.phpt escapeshellarg_variation1-win32.phpt Log: New escapeshellarg() tests. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_error.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_error.phpt --TEST-- Test escapeshellarg() function : error conditions - wrong numbers of parameters --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c */ /* * Pass an incorrect number of arguments to escapeshellarg() to test behaviour */ echo *** Testing escapeshellarg() : error conditions ***\n; echo \n-- Testing escapeshellarg() function with no arguments --\n; var_dump( escapeshellarg() ); echo \n-- Testing escapeshellarg() function with more than expected no. of arguments --\n; $arg = Mr O'Neil; $extra_arg = 10; var_dump( escapeshellarg($arg, $extra_arg) ); echo \n-- Testing escapeshellarg() function with a object supplied for argument --\n; class classA { } $arg = new classA(); var_dump( escapeshellarg($arg)); echo \n-- Testing escapeshellarg() function with a resource supplied for argument --\n; $fp = fopen(__FILE__, r); var_dump( escapeshellarg($fp)); fclose($fp); echo \n-- Testing escapeshellarg() function with a array supplied for argument --\n; $arg = array(1,2,3); var_dump( escapeshellarg($arg)); ? ===Done=== --EXPECTF-- *** Testing escapeshellarg() : error conditions *** -- Testing escapeshellarg() function with no arguments -- Warning: escapeshellarg() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing escapeshellarg() function with more than expected no. of arguments -- Warning: escapeshellarg() expects exactly 1 parameter, 2 given in %s on line %d NULL -- Testing escapeshellarg() function with a object supplied for argument -- Warning: escapeshellarg() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d NULL -- Testing escapeshellarg() function with a resource supplied for argument -- Warning: escapeshellarg() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d NULL -- Testing escapeshellarg() function with a array supplied for argument -- Warning: escapeshellarg() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d NULL ===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt +++ php-src/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt --TEST-- Test escapeshellarg() function : usage variations - different data types as $y arg --SKIPIF-- ?php if( substr(PHP_OS, 0, 3) == WIN ) die(skip.. Do not run on Windows); ? --FILE-- ?php /* Prototype : string escapeshellarg ( string $arg ) * Description: Escape a string to be used as a shell argument. * Source code: ext/standard/exec.c */ echo *** Testing escapeshellarg() : usage variations ***\n; //get an unset variable $unset_var = 10; unset ($unset_var); // heredoc string $heredoc = EOT abc xyz EOT; // get a resource variable $fp = fopen(__FILE__, r); $inputs = array( // int data /*1*/ 0, 1, 12, -12, 2147483647, // float data /*6*/ 10.5, -10.5, 1.234567e2, 1.234567E-2, .5, // null data /*11*/ NULL, null, // boolean data /*13*/ true, false, TRUE, FALSE, // empty data /*17*/ , '', // undefined data /*19*/ @$undefined_var, // unset data /*20*/ @$unset_var, ); // loop through each element of $inputs to check the behaviour of escapeshellarg() $iterator = 1; foreach($inputs as $input) { echo \n-- Iteration $iterator --\n; var_dump(escapeshellarg($input)); $iterator++; }; ? ===Done=== --EXPECT-- *** Testing escapeshellarg() : usage variations *** -- Iteration 1 -- string(3) '0' -- Iteration 2 -- string(3) '1' -- Iteration 3 -- string(4) '12' -- Iteration 4 -- string(5) '-12' -- Iteration 5 -- string(12) '2147483647' -- Iteration 6 -- string(6) '10.5' -- Iteration 7 -- string(7) '-10.5'
[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions get_defined_vars_basic.phpt get_include_path_basic.phpt get_included_files.phpt get_included_files_inc1.inc get_included_files_inc2.inc get
wharmby Sun Feb 1 18:55:24 2009 UTC Added files: /php-src/ext/standard/tests/general_functions get_magic_quotes_runtime.phpt get_included_files_inc3.inc get_included_files_inc2.inc getmypid_basic.phpt get_included_files_inc1.inc get_included_files.phpt get_magic_quotes_gpc.phpt get_include_path_basic.phpt get_defined_vars_basic.phpt Log: New get_defined_vars(), get_included_files(), get_magic_quotes() and getmypid() tests. Tested on Winows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt +++ php-src/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt --TEST-- Test get_magic_quotes_runtime() function --FILE-- ?php /* Prototype: int get_magic_quotes_runtime ( void ) * Description: Gets the current active configuration setting of magic_quotes_runtime * * On PHP 6 this function always returns FALSE */ echo Simple testcase for get_magic_quotes_runtime() function\n; var_dump(get_magic_quotes_runtime()); echo \n-- Error cases --\n; // no checks on number of args var_dump(get_magic_quotes_runtime(true)); ? ===DONE=== --EXPECTF-- Simple testcase for get_magic_quotes_runtime() function bool(false) -- Error cases -- bool(false) ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_included_files_inc3.inc?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_included_files_inc3.inc +++ php-src/ext/standard/tests/general_functions/get_included_files_inc3.inc ?php /* dummy include*/ include(dirname(__FILE__)./get_included_files_inc1.inc); ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_included_files_inc2.inc?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_included_files_inc2.inc +++ php-src/ext/standard/tests/general_functions/get_included_files_inc2.inc ?php /* dummy include*/ include(dirname(__FILE__)./get_included_files_inc3.inc); ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getmypid_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/getmypid_basic.phpt +++ php-src/ext/standard/tests/general_functions/getmypid_basic.phpt --TEST-- Test getmypid() function: basic test --FILE-- ?php /* Prototype : int getmypid ( void ) * Description: Gets the current PHP process ID. * Source code: ext/standard/pageinfo.c * Alias to functions: */ echo Simple testcase for getmypid() function\n; var_dump(getmypid()); echo Done\n; ? --EXPECTF-- Simple testcase for getmypid() function int(%d) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc +++ php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc ?php /* dummy include*/ ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_included_files.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_included_files.phpt +++ php-src/ext/standard/tests/general_functions/get_included_files.phpt --TEST-- Test get_include_files() function --INI-- include_path=. --FILE-- ?php /* Prototype: array get_included_files ( void ) * Description: Returns an array with the names of included or required files */ echo *** Testing get_included_files()\n; echo \n-- List included files at start --\n; var_dump(get_included_files()); include(dirname(__FILE__)./get_included_files_inc1.inc); echo \n-- List included files atfter including inc1 -\n; var_dump(get_included_files()); include(dirname(__FILE__)./get_included_files_inc2.inc); echo \n-- List included files atfter including inc2 which will include inc3 which includes inc1 --\n; var_dump(get_included_files()); echo \n-- Error cases --\n; var_dump(get_included_files(true)); ? ===DONE=== --EXPECTF-- *** Testing get_included_files() -- List included files at start -- array(1) { [0]= unicode(%d) %sget_included_files.php } -- List included files atfter including inc1 - array(2) { [0]= unicode(%d) %sget_included_files.php [1]= unicode(%d) %sget_included_files_inc1.inc } -- List included files atfter including inc2 which will include inc3 which includes inc1 -- array(4) {
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions get_defined_vars_basic.phpt get_include_path_basic.phpt get_included_files.phpt get_included_files_inc1.inc get_included_files_inc
wharmby Sun Feb 1 18:55:26 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions get_defined_vars_basic.phpt get_included_files_inc1.inc get_magic_quotes_gpc.phpt get_included_files_inc3.inc get_included_files_inc2.inc get_included_files.phpt get_magic_quotes_runtime.phpt get_include_path_basic.phpt getmypid_basic.phpt Log: New get_defined_vars(), get_included_files(), get_magic_quotes() and getmypid() tests. Tested on Winows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_defined_vars_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_defined_vars_basic.phpt +++ php-src/ext/standard/tests/general_functions/get_defined_vars_basic.phpt --TEST-- Test get_defined_vars() function --FILE-- ?php /* Prototype: array get_defined_vars ( void ) Description: This function returns a multidimensional array containing a list of all defined variables, be them environment, server or user-defined variables, within the scope that get_defined_vars() is called. */ echo Simple testcase for get_defined_vars() function\n\n; function f1() { echo \n-- Function f1() called --\n; $vars = get_defined_vars(); if (count($vars) != 0) { echo TEST FAILED\n; } echo \n-- ..define some local variables --\n; $i = 123; $f = 123.456; $b = false; $s = Hello World; $arr = array(1,2,3,4); var_dump( get_defined_vars() ); f2(); } function f2() { echo \n -- Function f2() called --\n; $vars= get_defined_vars(); if (count($vars) != 0) { echo TEST FAILED\n; } echo \n-- ...define some variables --\n; $i = 456; $f = 456.678; $b = true; $s = Goodnight; $arr = array(foo, bar); var_dump( get_defined_vars() ); echo \n-- ...define some more variables --\n; $i1 = 456; $f1 = 456.678; $b1 = true; var_dump( get_defined_vars() ); } echo \n-- Get variables at global scope --\n; $vars = get_defined_vars(); if (count($vars) == 0) { echo TEST FAILED - Global variables missing at global scope\n; } // call a function f1(); ? ===DONE=== --EXPECT-- Simple testcase for get_defined_vars() function -- Get variables at global scope -- -- Function f1() called -- -- ..define some local variables -- array(6) { [uvars]= array(0) { } [ui]= int(123) [uf]= float(123.456) [ub]= bool(false) [us]= unicode(11) Hello World [uarr]= array(4) { [0]= int(1) [1]= int(2) [2]= int(3) [3]= int(4) } } -- Function f2() called -- -- ...define some variables -- array(6) { [uvars]= array(0) { } [ui]= int(456) [uf]= float(456.678) [ub]= bool(true) [us]= unicode(9) Goodnight [uarr]= array(2) { [0]= unicode(3) foo [1]= unicode(3) bar } } -- ...define some more variables -- array(9) { [uvars]= array(0) { } [ui]= int(456) [uf]= float(456.678) [ub]= bool(true) [us]= unicode(9) Goodnight [uarr]= array(2) { [0]= unicode(3) foo [1]= unicode(3) bar } [ui1]= int(456) [uf1]= float(456.678) [ub1]= bool(true) } ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc +++ php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc ?php /* dummy include*/ ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt +++ php-src/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt --TEST-- Test get_magic_quotes_gpc() function --FILE-- ?php /* Prototype: int get_magic_quotes_gpc ( void ) * Description: Gets the current configuration setting of magic quotes gpc * * On PHP 6 this function always returns FALSE */ echo Simple testcase for get_magic_quotes_gpc() function\n; var_dump(get_magic_quotes_gpc()); echo \n-- Error cases --\n; // no checks on number of args var_dump(get_magic_quotes_gpc(true)); ? ===DONE=== --EXPECT-- Simple testcase for get_magic_quotes_gpc() function bool(false) -- Error cases -- bool(false) ===DONE===
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions get_defined_vars_basic.phpt get_include_path_basic.phpt get_included_files.phpt get_included_files_inc1.inc get_included_files_inc
wharmby Sun Feb 1 18:55:28 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions get_magic_quotes_gpc.phpt get_magic_quotes_runtime.phpt get_include_path_basic.phpt get_included_files_inc1.inc get_included_files_inc3.inc get_defined_vars_basic.phpt get_included_files_inc2.inc get_included_files.phpt getmypid_basic.phpt Log: New get_defined_vars(), get_included_files(), get_magic_quotes() and getmypid() tests. Tested on Winows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt +++ php-src/ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt --TEST-- Test get_magic_quotes_gpc() function --FILE-- ?php /* Prototype: int get_magic_quotes_gpc ( void ) * Description: Gets the current configuration setting of magic quotes gpc * * On PHP 6 this function always returns FALSE */ echo Simple testcase for get_magic_quotes_gpc() function\n; var_dump(get_magic_quotes_gpc()); echo \n-- Error cases --\n; // no checks on number of args var_dump(get_magic_quotes_gpc(true)); ? ===DONE=== --EXPECT-- Simple testcase for get_magic_quotes_gpc() function bool(false) -- Error cases -- bool(false) ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt +++ php-src/ext/standard/tests/general_functions/get_magic_quotes_runtime.phpt --TEST-- Test get_magic_quotes_runtime() function --FILE-- ?php /* Prototype: int get_magic_quotes_runtime ( void ) * Description: Gets the current active configuration setting of magic_quotes_runtime * * On PHP 6 this function always returns FALSE */ echo Simple testcase for get_magic_quotes_runtime() function\n; var_dump(get_magic_quotes_runtime()); echo \n-- Error cases --\n; // no checks on number of args var_dump(get_magic_quotes_runtime(true)); ? ===DONE=== --EXPECTF-- Simple testcase for get_magic_quotes_runtime() function bool(false) -- Error cases -- bool(false) ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_include_path_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_include_path_basic.phpt +++ php-src/ext/standard/tests/general_functions/get_include_path_basic.phpt --TEST-- Test get_include_path() function --INI-- include_path=. --FILE-- ?php /* Prototype: string get_include_path ( void ) * Description: Gets the current include_path configuration option */ echo *** Testing get_include_path()\n; var_dump(get_include_path()); if (ini_get(include_path) == get_include_path()) { echo PASSED\n; } else { echo FAILED\n; } echo \nError cases:\n; var_dump(get_include_path(TRUE)); ? ===DONE=== --EXPECTF-- *** Testing get_include_path() unicode(1) . PASSED Error cases: Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d NULL ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc +++ php-src/ext/standard/tests/general_functions/get_included_files_inc1.inc ?php /* dummy include*/ ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_included_files_inc3.inc?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_included_files_inc3.inc +++ php-src/ext/standard/tests/general_functions/get_included_files_inc3.inc ?php /* dummy include*/ include(dirname(__FILE__)./get_included_files_inc1.inc); ? http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_defined_vars_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_defined_vars_basic.phpt +++ php-src/ext/standard/tests/general_functions/get_defined_vars_basic.phpt --TEST-- Test get_defined_vars() function --FILE-- ?php /* Prototype: array get_defined_vars ( void ) Description: This function returns a multidimensional array containing a list of all defined variables, be them environment, server or user-defined variables, within the scope that get_defined_vars() is called. */ echo Simple
[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions php_uname_basic.phpt php_uname_error.phpt php_uname_variation1.phpt
wharmby Sun Feb 1 19:17:46 2009 UTC Added files: /php-src/ext/standard/tests/general_functions php_uname_variation1.phpt php_uname_error.phpt php_uname_basic.phpt Log: New php_uname() tests. Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt --TEST-- Test php_uname() function - usage variations --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - usage variations\n; // Prevent notices about undefines variables error_reporting(E_ALL ~E_NOTICE); $unset_var = 10; unset ($unset_var); class fooClass { function __toString() { return m; } } $values = array( // int data 0 = 0, 1 = 1, 12345 = 12345, -2345 = -2345, // float data 10.5 = 10.5, -10.5 = -10.5, 10.1234567e10 = 10.1234567e10, 10.7654321E-10 = 10.7654321E-10, .5 = .5, // null data NULL = NULL, null = null, // boolean data true = true, false = false, TRUE = TRUE, FALSE = FALSE, // empty data \\ = , '' = '', // object data new fooClass() = new fooClass(), // undefined data undefined var = $undefined_var, // unset data unset var = $unset_var, ); // loop through each element of the array for data foreach($values as $key = $value) { echo -- Iterator $key --\n; var_dump( php_uname($value) ); }; ? ===DONE=== --EXPECTF-- *** Testing php_uname() - usage variations -- Iterator 0 -- unicode(%d) %s -- Iterator 1 -- unicode(%d) %s -- Iterator 12345 -- unicode(%d) %s -- Iterator -2345 -- unicode(%d) %s -- Iterator 10.5 -- unicode(%d) %s -- Iterator -10.5 -- unicode(%d) %s -- Iterator 10.1234567e10 -- unicode(%d) %s -- Iterator 10.7654321E-10 -- unicode(%d) %s -- Iterator .5 -- unicode(%d) %s -- Iterator NULL -- unicode(%d) %s -- Iterator null -- unicode(%d) %s -- Iterator true -- unicode(%d) %s -- Iterator false -- unicode(%d) %s -- Iterator TRUE -- unicode(%d) %s -- Iterator FALSE -- unicode(%d) %s -- Iterator -- unicode(%d) %s -- Iterator '' -- unicode(%d) %s -- Iterator new fooClass() -- unicode(%d) %s -- Iterator undefined var -- unicode(%d) %s -- Iterator unset var -- unicode(%d) %s ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_error.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_error.phpt --TEST-- Test php_uname() function - error conditions - pass function incorrect arguments --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - error test\n; echo \n-- Testing php_uname() function with more than expected no. of arguments --\n; var_dump( php_uname('a', true) ); echo \n-- Testing php_uname() function with invalid mode --\n; // am invalid mode shoudl result in same o/p as mode 'a' var_dump( php_uname('z') == php_uname('z') ); class barClass { } $fp = fopen(__FILE__, r); echo \n-- Testing php_uname() function with invalid argument types --\n; var_dump(php_uname(array())); var_dump(php_uname(array('color' = 'red', 'item' = 'pen'))); var_dump(php_uname(new barClass())); var_dump(php_uname($fp)); fclose($fp); ? ===DONE=== --EXPECTF-- *** Testing php_uname() - error test -- Testing php_uname() function with more than expected no. of arguments -- Warning: php_uname() expects at most 1 parameter, 2 given in %s on line %d NULL -- Testing php_uname() function with invalid mode -- bool(true) -- Testing php_uname() function with invalid argument types -- Warning: php_uname() expects parameter 1 to be binary string, array given in %s on line %d NULL Warning: php_uname() expects parameter 1 to be binary string, array given in %s on line %d NULL Warning: php_uname() expects parameter 1 to be binary string, object given in %s
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions php_uname_basic.phpt php_uname_error.phpt php_uname_variation1.phpt
wharmby Sun Feb 1 19:17:48 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions php_uname_basic.phpt php_uname_variation1.phpt php_uname_error.phpt Log: New php_uname() tests. Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_basic.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_basic.phpt --TEST-- Test php_uname() function - basic test --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - basic test\n; var_dump(php_uname()); echo \n-- Try all the defined mode's --\n; var_dump(php_uname('a')); var_dump(php_uname('s')); var_dump(php_uname('n')); var_dump(php_uname('r')); var_dump(php_uname('v')); var_dump(php_uname('m')); ? ===DONE=== --EXPECTF-- *** Testing php_uname() - basic test unicode(%d) %s -- Try all the defined mode's -- unicode(%d) %s unicode(%d) %s unicode(%d) %s unicode(%d) %s unicode(%d) %s unicode(%d) %s ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt --TEST-- Test php_uname() function - usage variations --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - usage variations\n; // Prevent notices about undefines variables error_reporting(E_ALL ~E_NOTICE); $unset_var = 10; unset ($unset_var); class fooClass { function __toString() { return m; } } $values = array( // int data 0 = 0, 1 = 1, 12345 = 12345, -2345 = -2345, // float data 10.5 = 10.5, -10.5 = -10.5, 10.1234567e10 = 10.1234567e10, 10.7654321E-10 = 10.7654321E-10, .5 = .5, // null data NULL = NULL, null = null, // boolean data true = true, false = false, TRUE = TRUE, FALSE = FALSE, // empty data \\ = , '' = '', // object data new fooClass() = new fooClass(), // undefined data undefined var = $undefined_var, // unset data unset var = $unset_var, ); // loop through each element of the array for data foreach($values as $key = $value) { echo -- Iterator $key --\n; var_dump( php_uname($value) ); }; ? ===DONE=== --EXPECTF-- *** Testing php_uname() - usage variations -- Iterator 0 -- unicode(%d) %s -- Iterator 1 -- unicode(%d) %s -- Iterator 12345 -- unicode(%d) %s -- Iterator -2345 -- unicode(%d) %s -- Iterator 10.5 -- unicode(%d) %s -- Iterator -10.5 -- unicode(%d) %s -- Iterator 10.1234567e10 -- unicode(%d) %s -- Iterator 10.7654321E-10 -- unicode(%d) %s -- Iterator .5 -- unicode(%d) %s -- Iterator NULL -- unicode(%d) %s -- Iterator null -- unicode(%d) %s -- Iterator true -- unicode(%d) %s -- Iterator false -- unicode(%d) %s -- Iterator TRUE -- unicode(%d) %s -- Iterator FALSE -- unicode(%d) %s -- Iterator -- unicode(%d) %s -- Iterator '' -- unicode(%d) %s -- Iterator new fooClass() -- unicode(%d) %s -- Iterator undefined var -- unicode(%d) %s -- Iterator unset var -- unicode(%d) %s ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_error.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_error.phpt --TEST-- Test php_uname() function - error conditions - pass function incorrect arguments --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - error test\n; echo \n-- Testing php_uname() function with more than expected no. of arguments --\n; var_dump( php_uname('a', true) ); echo \n-- Testing php_uname() function with invalid mode --\n; // am invalid mode shoudl result in same o/p as mode 'a' var_dump( php_uname('z') == php_uname('z') ); class
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions php_uname_basic.phpt php_uname_error.phpt php_uname_variation1.phpt
wharmby Sun Feb 1 19:17:50 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions php_uname_basic.phpt php_uname_error.phpt php_uname_variation1.phpt Log: New php_uname() tests. Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_basic.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_basic.phpt --TEST-- Test php_uname() function - basic test --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - basic test\n; var_dump(php_uname()); echo \n-- Try all the defined mode's --\n; var_dump(php_uname('a')); var_dump(php_uname('s')); var_dump(php_uname('n')); var_dump(php_uname('r')); var_dump(php_uname('v')); var_dump(php_uname('m')); ? ===DONE=== --EXPECTF-- *** Testing php_uname() - basic test unicode(%d) %s -- Try all the defined mode's -- unicode(%d) %s unicode(%d) %s unicode(%d) %s unicode(%d) %s unicode(%d) %s unicode(%d) %s ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_error.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_error.phpt --TEST-- Test php_uname() function - error conditions - pass function incorrect arguments --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - error test\n; echo \n-- Testing php_uname() function with more than expected no. of arguments --\n; var_dump( php_uname('a', true) ); echo \n-- Testing php_uname() function with invalid mode --\n; // am invalid mode shoudl result in same o/p as mode 'a' var_dump( php_uname('z') == php_uname('z') ); class barClass { } $fp = fopen(__FILE__, r); echo \n-- Testing php_uname() function with invalid argument types --\n; var_dump(php_uname(array())); var_dump(php_uname(array('color' = 'red', 'item' = 'pen'))); var_dump(php_uname(new barClass())); var_dump(php_uname($fp)); fclose($fp); ? ===DONE=== --EXPECTF-- *** Testing php_uname() - error test -- Testing php_uname() function with more than expected no. of arguments -- Warning: php_uname() expects at most 1 parameter, 2 given in %s on line %d NULL -- Testing php_uname() function with invalid mode -- bool(true) -- Testing php_uname() function with invalid argument types -- Warning: php_uname() expects parameter 1 to be binary string, array given in %s on line %d NULL Warning: php_uname() expects parameter 1 to be binary string, array given in %s on line %d NULL Warning: php_uname() expects parameter 1 to be binary string, object given in %s on line %d NULL Warning: php_uname() expects parameter 1 to be binary string, resource given in %s on line %d NULL ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt +++ php-src/ext/standard/tests/general_functions/php_uname_variation1.phpt --TEST-- Test php_uname() function - usage variations --FILE-- ?php /* Prototype: string php_uname ([ string $mode ] ) * Description: Returns information about the operating system PHP is running on */ echo *** Testing php_uname() - usage variations\n; // Prevent notices about undefines variables error_reporting(E_ALL ~E_NOTICE); $unset_var = 10; unset ($unset_var); class fooClass { function __toString() { return m; } } $values = array( // int data 0 = 0, 1 = 1, 12345 = 12345, -2345 = -2345, // float data 10.5 = 10.5, -10.5 = -10.5, 10.1234567e10 = 10.1234567e10, 10.7654321E-10 = 10.7654321E-10, .5 = .5, // null data NULL = NULL, null = null, // boolean data true = true, false = false, TRUE = TRUE, FALSE = FALSE, // empty data \\ = , '' = '', // object data new fooClass() = new fooClass(), // undefined data undefined var = $undefined_var, //
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions set_magic_quotes_runtime_basic.phpt set_magic_quotes_runtime_error.phpt set_magic_quotes_runtime_variation1.phpt
wharmby Sun Feb 1 19:29:31 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions set_magic_quotes_runtime_basic.phpt set_magic_quotes_runtime_variation1.phpt set_magic_quotes_runtime_error.phpt Log: New set_magic_quotes() tests. Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt +++ php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt --TEST-- Test set_magic_quotes_runtime() function - basic test --INI- magic_quotes_runtime = 0 --FILE-- ?php /* Prototype: bool set_magic_quotes_runtime ( int $new_setting ) * Description: Sets the current active configuration setting of magic_quotes_runtime * * On PHP 6 this fucntion is no longer supported */ echo Simple testcase for set_magic_quotes_runtime() function - basic test\n; echo \n-- Set magic quotes runtime to 1: --\n; var_dump(set_magic_quotes_runtime(1)); ? --EXPECTF-- Simple testcase for set_magic_quotes_runtime() function - basic test -- Set magic quotes runtime to 1: -- Fatal error: Call to undefined function set_magic_quotes_runtime() in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt +++ php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt +++ php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_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/general_functions set_magic_quotes_runtime_basic.phpt set_magic_quotes_runtime_error.phpt set_magic_quotes_runtime_variation1.phpt
wharmby Sun Feb 1 19:29:34 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions set_magic_quotes_runtime_basic.phpt set_magic_quotes_runtime_variation1.phpt set_magic_quotes_runtime_error.phpt Log: New set_magic_quotes() tests. Tested on Windows, Linux and linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt +++ php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt --TEST-- Test set_magic_quotes_runtime() function - basic test --INI- magic_quotes_runtime = 0 --FILE-- ?php /* Prototype: bool set_magic_quotes_runtime ( int $new_setting ) * Description: Sets the current active configuration setting of magic_quotes_runtime * * On PHP 6 this fucntion is no longer supported */ echo Simple testcase for set_magic_quotes_runtime() function - basic test\n; echo \n-- Set magic quotes runtime to 1: --\n; var_dump(set_magic_quotes_runtime(1)); ? --EXPECTF-- Simple testcase for set_magic_quotes_runtime() function - basic test -- Set magic quotes runtime to 1: -- Fatal error: Call to undefined function set_magic_quotes_runtime() in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt +++ php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt +++ php-src/ext/standard/tests/general_functions/set_magic_quotes_runtime_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/general_functions var_export.phpt var_export_basic1.phpt var_export_basic2.phpt var_export_basic3.phpt var_export_basic4.phpt var_export_basic5.phpt
wharmby Mon Jan 26 22:26:56 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions var_export_error1.phpt var_export_basic7.phpt var_export_basic3.phpt var_export_basic2.phpt var_export_basic8.phpt var_export_basic1.phpt var_export_error2.phpt var_export_basic4.phpt var_export_basic6.phpt var_export_error3.phpt var_export_basic5.phpt Removed files: /php-src/ext/standard/tests/general_functions var_export.phpt Log: Split-ip var_export.phpt and add new error tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_error1.phpt +++ php-src/ext/standard/tests/general_functions/var_export_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic7.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic3.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic2.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic8.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic1.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_error2.phpt +++ php-src/ext/standard/tests/general_functions/var_export_error2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic4.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic6.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_error3.phpt +++ php-src/ext/standard/tests/general_functions/var_export_error3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic5.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic5.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/general_functions var_export.phpt var_export_basic1.phpt var_export_basic2.phpt var_export_basic3.phpt var_export_basic4.phpt var_export_basic5.phpt
wharmby Mon Jan 26 22:27:00 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions var_export_basic3.phpt var_export_basic2.phpt var_export_basic1.phpt var_export_basic6.phpt var_export_error3.phpt var_export_basic7.phpt var_export_basic8.phpt var_export_error1.phpt var_export_error2.phpt var_export_basic5.phpt var_export_basic4.phpt Removed files: /php-src/ext/standard/tests/general_functions var_export.phpt Log: Split-ip var_export.phpt and add new error tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic3.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic2.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic1.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic6.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_error3.phpt +++ php-src/ext/standard/tests/general_functions/var_export_error3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic7.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic8.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_error1.phpt +++ php-src/ext/standard/tests/general_functions/var_export_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_error2.phpt +++ php-src/ext/standard/tests/general_functions/var_export_error2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic5.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/var_export_basic4.phpt +++ php-src/ext/standard/tests/general_functions/var_export_basic4.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/general_functions var_export.phpt var_export_basic1.phpt var_export_basic2.phpt var_export_basic3.phpt var_export_basic4.phpt var_export_basic5.phpt var_expo
wharmby Mon Jan 26 22:27:06 2009 UTC Removed files: /php-src/ext/standard/tests/general_functions var_export.phpt Modified files: /php-src/ext/standard/tests/general_functions var_export_error2.phpt var_export_error1.phpt var_export_basic4.phpt var_export_basic8.phpt var_export_basic5.phpt var_export_error3.phpt var_export_basic1.phpt var_export_basic7.phpt var_export_basic6.phpt var_export_basic2.phpt var_export_basic3.phpt Log: Split-ip var_export.phpt and add new error tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/var_export_error2.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/var_export_error2.phpt:1.2 --- /dev/null Mon Jan 26 22:27:04 2009 +++ php-src/ext/standard/tests/general_functions/var_export_error2.phpt Mon Jan 26 22:27:03 2009 @@ -0,0 +1,25 @@ +--TEST-- +Test var_export() function : error conditions - recursive object +--FILE-- +?php +/* Prototype : mixed var_export(mixed var [, bool return]) + * Description: Outputs or returns a string representation of a variable + * Source code: ext/standard/var.c + * Alias to functions: + */ + +...@$obj-p = $obj; +var_export($obj, true); + +? +===DONE=== +--EXPECTF-- +stdClass::__set_state(array( + 'p' = + stdClass::__set_state(array( + 'p' = +stdClass::__set_state(array( + 'p' = + stdClass::__set_state(array( + +Fatal error: Nesting level too deep - recursive dependency? in %s on line 9 \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_error1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/var_export_error1.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/var_export_error1.phpt:1.2 --- /dev/null Mon Jan 26 22:27:04 2009 +++ php-src/ext/standard/tests/general_functions/var_export_error1.phpt Mon Jan 26 22:27:03 2009 @@ -0,0 +1,38 @@ +--TEST-- +Test var_export() function : error conditions +--FILE-- +?php +/* Prototype : mixed var_export(mixed var [, bool return]) + * Description: Outputs or returns a string representation of a variable + * Source code: ext/standard/var.c + * Alias to functions: + */ + +echo *** Testing var_export() : error conditions ***\n; + +// Zero arguments +echo \n-- Testing var_export() function with Zero arguments --\n; +var_dump( var_export() ); + +//Test var_export with one more than the expected number of arguments +echo \n-- Testing var_export() function with more than expected no. of arguments --\n; +$var = 1; +$return = true; +$extra_arg = 10; +var_dump( var_export($var, $return, $extra_arg) ); + +? +===DONE=== +--EXPECTF-- +*** Testing var_export() : error conditions *** + +-- Testing var_export() function with Zero arguments -- + +Warning: var_export() expects at least 1 parameter, 0 given in %s on line 12 +NULL + +-- Testing var_export() function with more than expected no. of arguments -- + +Warning: var_export() expects at most 2 parameters, 3 given in %s on line 19 +NULL +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/var_export_basic4.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/var_export_basic4.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/var_export_basic4.phpt:1.2 --- /dev/null Mon Jan 26 22:27:04 2009 +++ php-src/ext/standard/tests/general_functions/var_export_basic4.phpt Mon Jan 26 22:27:04 2009 @@ -0,0 +1,147 @@ +--TEST-- +Test var_export() function with valid strings +--FILE-- +?php +/* Prototype : mixed var_export(mixed var [, bool return]) + * Description: Outputs or returns a string representation of a variable + * Source code: ext/standard/var.c + * Alias to functions: + */ + + +echo *** Testing var_export() with valid strings ***\n; +// different valid string +$valid_strings = array( +\\ = , +\ \ = , +'' = '', +' ' = ' ', +\string\ = string, +'string' = 'string', +\\\0Hello\\0 World\\0\ = \0Hello\0 World\0, +\NULL\ = NULL, +'null' = 'null', +
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions is_callable.phpt is_callable_basic1.phpt is_callable_basic2.phpt is_callable_error.phpt is_callable_variation1.phpt is_callable_va
wharmby Sun Jan 25 22:16:28 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions is_callable_variation1.phpt is_callable_error.phpt is_callable_variation2.phpt is_callable_basic2.phpt is_callable_basic1.phpt Removed files: /php-src/ext/standard/tests/general_functions is_callable.phpt Log: Split is_callable test. Test on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_variation1.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_error.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_variation2.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_basic2.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_basic1.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/general_functions is_callable.phpt is_callable_basic1.phpt is_callable_basic2.phpt is_callable_error.phpt is_callable_variation1.phpt is_callable_va
wharmby Sun Jan 25 22:16:33 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions is_callable_variation2.phpt is_callable_basic2.phpt is_callable_basic1.phpt is_callable_variation1.phpt is_callable_error.phpt Removed files: /php-src/ext/standard/tests/general_functions is_callable.phpt Log: Split is_callable test. Test on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_variation2.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_basic2.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_variation1.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/is_callable_error.phpt +++ php-src/ext/standard/tests/general_functions/is_callable_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/general_functions is_callable.phpt is_callable_basic1.phpt is_callable_basic2.phpt is_callable_error.phpt is_callable_variation1.phpt is_callable_variation2.
wharmby Sun Jan 25 22:16:38 2009 UTC Removed files: /php-src/ext/standard/tests/general_functions is_callable.phpt Modified files: /php-src/ext/standard/tests/general_functions is_callable_error.phpt is_callable_basic1.phpt is_callable_variation1.phpt is_callable_variation2.phpt is_callable_basic2.phpt Log: Split is_callable test. Test on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/is_callable_error.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/is_callable_error.phpt:1.2 --- /dev/null Sun Jan 25 22:16:38 2009 +++ php-src/ext/standard/tests/general_functions/is_callable_error.phpt Sun Jan 25 22:16:37 2009 @@ -0,0 +1,35 @@ +--TEST-- +Test is_callable() function +--INI-- +precision=14 +error_reporting = E_ALL ~E_NOTICE | E_STRICT +--FILE-- +?php +/* Prototype: bool is_callable ( mixed $var [, bool $syntax_only [, string $callable_name]] ); + Description: Verify that the contents of a variable can be called as a function +In case of objects, $var = array($SomeObject, 'MethodName') +*/ + +echo \n*** Testing error conditions ***\n; + +echo \n-- Testing is_callable() function with less than expected no. of arguments --\n; +var_dump( is_callable() ); + +echo \n-- Testing is_callable() function with more than expected no. of arguments --\n; +var_dump( is_callable(string, TRUE, $callable_name, EXTRA) ); + +? +===DONE=== +--EXPECTF-- +*** Testing error conditions *** + +-- Testing is_callable() function with less than expected no. of arguments -- + +Warning: is_callable() expects at least 1 parameter, 0 given in %s on line %d +NULL + +-- Testing is_callable() function with more than expected no. of arguments -- + +Warning: is_callable() expects at most 3 parameters, 4 given in %s on line %d +NULL +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt:1.2 --- /dev/null Sun Jan 25 22:16:38 2009 +++ php-src/ext/standard/tests/general_functions/is_callable_basic1.phpt Sun Jan 25 22:16:37 2009 @@ -0,0 +1,109 @@ +--TEST-- +Test is_callable() function : usage variations - defined functions +--INI-- +precision=14 +error_reporting = E_ALL ~E_NOTICE | E_STRICT +--FILE-- +?php +/* Prototype: bool is_callable ( mixed $var [, bool $syntax_only [, string $callable_name]] ); + * Description: Verify that the contents of a variable can be called as a function + * Source code: ext/imap/php_imap.c + */ + +/* Prototype: void check_iscallable( $functions ); + Description: use iscallable() on given string to check for valid function name +returns true if valid function name, false otherwise +*/ +function check_iscallable( $functions ) { + $counter = 1; + foreach($functions as $func) { +echo -- Iteration $counter --\n; +var_dump( is_callable($func) ); //given only $var argument +var_dump( is_callable($func, TRUE) ); //given $var and $syntax argument +var_dump( is_callable($func, TRUE, $callable_name) ); +echo $callable_name, \n; +var_dump( is_callable($func, FALSE) ); //given $var and $syntax argument +var_dump( is_callable($func, FALSE, $callable_name) ); +echo $callable_name, \n; +$counter++; + } +} + +echo \n*** Testing is_callable() on defined functions ***\n; +/* function name with simple string */ +function someFunction() { +} + +/* function name with mixed string and integer */ +function x123() { +} + +/* function name as NULL */ +function NULL() { +} + +/* function name with boolean name */ +function false() { +} + +/* function name with string and special character */ +function Hello_World() { +} + +$defined_functions = array ( + $functionVar1 = 'someFunction', + $functionVar2 = 'x123', + $functionVar3 = 'NULL', + $functionVar4 = 'false', + $functionVar5 = Hello_World +); +/* use check_iscallable() to check whether given string is valid function name + * expected: true as it is valid callback + */ +check_iscallable($defined_functions); + +? +===DONE=== +--EXPECT--- +*** Testing is_callable() on defined functions *** +-- Iteration 1 -- +bool(true) +bool(true) +bool(true) +someFunction +bool(true) +bool(true) +someFunction +-- Iteration 2 -- +bool(true) +bool(true) +bool(true) +x123 +bool(true) +bool(true) +x123 +--
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions get_extension_funcs_basic.phpt get_extension_funcs_error.phpt get_extension_funcs_variation.phpt getrusage_basic.phpt getrusage_er
wharmby Sat Jan 24 12:47:25 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions get_extension_funcs_basic.phpt get_extension_funcs_error.phpt getrusage_error.phpt get_extension_funcs_variation.phpt getrusage_variation1.phpt getrusage_basic.phpt Log: New get_extension_funcs() and getrusage() tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt +++ php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_extension_funcs_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_extension_funcs_error.phpt +++ php-src/ext/standard/tests/general_functions/get_extension_funcs_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/getrusage_error.phpt +++ php-src/ext/standard/tests/general_functions/getrusage_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt +++ php-src/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt +++ php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/getrusage_basic.phpt +++ php-src/ext/standard/tests/general_functions/getrusage_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_2) /ext/standard/tests/general_functions get_extension_funcs_basic.phpt get_extension_funcs_error.phpt get_extension_funcs_variation.phpt getrusage_basic.phpt getrusage_er
wharmby Sat Jan 24 12:47:28 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/general_functions getrusage_variation1.phpt get_extension_funcs_variation.phpt get_extension_funcs_error.phpt get_extension_funcs_basic.phpt getrusage_error.phpt getrusage_basic.phpt Log: New get_extension_funcs() and getrusage() tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt +++ php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt +++ php-src/ext/standard/tests/general_functions/get_extension_funcs_variation.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_extension_funcs_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_extension_funcs_error.phpt +++ php-src/ext/standard/tests/general_functions/get_extension_funcs_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt +++ php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/getrusage_error.phpt +++ php-src/ext/standard/tests/general_functions/getrusage_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/general_functions/getrusage_basic.phpt +++ php-src/ext/standard/tests/general_functions/getrusage_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/standard/tests/general_functions get_extension_funcs_basic.phpt get_extension_funcs_error.phpt get_extension_funcs_variation.phpt getrusage_basic.phpt getrusage_error.phpt
wharmby Sat Jan 24 12:47:36 2009 UTC Modified files: /php-src/ext/standard/tests/general_functions getrusage_basic.phpt get_extension_funcs_basic.phpt getrusage_variation1.phpt getrusage_error.phpt get_extension_funcs_variation.phpt get_extension_funcs_error.phpt Log: New get_extension_funcs() and getrusage() tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/getrusage_basic.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/getrusage_basic.phpt:1.2 --- /dev/null Sat Jan 24 12:47:36 2009 +++ php-src/ext/standard/tests/general_functions/getrusage_basic.phpt Sat Jan 24 12:47:36 2009 @@ -0,0 +1,33 @@ +--TEST-- +Test getrusage() function: basic test +--SKIPIF-- +?php +if( substr(PHP_OS, 0, 3) == WIN ) + die(skip.. Do not run on Windows); +? +--FILE-- +?php +/* Prototype : array getrusage ([ int $who ] ) + * Description: Gets the current resource usages + * Source code: ext/standard/microtime.c + * Alias to functions: + */ + +echo Simple testcase for getrusage() function\n; + +$dat = getrusage(); + +if (!is_array($dat)) { + echo TEST FAILED : getrusage shoudl return an array\n; +} + +// echo the fields which are common to all platforms +echo User time used (seconds) . $dat[ru_utime.tv_sec] . \n; +echo User time used (microseconds) . $dat[ru_utime.tv_usec] . \n; +? +===DONE=== +--EXPECTF-- +Simple testcase for getrusage() function +User time used (seconds) %d +User time used (microseconds) %d +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt:1.2 --- /dev/null Sat Jan 24 12:47:36 2009 +++ php-src/ext/standard/tests/general_functions/get_extension_funcs_basic.phpt Sat Jan 24 12:47:36 2009 @@ -0,0 +1,23 @@ +--TEST-- +Test get_extension_funcs() function: basic test +--FILE-- +?php +/* Prototype : array get_extension_funcs ( string $module_name ) + * Description: Returns an array with the names of the functions of a module. + * Source code: Zend/zend_builtin_functions.c + * Alias to functions: + */ + +echo Simple testcase for get_extension_funcs() function\n; + +$result = get_extension_funcs(standard); +var_dump(gettype($result)); +var_dump(in_array(cos, $result)); + +? +===DONE=== +--EXPECTF-- +Simple testcase for get_extension_funcs() function +unicode(5) array +bool(true) +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt:1.2 --- /dev/null Sat Jan 24 12:47:36 2009 +++ php-src/ext/standard/tests/general_functions/getrusage_variation1.phpt Sat Jan 24 12:47:36 2009 @@ -0,0 +1,142 @@ +--TEST-- +Test getrusage() function : usage variation - diff data types as $who arg +--SKIPIF-- +?php +if( substr(PHP_OS, 0, 3) == WIN ) + die(skip.. Do not run on Windows); +? +--FILE-- +?php +/* Prototype : array getrusage ([ int $who ] ) + * Description: Gets the current resource usages + * Source code: ext/standard/microtime.c + * Alias to functions: + */ + + +/* + * Pass different data types as $who argument to test behaviour of getrusage() + */ + +echo *** Testing getrusage() : usage variations ***\n; + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + + +// unexpected values to be passed to $stream_id 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, + + // string data +/*16*/ 0, + '1', + 1232456, + 1.23E4, + + // undefined data +/*20*/ @$undefined_var, + + // unset data +/*21*/ @$unset_var, +); + +// loop through each element of $inputs to check the behavior of getrusage() +$iterator = 1; +foreach($inputs as $input) { + echo \n-- Iteration $iterator --\n; + $res = getrusage($input); + echo User time used (microseconds) . $res[ru_utime.tv_usec] . \n; + $iterator++; +} +? +===DONE===
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/image 200x100.GIF 200x100.JPG 200x100.PNG 200x100.TIF 200x100.gif 200x100.jpg 200x100.png 200x100.tif getimagesize_basic.phpt
wharmby Fri Jan 23 11:18:33 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/image 200x100.tif 200x100.gif 200x100.png 200x100.jpg Removed files: /php-src/ext/standard/tests/image 200x100.GIF 200x100.PNG 200x100.TIF 200x100.JPG Modified files: /php-src/ext/standard/tests/image getimagesize_basic.phpt Log: Fix names of new image files. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_basic.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/image/getimagesize_basic.phpt diff -u php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2.2.2 php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2.2.3 --- php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2.2.2Thu Jan 22 22:59:45 2009 +++ php-src/ext/standard/tests/image/getimagesize_basic.phptFri Jan 23 11:18:30 2009 @@ -9,13 +9,13 @@ $imagetype_filenames = array( // GIF file - GIF image file = 200x100.GIF, + GIF image file = 200x100.gif, //JPEG file - JPEG image file = 200x100.JPG, + JPEG image file = 200x100.jpg, //PNG file - PNG image file = 200x100.PNG, + PNG image file = 200x100.png, //SWF file SWF image file = 200x100.swf, @@ -24,7 +24,7 @@ BMP image file = 200x100.bmp, //TIFF intel byte order - TIFF intel byte order image file = 200x100.TIF, + TIFF intel byte order image file = 200x100.tif, //JPC file JPC image file = test1pix.jpc, @@ -49,7 +49,7 @@ --EXPECTF-- *** Testing getimagesize() : basic functionality *** --- GIF image file (200x100.GIF) -- +-- GIF image file (200x100.gif) -- array(7) { [0]= int(200) @@ -69,7 +69,7 @@ array(0) { } --- JPEG image file (200x100.JPG) -- +-- JPEG image file (200x100.jpg) -- array(7) { [0]= int(200) @@ -91,7 +91,7 @@ string(%d)%s } --- PNG image file (200x100.PNG) -- +-- PNG image file (200x100.png) -- array(6) { [0]= int(200) @@ -143,7 +143,7 @@ array(0) { } --- TIFF intel byte order image file (200x100.TIF) -- +-- TIFF intel byte order image file (200x100.tif) -- array(5) { [0]= int(200) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.tif?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/200x100.tif +++ php-src/ext/standard/tests/image/200x100.tif -- 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/image 200x100.GIF 200x100.JPG 200x100.PNG 200x100.TIF 200x100.gif 200x100.jpg 200x100.png 200x100.tif getimagesize_basic.phpt
wharmby Fri Jan 23 11:18:36 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/image 200x100.tif 200x100.jpg 200x100.png 200x100.gif Removed files: /php-src/ext/standard/tests/image 200x100.TIF 200x100.PNG 200x100.JPG 200x100.GIF Modified files: /php-src/ext/standard/tests/image getimagesize_basic.phpt Log: Fix names of new image files. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_basic.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/image/getimagesize_basic.phpt diff -u php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.1.2.1 php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.1.2.2 --- php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.1.2.1Fri Jun 13 13:31:18 2008 +++ php-src/ext/standard/tests/image/getimagesize_basic.phptFri Jan 23 11:18:36 2009 @@ -1,219 +1,219 @@ ---TEST-- -Test getimagesize() function : basic functionality ---FILE-- -?php -/* Prototype : array getimagesize(string imagefile [, array info]) - * Description: Get the size of an image as 4-element array - * Source code: ext/standard/image.c - */ - -$imagetype_filenames = array( - // GIF file - GIF image file = 200x100.GIF, - - //JPEG file - JPEG image file = 200x100.JPG, - - //PNG file - PNG image file = 200x100.PNG, - - //SWF file - SWF image file = 200x100.swf, - - //BMP file - BMP image file = 200x100.bmp, - - //TIFF intel byte order - TIFF intel byte order image file = 200x100.TIF, - - //JPC file - JPC image file = test1pix.jpc, - - //JP2 file - JP2 image file = test1pix.jp2, - - //IFF file - IFF image file = test4pix.iff -); - -echo *** Testing getimagesize() : basic functionality ***\n; - -// loop through each element of the array for imagetype -foreach($imagetype_filenames as $key = $filename) { - echo \n-- $key ($filename) --\n; - var_dump( getimagesize(dirname(__FILE__)./$filename, $info) ); - var_dump( $info ); -}; -? -===DONE=== ---EXPECTF-- -*** Testing getimagesize() : basic functionality *** - --- GIF image file (200x100.GIF) -- -array(7) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(1) - [3]= - string(24) width=200 height=100 - [bits]= - int(8) - [channels]= - int(3) - [mime]= - string(9) image/gif -} -array(0) { -} - --- JPEG image file (200x100.JPG) -- -array(7) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(2) - [3]= - string(24) width=200 height=100 - [bits]= - int(8) - [channels]= - int(3) - [mime]= - string(10) image/jpeg -} -array(1) { - [APP0]= - string(14)%sJFIF%s -} - --- PNG image file (200x100.PNG) -- -array(6) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(3) - [3]= - string(24) width=200 height=100 - [bits]= - int(8) - [mime]= - string(9) image/png -} -array(0) { -} - --- SWF image file (200x100.swf) -- -array(5) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(4) - [3]= - string(24) width=200 height=100 - [mime]= - string(29) application/x-shockwave-flash -} -array(0) { -} - --- BMP image file (200x100.bmp) -- -array(6) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(6) - [3]= - string(24) width=200 height=100 - [bits]= - int(24) - [mime]= - string(9) image/bmp -} -array(0) { -} - --- TIFF intel byte order image file (200x100.TIF) -- -array(5) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(7) - [3]= - string(24) width=200 height=100 - [mime]= - string(10) image/tiff -} -array(0) { -} - --- JPC image file (test1pix.jpc) -- -array(7) { - [0]= - int(1) - [1]= - int(1) - [2]= - int(9) - [3]= - string(20) width=1 height=1 - [bits]= - int(8) - [channels]= - int(3) - [mime]= - string(24) application/octet-stream -} -array(0) { -} - --- JP2 image file (test1pix.jp2) -- -array(7) { - [0]= - int(1) - [1]= - int(1) - [2]= - int(10) - [3]= - string(20) width=1 height=1 - [bits]= - int(8) - [channels]= - int(3) - [mime]= - string(9) image/jp2 -} -array(0) { -} - --- IFF image file (test4pix.iff) -- -array(6) { - [0]= - int(4) - [1]= - int(1) - [2]= - int(14) - [3]= - string(20) width=4 height=1 - [bits]= - int(4) - [mime]= - string(9) image/iff -} -array(0) { -} +--TEST-- +Test getimagesize() function : basic functionality +--FILE-- +?php +/* Prototype : array getimagesize(string imagefile [, array info]) + * Description: Get the size of an image as 4-element array + * Source code: ext/standard/image.c + */ + +$imagetype_filenames = array( + // GIF file + GIF image file = 200x100.gif, + + //JPEG file + JPEG image file = 200x100.jpg, + + //PNG file + PNG image file = 200x100.png, + + //SWF file + SWF image file = 200x100.swf, + + //BMP
[PHP-CVS] cvs: php-src /ext/standard/tests/image 200x100.GIF 200x100.JPG 200x100.PNG 200x100.TIF 200x100.gif 200x100.jpg 200x100.png 200x100.tif getimagesize_basic.phpt
wharmby Fri Jan 23 11:18:37 2009 UTC Removed files: /php-src/ext/standard/tests/image 200x100.TIF 200x100.JPG 200x100.GIF 200x100.PNG Modified files: /php-src/ext/standard/tests/image 200x100.tif 200x100.jpg 200x100.gif 200x100.png getimagesize_basic.phpt Log: Fix names of new image files. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.tif?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/200x100.tif http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.jpg?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/200x100.jpg http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.gif?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/200x100.gif http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.png?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/200x100.png http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_basic.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/image/getimagesize_basic.phpt diff -u php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2 php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.3 --- php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2Fri Jun 13 13:33:15 2008 +++ php-src/ext/standard/tests/image/getimagesize_basic.phptFri Jan 23 11:18:37 2009 @@ -1,220 +1,219 @@ ---TEST-- -Test getimagesize() function : basic functionality ---FILE-- -?php -/* Prototype : array getimagesize(string imagefile [, array info]) - * Description: Get the size of an image as 4-element array - * Source code: ext/standard/image.c - */ - -$imagetype_filenames = array( - // GIF file - GIF image file = 200x100.GIF, - - //JPEG file - JPEG image file = 200x100.JPG, - - //PNG file - PNG image file = 200x100.PNG, - - //SWF file - SWF image file = 200x100.swf, - - //BMP file - BMP image file = 200x100.bmp, - - //TIFF intel byte order - TIFF intel byte order image file = 200x100.TIF, - - //JPC file - JPC image file = test1pix.jpc, - - //JP2 file - JP2 image file = test1pix.jp2, - - //IFF file - IFF image file = test4pix.iff -); - - -echo *** Testing getimagesize() : basic functionality ***\n; - -// loop through each element of the array for imagetype -foreach($imagetype_filenames as $key = $filename) { - echo \n-- $key ($filename) --\n; - var_dump( getimagesize(dirname(__FILE__)./$filename, $info) ); - var_dump( $info ); -}; -? -===DONE=== ---EXPECTF-- -*** Testing getimagesize() : basic functionality *** - --- GIF image file (200x100.GIF) -- -array(7) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(1) - [3]= - unicode(24) width=200 height=100 - [ubits]= - int(8) - [uchannels]= - int(3) - [umime]= - unicode(9) image/gif -} -array(0) { -} - --- JPEG image file (200x100.JPG) -- -array(7) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(2) - [3]= - unicode(24) width=200 height=100 - [ubits]= - int(8) - [uchannels]= - int(3) - [umime]= - unicode(10) image/jpeg -} -array(1) { - [uAPP0]= - unicode(14)%sJFIF%s -} - --- PNG image file (200x100.PNG) -- -array(6) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(3) - [3]= - unicode(24) width=200 height=100 - [ubits]= - int(8) - [umime]= - unicode(9) image/png -} -array(0) { -} - --- SWF image file (200x100.swf) -- -array(5) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(4) - [3]= - unicode(24) width=200 height=100 - [umime]= - unicode(29) application/x-shockwave-flash -} -array(0) { -} - --- BMP image file (200x100.bmp) -- -array(6) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(6) - [3]= - unicode(24) width=200 height=100 - [ubits]= - int(24) - [umime]= - unicode(9) image/bmp -} -array(0) { -} - --- TIFF intel byte order image file (200x100.TIF) -- -array(5) { - [0]= - int(200) - [1]= - int(100) - [2]= - int(7) - [3]= - unicode(24) width=200 height=100 - [umime]= - unicode(10) image/tiff -} -array(0) { -} - --- JPC image file (test1pix.jpc) -- -array(7) { - [0]= - int(1) - [1]= - int(1) - [2]= - int(9) - [3]= - unicode(20) width=1 height=1 - [ubits]= - int(8) - [uchannels]= - int(3) - [umime]= - unicode(24) application/octet-stream -} -array(0) { -} - --- JP2 image file (test1pix.jp2) -- -array(7) { - [0]= - int(1) - [1]= - int(1) - [2]= - int(10) - [3]= - unicode(20) width=1 height=1 - [ubits]= - int(8) - [uchannels]= - int(3) - [umime]= - unicode(9) image/jp2 -} -array(0) { -} - --- IFF image file (test4pix.iff) -- -array(6) { - [0]= - int(4) - [1]= - int(1) - [2]= - int(14) - [3]= - unicode(20) width=4 height=1 - [ubits]= - int(4) -
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/json/tests 001.phpt bug46215.phpt
wharmby Fri Jan 23 20:23:29 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/json/tests bug46215.phpt 001.phpt Log: Fix tests. Add missing SKIPIF. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug46215.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/json/tests/bug46215.phpt diff -u php-src/ext/json/tests/bug46215.phpt:1.1.2.2 php-src/ext/json/tests/bug46215.phpt:1.1.2.3 --- php-src/ext/json/tests/bug46215.phpt:1.1.2.2Thu Oct 2 03:36:52 2008 +++ php-src/ext/json/tests/bug46215.phptFri Jan 23 20:23:29 2009 @@ -1,5 +1,11 @@ --TEST-- Bug #46215 (json_encode mutates its parameter and has some class-specific state) +--SKIPIF-- +?php +if (!extension_loaded(json)) { + die('skip JSON extension not available in this build'); +} +? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/001.phpt?r1=1.1.2.4.2.1r2=1.1.2.4.2.2diff_format=u Index: php-src/ext/json/tests/001.phpt diff -u php-src/ext/json/tests/001.phpt:1.1.2.4.2.1 php-src/ext/json/tests/001.phpt:1.1.2.4.2.2 --- php-src/ext/json/tests/001.phpt:1.1.2.4.2.1 Fri Dec 12 23:19:47 2008 +++ php-src/ext/json/tests/001.phpt Fri Jan 23 20:23:29 2009 @@ -23,8 +23,8 @@ var_dump(json_decode('{ : { : }')); var_dump(json_decode('{ : : } }')); -echo Done\n; ? +===DONE=== --EXPECTF-- Warning: json_decode() expects at least 1 parameter, 0 given in %s on line %d NULL @@ -38,34 +38,34 @@ NULL NULL NULL -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [test]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [foo]= string(3) bar } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [test]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [foo]= string(0) } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [_empty_]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [foo]= string(0) } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { [_empty_]= - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { [_empty_]= string(0) } } NULL NULL -Done +===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/json/tests bug46215.phpt
wharmby Fri Jan 23 20:23:32 2009 UTC Modified files: /php-src/ext/json/tests bug46215.phpt Log: Fix tests. Add missing SKIPIF. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug46215.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/json/tests/bug46215.phpt diff -u php-src/ext/json/tests/bug46215.phpt:1.1 php-src/ext/json/tests/bug46215.phpt:1.2 --- php-src/ext/json/tests/bug46215.phpt:1.1Thu Oct 2 03:31:27 2008 +++ php-src/ext/json/tests/bug46215.phptFri Jan 23 20:23:32 2009 @@ -1,5 +1,11 @@ --TEST-- Bug #46215 (json_encode mutates its parameter and has some class-specific state) +--SKIPIF-- +?php +if (!extension_loaded(json)) { + die('skip JSON extension not available in this build'); +} +? --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/zlib/tests gzuncompress_basic1.phpt
wharmby Fri Jan 23 23:31:47 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/zlib/tests gzuncompress_basic1.phpt Log: New gzuncompress() test.Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzuncompress_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzuncompress_basic1.phpt +++ php-src/ext/zlib/tests/gzuncompress_basic1.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/zlib/tests gzuncompress_basic1.phpt
wharmby Fri Jan 23 23:31:50 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/zlib/tests gzuncompress_basic1.phpt Log: New gzuncompress() test.Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzuncompress_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzuncompress_basic1.phpt +++ php-src/ext/zlib/tests/gzuncompress_basic1.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zlib/tests gzuncompress_basic1.phpt
wharmby Fri Jan 23 23:31:52 2009 UTC Modified files: /php-src/ext/zlib/tests gzuncompress_basic1.phpt Log: New gzuncompress() test.Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzuncompress_basic1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/zlib/tests/gzuncompress_basic1.phpt diff -u /dev/null php-src/ext/zlib/tests/gzuncompress_basic1.phpt:1.2 --- /dev/null Fri Jan 23 23:31:52 2009 +++ php-src/ext/zlib/tests/gzuncompress_basic1.phpt Fri Jan 23 23:31:52 2009 @@ -0,0 +1,43 @@ +--TEST-- +Test gzuncompress() function : basic functionality +--SKIPIF-- +?php +if (!extension_loaded(zlib)) { + print skip - ZLIB extension not loaded; +} +? +--FILE-- +?php +/* Prototype : string gzuncompress(string data [, int length]) + * Description: Unzip a gzip-compressed string + * Source code: ext/zlib/zlib.c + * Alias to functions: + */ + +include(dirname(__FILE__) . '/data.inc'); + +echo *** Testing gzuncompress() : basic functionality ***\n; + + +// Initialise all required variables +$compressed = gzcompress(b$data); + +echo \n-- Basic decompress --\n; +var_dump(strcmp($data, gzuncompress($compressed))); + + +$length = 3547; +echo \n-- Calling gzuncompress() with all max length of $length --\n; +echo Result length is . strlen(gzuncompress($compressed, $length)) . \n; + +? +===DONE=== +--EXPECT-- +*** Testing gzuncompress() : basic functionality *** + +-- Basic decompress -- +int(0) + +-- Calling gzuncompress() with all max length of 3547 -- +Result length is 3547 +===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_2) /ext/standard/tests/streams stream_get_meta_data_socket_variation1.phpt stream_get_meta_data_socket_variation2.phpt stream_get_meta_data_socket_variation3.phpt stream_g
wharmby Fri Jan 23 23:49:32 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/streams stream_get_meta_data_socket_variation1.phpt stream_get_meta_data_socket_variation2.phpt stream_get_meta_data_socket_variation3.phpt stream_get_meta_data_socket_variation4.phpt Log: Make test more robust; avoid hangs if fsockopen() fails. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt?r1=1.1.4.4r2=1.1.4.5diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.4.4 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.4.5 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.4.4 Thu Mar 20 12:14:15 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt Fri Jan 23 23:49:31 2009 @@ -8,6 +8,9 @@ /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); +if (!$client) { + die(Unable to create socket); +} /* Accept that connection */ $socket = stream_socket_accept($server); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt?r1=1.1.4.4r2=1.1.4.5diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.4.4 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.4.5 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.4.4 Thu Mar 20 12:14:15 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt Fri Jan 23 23:49:31 2009 @@ -8,6 +8,9 @@ /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); +if (!$client) { + die(Unable to create socket); +} /* Accept that connection */ $socket = stream_socket_accept($server); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt?r1=1.1.4.4r2=1.1.4.5diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.4.4 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.4.5 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.4.4 Thu Mar 20 12:14:15 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt Fri Jan 23 23:49:31 2009 @@ -8,6 +8,9 @@ /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); +if (!$client) { + die(Unable to create socket); +} /* Accept that connection */ $socket = stream_socket_accept($server); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.4.3 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.4.4 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.4.3 Thu Mar 20 11:34:50 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt Fri Jan 23 23:49:31 2009 @@ -8,6 +8,9 @@ /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); +if (!$client) { + die(Unable to create socket); +} /* Accept that connection */ $socket = stream_socket_accept($server); -- 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/streams stream_get_meta_data_socket_variation1.phpt stream_get_meta_data_socket_variation2.phpt stream_get_meta_data_socket_variation3.phpt stream_g
wharmby Fri Jan 23 23:49:38 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/streams stream_get_meta_data_socket_variation4.phpt stream_get_meta_data_socket_variation3.phpt stream_get_meta_data_socket_variation2.phpt stream_get_meta_data_socket_variation1.phpt Log: Make test more robust; avoid hangs if fsockopen() fails. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt?r1=1.1.2.4r2=1.1.2.5diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.2.4 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.2.5 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.1.2.4 Fri Aug 15 09:27:27 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt Fri Jan 23 23:49:38 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server = stream_socket_server('tcp://127.0.0.1:31337'); -if ($server === false) { - die(stream_socket_server() failed\n); -} /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); -if ($client === false) { - die(fsockopen() failed\n); +if (!$client) { + die(Unable to create socket); } /* Accept that connection */ $socket = stream_socket_accept($server); -if ($socket === false) { - die(stream_socket_accept() failed\n); -} echo Write some data:\n; fwrite($socket, abcdefg\n1234567\nxyzxyz\n); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt?r1=1.1.2.5r2=1.1.2.6diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.2.5 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.2.6 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.1.2.5 Fri Aug 15 09:27:27 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt Fri Jan 23 23:49:38 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server = stream_socket_server('tcp://127.0.0.1:31337'); -if ($server === false) { - die(stream_socket_server() failed\n); -} /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); -if ($client === false) { - die(fsockopen() failed\n); +if (!$client) { + die(Unable to create socket); } /* Accept that connection */ $socket = stream_socket_accept($server); -if ($socket === false) { - die(stream_socket_accept() failed\n); -} var_dump(stream_get_meta_data($client)); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt?r1=1.1.2.5r2=1.1.2.6diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.2.5 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.2.6 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.1.2.5 Fri Aug 15 09:27:27 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt Fri Jan 23 23:49:38 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server = stream_socket_server('tcp://127.0.0.1:31337'); -if ($server === false) { - die(stream_socket_server() failed\n); -} /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); -if ($client === false) { - die(fsockopen() failed\n); +if (!$client) { + die(Unable to create socket); } /* Accept that connection */ $socket = stream_socket_accept($server); -if ($socket === false) { - die(stream_socket_accept() failed\n); -} var_dump(stream_get_meta_data($client)); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt?r1=1.1.2.5r2=1.1.2.6diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.2.5 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.2.6 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.1.2.5 Fri Aug 15 09:27:27 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt Fri Jan 23 23:49:38 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server =
[PHP-CVS] cvs: php-src /ext/standard/tests/streams stream_get_meta_data_socket_variation1.phpt stream_get_meta_data_socket_variation2.phpt stream_get_meta_data_socket_variation3.phpt stream_get_meta_d
wharmby Fri Jan 23 23:49:40 2009 UTC Modified files: /php-src/ext/standard/tests/streams stream_get_meta_data_socket_variation3.phpt stream_get_meta_data_socket_variation4.phpt stream_get_meta_data_socket_variation1.phpt stream_get_meta_data_socket_variation2.phpt Log: Make test more robust; avoid hangs if fsockopen() fails. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.5 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.6 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt:1.5 Fri Aug 15 09:27:14 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation3.phpt Fri Jan 23 23:49:40 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server = stream_socket_server('tcp://127.0.0.1:31337'); -if ($server === false) { - die(stream_socket_server() failed\n); -} /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); -if ($client === false) { - die(fsockopen() failed\n); +if (!$client) { + die(Unable to create socket); } /* Accept that connection */ $socket = stream_socket_accept($server); -if ($socket === false) { - die(stream_socket_accept() failed\n); -} var_dump(stream_get_meta_data($client)); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.4 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.5 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt:1.4 Fri Aug 15 09:27:14 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation4.phpt Fri Jan 23 23:49:40 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server = stream_socket_server('tcp://127.0.0.1:31337'); -if ($server === false) { - die(stream_socket_server() failed\n); -} /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); -if ($client === false) { - die(fsockopen() failed\n); +if (!$client) { + die(Unable to create socket); } /* Accept that connection */ $socket = stream_socket_accept($server); -if ($socket === false) { - die(stream_socket_accept() failed\n); -} echo Write some data:\n; fwrite($socket, abcdefg\n1234567\nxyzxyz\n); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.5 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.6 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt:1.5 Fri Aug 15 09:27:14 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation1.phpt Fri Jan 23 23:49:40 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server = stream_socket_server('tcp://127.0.0.1:31337'); -if ($server === false) { - die(stream_socket_server() failed\n); -} /* Connect to it */ $client = fsockopen('tcp://127.0.0.1:31337'); -if ($client === false) { - die(fsockopen() failed\n); +if (!$client) { + die(Unable to create socket); } /* Accept that connection */ $socket = stream_socket_accept($server); -if ($socket === false) { - die(stream_socket_accept() failed\n); -} echo Write some data:\n; fwrite($socket, abcdefg\n1234567\nxyzxyz\n); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt diff -u php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.5 php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.6 --- php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt:1.5 Fri Aug 15 09:27:14 2008 +++ php-src/ext/standard/tests/streams/stream_get_meta_data_socket_variation2.phpt Fri Jan 23 23:49:40 2009 @@ -5,21 +5,15 @@ /* Setup socket server */ $server = stream_socket_server('tcp://127.0.0.1:31337'); -if ($server === false) { -
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd/tests gd_info_error.phpt gd_info_variation1.phpt image_type_to_mime_type_error.phpt image_type_to_mime_type_variation1.phpt image_type_to_mime_type_variation2.p
wharmby Thu Jan 22 13:27:21 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/gd/tests php.gif image_type_to_mime_type_variation2.phpt imagecolorallocate_variation5.phpt image_type_to_mime_type_variation3.phpt imagecolorallocate_variation4.phpt image_type_to_mime_type_variation4.phpt image_type_to_mime_type_error.phpt imagecolorallocate_variation6.phpt imagecolorstotal_error.phpt gd_info_error.phpt imagecolorallocate_error.phpt imagecolorallocate_basic.phpt imagecolorallocate_variation1.phpt imagecolorallocate_variation2.phpt image_type_to_mime_type_variation1.phpt imagecolorstotal_basic.phpt gd_info_variation1.phpt imagecolorallocate_variation3.phpt Log: New image tests. Tested on Windows, LInux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt +++ php-src/ext/gd/tests/image_type_to_mime_type_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation5.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt +++ php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation4.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/image_type_to_mime_type_variation4.phpt +++ php-src/ext/gd/tests/image_type_to_mime_type_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_error.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/image_type_to_mime_type_error.phpt +++ php-src/ext/gd/tests/image_type_to_mime_type_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation6.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorstotal_error.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorstotal_error.phpt +++ php-src/ext/gd/tests/imagecolorstotal_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gd_info_error.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/gd_info_error.phpt +++ php-src/ext/gd/tests/gd_info_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_error.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_error.phpt +++ php-src/ext/gd/tests/imagecolorallocate_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_basic.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_basic.phpt +++ php-src/ext/gd/tests/imagecolorallocate_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation1.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation2.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt +++ php-src/ext/gd/tests/image_type_to_mime_type_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorstotal_basic.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorstotal_basic.phpt +++ php-src/ext/gd/tests/imagecolorstotal_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gd_info_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/gd_info_variation1.phpt +++ php-src/ext/gd/tests/gd_info_variation1.phpt
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/gd/tests image_type_to_mime_type_variation3.phpt image_type_to_mime_type_variation4.phpt imagecolorallocate_basic.phpt imagecolorallocate_error.phpt imagecolorallo
wharmby Thu Jan 22 13:27:26 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/gd/tests imagecolorallocate_basic.phpt imagecolorallocate_variation3.phpt imagecolorallocate_variation4.phpt imagecolorallocate_variation6.phpt image_type_to_mime_type_variation3.phpt image_type_to_mime_type_variation4.phpt imagecolorallocate_variation5.phpt imagecolorallocate_error.phpt imagecolorallocate_variation2.phpt imagecolorstotal_basic.phpt imagecolorstotal_error.phpt imagecolorallocate_variation1.phpt php.gif Log: New image tests. Tested on Windows, LInux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_basic.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_basic.phpt +++ php-src/ext/gd/tests/imagecolorallocate_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation3.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation4.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation6.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt +++ php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/image_type_to_mime_type_variation4.phpt +++ php-src/ext/gd/tests/image_type_to_mime_type_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation5.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_error.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_error.phpt +++ php-src/ext/gd/tests/imagecolorallocate_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation2.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorstotal_basic.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorstotal_basic.phpt +++ php-src/ext/gd/tests/imagecolorstotal_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorstotal_error.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorstotal_error.phpt +++ php-src/ext/gd/tests/imagecolorstotal_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/gd/tests/imagecolorallocate_variation1.phpt +++ php-src/ext/gd/tests/imagecolorallocate_variation1.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/tests image_type_to_mime_type_variation3.phpt image_type_to_mime_type_variation4.phpt imagecolorallocate_basic.phpt imagecolorallocate_error.phpt imagecolorallocate_vari
wharmby Thu Jan 22 13:27:30 2009 UTC Modified files: /php-src/ext/gd/tests imagecolorstotal_basic.phpt image_type_to_mime_type_variation3.phpt imagecolorallocate_variation1.phpt imagecolorallocate_error.phpt imagecolorallocate_variation5.phpt imagecolorallocate_variation2.phpt imagecolorallocate_variation4.phpt imagecolorstotal_error.phpt imagecolorallocate_variation6.phpt php.gif image_type_to_mime_type_variation4.phpt imagecolorallocate_basic.phpt imagecolorallocate_variation3.phpt Log: New image tests. Tested on Windows, LInux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorstotal_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/gd/tests/imagecolorstotal_basic.phpt diff -u /dev/null php-src/ext/gd/tests/imagecolorstotal_basic.phpt:1.2 --- /dev/null Thu Jan 22 13:27:29 2009 +++ php-src/ext/gd/tests/imagecolorstotal_basic.phptThu Jan 22 13:27:29 2009 @@ -0,0 +1,36 @@ +--TEST-- +Test imagecolorstotal() function : basic functionality +--SKIPIF-- +?php +if(!extension_loaded('gd')) { +die('skip gd extension is not loaded'); +} + +if(!function_exists('imagecolorstotal') || !function_exists('imagecreatefromgif')) { +die('skip imagecolorstotal and imagecreatefromgif functions not available in this build'); +} +? +--FILE-- +?php +/* Prototype : int imagecolorstotal ( resource $image ) + * Description: Find out the number of colors in an image's palette + * Source code: ext/gd/gd.c + */ + +echo *** Testing imagecolorstotal() : basic functionality ***\n; + +// Get an image +$gif = dirname(__FILE__)./php.gif; +$im = imagecreatefromgif($gif); + +echo 'Total colors in image: ' . imagecolorstotal($im); + +// Free image +imagedestroy($im); +? + +===DONE=== +--EXPECTF-- +*** Testing imagecolorstotal() : basic functionality *** +Total colors in image: 128 +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt diff -u /dev/null php-src/ext/gd/tests/image_type_to_mime_type_variation3.phpt:1.2 --- /dev/null Thu Jan 22 13:27:29 2009 +++ php-src/ext/gd/tests/image_type_to_mime_type_variation3.phptThu Jan 22 13:27:29 2009 @@ -0,0 +1,76 @@ +--TEST-- +Test image_type_to_mime_type() function : usage variations - Pass equivalent imagetype constant integer values +--FILE-- +?php +/* Prototype : string image_type_to_mime_type(int imagetype) + * Description: Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype + * Source code: ext/standard/image.c + */ + +echo *** Testing image_type_to_mime_type() : usage variations ***\n; + +//There are 17 imagetypes +$number_of_imagetypes = 17; + +$iterator = 1; +for($imagetype = 1; $imagetype=$number_of_imagetypes; $imagetype++) { + echo \n-- Iteration $iterator --\n; + var_dump( image_type_to_mime_type($imagetype) ); + $iterator++; +} +? +===DONE=== +--EXPECTREGEX-- +\*\*\* Testing image_type_to_mime_type\(\) : usage variations \*\*\* + +-- Iteration 1 -- +unicode\(9\) image\/gif + +-- Iteration 2 -- +unicode\(10\) image\/jpeg + +-- Iteration 3 -- +unicode\(9\) image\/png + +-- Iteration 4 -- +unicode\(29\) application\/x-shockwave-flash + +-- Iteration 5 -- +unicode\(9\) image\/psd + +-- Iteration 6 -- +unicode\(9\) image\/bmp + +-- Iteration 7 -- +unicode\(10\) image\/tiff + +-- Iteration 8 -- +unicode\(10\) image\/tiff + +-- Iteration 9 -- +unicode\(24\) application\/octet-stream + +-- Iteration 10 -- +unicode\(9\) image\/jp2 + +-- Iteration 11 -- +unicode\(24\) application\/octet-stream + +-- Iteration 12 -- +unicode\(24\) application\/octet-stream + +-- Iteration 13 -- +unicode\(2[49]\) application\/(x-shockwave-flash|octet-stream) + +-- Iteration 14 -- +unicode\(9\) image\/iff + +-- Iteration 15 -- +unicode\(18\) image\/vnd.wap.wbmp + +-- Iteration 16 -- +unicode\(9\) image\/xbm + +-- Iteration 17 -- +unicode\(24\) image\/vnd.microsoft.icon +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagecolorallocate_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/gd/tests/imagecolorallocate_variation1.phpt diff -u /dev/null php-src/ext/gd/tests/imagecolorallocate_variation1.phpt:1.2 --- /dev/null Thu Jan 22 13:27:29 2009 +++ php-src/ext/gd/tests/imagecolorallocate_variation1.phpt Thu Jan 22 13:27:29 2009 @@ -0,0 +1,267 @@ +--TEST-- +Test imagecolorallocate() function : usage variations - passing different data types to first argument +--SKIPIF-- +?php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests mktime-3.phpt
wharmby Thu Jan 22 13:50:34 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date/tests mktime-3.phpt Log: Fix test after #46732 fix. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3.phpt?r1=1.1.2.3.2.1r2=1.1.2.3.2.2diff_format=u Index: php-src/ext/date/tests/mktime-3.phpt diff -u php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.2.1 php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.2.2 --- php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.2.1Mon Feb 25 22:34:11 2008 +++ php-src/ext/date/tests/mktime-3.phptThu Jan 22 13:50:33 2009 @@ -24,6 +24,7 @@ echo \n; } ? +===Done=== --EXPECT-- America/Toronto Y:0 - January 2000-01-01T01:01:01-0500 @@ -32,7 +33,7 @@ Y: 71 - January 1971-01-01T01:01:01-0500 Y: 99 - January 1999-01-01T01:01:01-0500 Y: 100 - January 2000-01-01T01:01:01-0500 -Y: 105 - January 2005-01-01T01:01:01-0500 +Y: 105 - out of range Y: 1900 - out of range Y: 1901 - out of range Y: 1902 - January 1902-01-01T01:01:01-0500 @@ -47,10 +48,12 @@ Y: 71 - January 1971-01-01T01:01:01+0100 Y: 99 - January 1999-01-01T01:01:01+0100 Y: 100 - January 2000-01-01T01:01:01+0100 -Y: 105 - January 2005-01-01T01:01:01+0100 +Y: 105 - out of range Y: 1900 - out of range Y: 1901 - out of range Y: 1902 - January 1902-01-01T01:01:01+0100 Y: 1999 - January 1999-01-01T01:01:01+0100 Y: 2000 - January 2000-01-01T01:01:01+0100 Y: 2001 - January 2001-01-01T01:01:01+0100 + +===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/date/tests mktime-3.phpt
wharmby Thu Jan 22 13:50:46 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/date/tests mktime-3.phpt Log: Fix test after #46732 fix. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3.phpt?r1=1.1.2.3.4.1r2=1.1.2.3.4.2diff_format=u Index: php-src/ext/date/tests/mktime-3.phpt diff -u php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.4.1 php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.4.2 --- php-src/ext/date/tests/mktime-3.phpt:1.1.2.3.4.1Mon Feb 25 22:32:59 2008 +++ php-src/ext/date/tests/mktime-3.phptThu Jan 22 13:50:45 2009 @@ -24,6 +24,7 @@ echo \n; } ? +===Done=== --EXPECT-- America/Toronto Y:0 - January 2000-01-01T01:01:01-0500 @@ -32,7 +33,7 @@ Y: 71 - January 1971-01-01T01:01:01-0500 Y: 99 - January 1999-01-01T01:01:01-0500 Y: 100 - January 2000-01-01T01:01:01-0500 -Y: 105 - January 2005-01-01T01:01:01-0500 +Y: 105 - out of range Y: 1900 - out of range Y: 1901 - out of range Y: 1902 - January 1902-01-01T01:01:01-0500 @@ -47,10 +48,12 @@ Y: 71 - January 1971-01-01T01:01:01+0100 Y: 99 - January 1999-01-01T01:01:01+0100 Y: 100 - January 2000-01-01T01:01:01+0100 -Y: 105 - January 2005-01-01T01:01:01+0100 +Y: 105 - out of range Y: 1900 - out of range Y: 1901 - out of range Y: 1902 - January 1902-01-01T01:01:01+0100 Y: 1999 - January 1999-01-01T01:01:01+0100 Y: 2000 - January 2000-01-01T01:01:01+0100 Y: 2001 - January 2001-01-01T01:01:01+0100 + +===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/date/tests mktime-3.phpt
wharmby Thu Jan 22 13:50:48 2009 UTC Modified files: /php-src/ext/date/tests mktime-3.phpt Log: Fix test after #46732 fix. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/date/tests/mktime-3.phpt diff -u php-src/ext/date/tests/mktime-3.phpt:1.5 php-src/ext/date/tests/mktime-3.phpt:1.6 --- php-src/ext/date/tests/mktime-3.phpt:1.5Mon Feb 25 22:32:26 2008 +++ php-src/ext/date/tests/mktime-3.phptThu Jan 22 13:50:48 2009 @@ -24,6 +24,7 @@ echo \n; } ? +===Done=== --EXPECT-- America/Toronto Y:0 - January 2000-01-01T01:01:01-0500 @@ -32,7 +33,7 @@ Y: 71 - January 1971-01-01T01:01:01-0500 Y: 99 - January 1999-01-01T01:01:01-0500 Y: 100 - January 2000-01-01T01:01:01-0500 -Y: 105 - January 2005-01-01T01:01:01-0500 +Y: 105 - out of range Y: 1900 - out of range Y: 1901 - out of range Y: 1902 - January 1902-01-01T01:01:01-0500 @@ -47,10 +48,12 @@ Y: 71 - January 1971-01-01T01:01:01+0100 Y: 99 - January 1999-01-01T01:01:01+0100 Y: 100 - January 2000-01-01T01:01:01+0100 -Y: 105 - January 2005-01-01T01:01:01+0100 +Y: 105 - out of range Y: 1900 - out of range Y: 1901 - out of range Y: 1902 - January 1902-01-01T01:01:01+0100 Y: 1999 - January 1999-01-01T01:01:01+0100 Y: 2000 - January 2000-01-01T01:01:01+0100 Y: 2001 - January 2001-01-01T01:01:01+0100 + +===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_2) /ext/date/tests microtime_basic.phpt microtime_error.phpt time_basic.phpt time_error.phpt
wharmby Thu Jan 22 14:11:11 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests microtime_basic.phpt time_error.phpt microtime_error.phpt time_basic.phpt Log: New basic time()and microtime() tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/microtime_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/microtime_basic.phpt +++ php-src/ext/date/tests/microtime_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/time_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/time_error.phpt +++ php-src/ext/date/tests/time_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/microtime_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/microtime_error.phpt +++ php-src/ext/date/tests/microtime_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/time_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/time_basic.phpt +++ php-src/ext/date/tests/time_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 microtime_basic.phpt microtime_error.phpt time_basic.phpt time_error.phpt
wharmby Thu Jan 22 14:11:09 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests microtime_basic.phpt time_error.phpt time_basic.phpt microtime_error.phpt Log: New basic time()and microtime() tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/microtime_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/microtime_basic.phpt +++ php-src/ext/date/tests/microtime_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/time_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/time_error.phpt +++ php-src/ext/date/tests/time_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/time_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/time_basic.phpt +++ php-src/ext/date/tests/time_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/microtime_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/microtime_error.phpt +++ php-src/ext/date/tests/microtime_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/date/tests microtime_basic.phpt microtime_error.phpt time_basic.phpt time_error.phpt
wharmby Thu Jan 22 14:11:14 2009 UTC Modified files: /php-src/ext/date/tests microtime_error.phpt time_basic.phpt microtime_basic.phpt time_error.phpt Log: New basic time()and microtime() tests. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/microtime_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/microtime_error.phpt diff -u /dev/null php-src/ext/date/tests/microtime_error.phpt:1.2 --- /dev/null Thu Jan 22 14:11:14 2009 +++ php-src/ext/date/tests/microtime_error.phpt Thu Jan 22 14:11:13 2009 @@ -0,0 +1,71 @@ +--TEST-- +Test wrong number of arguments for microtime() +--FILE-- +?php +/* + * proto mixed microtime([bool get_as_float]) + * Function is implemented in ext/standard/microtime.c +*/ + +$opt_arg_0 = true; +$extra_arg = 1; + +echo \n-- Too many arguments --\n; +var_dump(microtime($opt_arg_0, $extra_arg)); + + +echo \n-- Bad Arg types --\n; + +$bad_args = array(null, + 1.5, + hello, + array('k'='v', array(0)), + new stdClass, + 1); +foreach ($bad_args as $bad_arg) { + echo \n-- bad arg: ; + var_dump($bad_arg); + var_dump(microtime($bad_arg)); +} + +? +===DONE=== +--EXPECTF-- +-- Too many arguments -- + +Warning: microtime() expects at most 1 parameter, 2 given in %s on line %d +NULL + +-- Bad Arg types -- + +-- bad arg: NULL +unicode(%d) %s + +-- bad arg: float(1.5) +float(%f) + +-- bad arg: unicode(5) hello +float(%f) + +-- bad arg: array(2) { + [uk]= + unicode(1) v + [0]= + array(1) { +[0]= +int(0) + } +} + +Warning: microtime() expects parameter 1 to be boolean, array given in %s on line %d +NULL + +-- bad arg: object(stdClass)#1 (0) { +} + +Warning: microtime() expects parameter 1 to be boolean, object given in %s on line %d +NULL + +-- bad arg: int(1) +float(%f) +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/time_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/time_basic.phpt diff -u /dev/null php-src/ext/date/tests/time_basic.phpt:1.2 --- /dev/null Thu Jan 22 14:11:14 2009 +++ php-src/ext/date/tests/time_basic.phpt Thu Jan 22 14:11:14 2009 @@ -0,0 +1,16 @@ +--TEST-- +Test return type and value for expected input time() +--FILE-- +?php +/* + * proto int time(void) + * Function is implemented in ext/date/php_date.c +*/ + +var_dump(time()); + +? +===DONE=== +--EXPECTF-- +int(%d) +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/microtime_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/microtime_basic.phpt diff -u /dev/null php-src/ext/date/tests/microtime_basic.phpt:1.2 --- /dev/null Thu Jan 22 14:11:14 2009 +++ php-src/ext/date/tests/microtime_basic.phpt Thu Jan 22 14:11:14 2009 @@ -0,0 +1,20 @@ +--TEST-- +Test return type and value for expected input microtime() +--FILE-- +?php +/* + * proto mixed microtime([bool get_as_float]) + * Function is implemented in ext/standard/microtime.c +*/ + +var_dump(microtime()); +var_dump(microtime(true)); +var_dump(microtime(false)); + +? +===DONE=== +--EXPECTF-- +unicode(%d) %s %s +float(%s) +unicode(%d) %s %s +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/time_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/time_error.phpt diff -u /dev/null php-src/ext/date/tests/time_error.phpt:1.2 --- /dev/null Thu Jan 22 14:11:14 2009 +++ php-src/ext/date/tests/time_error.phpt Thu Jan 22 14:11:14 2009 @@ -0,0 +1,20 @@ +--TEST-- +Test wrong number of arguments for time() +--FILE-- +?php +/* + * proto int time(void) + * Function is implemented in ext/date/php_date.c +*/ + +// Extra arguments are ignored +$extra_arg = 1; +echo \n-- Too many arguments --\n; +var_dump (time($extra_arg)); +? +===DONE=== +--EXPECTF-- + +-- Too many arguments -- +int(%d) +===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_2) /ext/date/tests getdate_basic.phpt getdate_error.phpt getdate_variation1.phpt getdate_variation2.phpt getdate_variation3.phpt getdate_variation4.phpt getdate_variation5
wharmby Thu Jan 22 18:47:14 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests gmstrftime_error.phpt gmstrftime_basic.phpt getdate_error.phpt gmstrftime_variation5.phpt gmstrftime_variation7.phpt gmstrftime_variation10.phpt gmstrftime_variation20.phpt gmstrftime_variation11.phpt gmstrftime_variation4.phpt getdate_variation5.phpt gmstrftime_variation1.phpt getdate_variation6.phpt getdate_basic.phpt gmstrftime_variation16.phpt gmstrftime_variation13.phpt gmstrftime_variation3.phpt getdate_variation4.phpt gmstrftime_variation14.phpt gmstrftime_variation22.phpt gmstrftime_variation8.phpt getdate_variation7.phpt getdate_variation2.phpt gmstrftime_variation19.phpt gmstrftime_variation12.phpt gmstrftime_variation6.phpt getdate_variation1.phpt gmstrftime_variation17.phpt gmstrftime_variation21.phpt gmstrftime_variation9.phpt gmstrftime_variation18.phpt getdate_variation3.phpt gmstrftime_variation15.phpt gmstrftime_variation2.phpt Log: New date tests for getdate() and gmstrftime(). Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_error.phpt +++ php-src/ext/date/tests/gmstrftime_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_basic.phpt +++ php-src/ext/date/tests/gmstrftime_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/getdate_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/getdate_error.phpt +++ php-src/ext/date/tests/getdate_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation5.phpt +++ php-src/ext/date/tests/gmstrftime_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation7.phpt +++ php-src/ext/date/tests/gmstrftime_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation10.phpt +++ php-src/ext/date/tests/gmstrftime_variation10.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation20.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation20.phpt +++ php-src/ext/date/tests/gmstrftime_variation20.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation11.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation11.phpt +++ php-src/ext/date/tests/gmstrftime_variation11.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation4.phpt +++ php-src/ext/date/tests/gmstrftime_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/getdate_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/getdate_variation5.phpt +++ php-src/ext/date/tests/getdate_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation1.phpt +++ php-src/ext/date/tests/gmstrftime_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/getdate_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/getdate_variation6.phpt +++ php-src/ext/date/tests/getdate_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/getdate_basic.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/getdate_basic.phpt +++ php-src/ext/date/tests/getdate_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation16.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation16.phpt +++ php-src/ext/date/tests/gmstrftime_variation16.phpt
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests getdate_basic.phpt getdate_error.phpt getdate_variation1.phpt getdate_variation2.phpt getdate_variation3.phpt getdate_variation4.phpt getdate_variation5
wharmby Thu Jan 22 18:47:20 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/date/tests gmstrftime_variation20.phpt gmstrftime_error.phpt gmstrftime_variation5.phpt gmstrftime_variation6.phpt gmstrftime_variation15.phpt gmstrftime_variation8.phpt getdate_variation5.phpt gmstrftime_variation10.phpt gmstrftime_variation1.phpt gmstrftime_variation18.phpt getdate_error.phpt gmstrftime_variation13.phpt gmstrftime_variation14.phpt getdate_variation2.phpt getdate_variation6.phpt getdate_variation7.phpt gmstrftime_variation22.phpt gmstrftime_variation4.phpt gmstrftime_variation11.phpt gmstrftime_variation7.phpt getdate_variation1.phpt gmstrftime_variation3.phpt gmstrftime_basic.phpt gmstrftime_variation2.phpt gmstrftime_variation12.phpt gmstrftime_variation17.phpt gmstrftime_variation16.phpt getdate_basic.phpt gmstrftime_variation9.phpt getdate_variation4.phpt gmstrftime_variation21.phpt gmstrftime_variation19.phpt getdate_variation3.phpt Log: New date tests for getdate() and gmstrftime(). Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation20.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation20.phpt +++ php-src/ext/date/tests/gmstrftime_variation20.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_error.phpt +++ php-src/ext/date/tests/gmstrftime_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation5.phpt +++ php-src/ext/date/tests/gmstrftime_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation6.phpt +++ php-src/ext/date/tests/gmstrftime_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation15.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation15.phpt +++ php-src/ext/date/tests/gmstrftime_variation15.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation8.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation8.phpt +++ php-src/ext/date/tests/gmstrftime_variation8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/getdate_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/getdate_variation5.phpt +++ php-src/ext/date/tests/getdate_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation10.phpt +++ php-src/ext/date/tests/gmstrftime_variation10.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation1.phpt +++ php-src/ext/date/tests/gmstrftime_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation18.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation18.phpt +++ php-src/ext/date/tests/gmstrftime_variation18.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/getdate_error.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/getdate_error.phpt +++ php-src/ext/date/tests/getdate_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation13.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation13.phpt +++ php-src/ext/date/tests/gmstrftime_variation13.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation14.phpt?view=markuprev=1.1 Index: php-src/ext/date/tests/gmstrftime_variation14.phpt +++ php-src/ext/date/tests/gmstrftime_variation14.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/getdate_variation2.phpt?view=markuprev=1.1 Index:
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/image 200x100.GIF 200x100.JPG 200x100.PNG 200x100.TIF 200x100.bmp 200x100.swf 200x100_unknown.unknown 2x2mm.tif 75x50.wbmp 75x50.xbm blank_file blan
wharmby Thu Jan 22 22:59:46 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/image 200x100.GIF 200x100_unknown.unknown 75x50.xbm getimagesize_variation3.phpt blank_file.bmp test.txt getimagesize_tif_mm.phpt 200x100.PNG 200x100.bmp getimagesize_error1.phpt 2x2mm.tif testAPP.jpg getimagesize_variation4.phpt getimagesize_xbm.phpt blank_file getimagesize_variation2.phpt getimagesize_variation1.phpt 200x100.swf 75x50.wbmp getimagesize_basic.phpt getimagesize_jpgapp.phpt 200x100.TIF 200x100.JPG getimagesize_wbmp.phpt Log: New image tests. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100_unknown.unknown?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/200x100_unknown.unknown +++ php-src/ext/standard/tests/image/200x100_unknown.unknown http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/75x50.xbm?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/75x50.xbm +++ php-src/ext/standard/tests/image/75x50.xbm http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation3.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/blank_file.bmp?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/blank_file.bmp +++ php-src/ext/standard/tests/image/blank_file.bmp http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/test.txt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/test.txt +++ php-src/ext/standard/tests/image/test.txt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt +++ php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.bmp?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/200x100.bmp +++ php-src/ext/standard/tests/image/200x100.bmp http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_error1.phpt +++ php-src/ext/standard/tests/image/getimagesize_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/2x2mm.tif?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/2x2mm.tif +++ php-src/ext/standard/tests/image/2x2mm.tif http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation4.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_xbm.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_xbm.phpt +++ php-src/ext/standard/tests/image/getimagesize_xbm.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation2.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation1.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.swf?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/200x100.swf +++ php-src/ext/standard/tests/image/200x100.swf http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/75x50.wbmp?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/75x50.wbmp +++ php-src/ext/standard/tests/image/75x50.wbmp http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_basic.phpt +++ php-src/ext/standard/tests/image/getimagesize_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_jpgapp.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_jpgapp.phpt +++
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/image 2x2mm.tif 75x50.wbmp 75x50.xbm getimagesize_error1.phpt getimagesize_jpgapp.phpt getimagesize_tif_mm.phpt getimagesize_variation1.phpt getimag
wharmby Thu Jan 22 22:59:50 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/image getimagesize_variation3.phpt getimagesize_error1.phpt testAPP.jpg getimagesize_jpgapp.phpt 75x50.xbm 75x50.wbmp 2x2mm.tif getimagesize_tif_mm.phpt getimagesize_variation2.phpt getimagesize_variation1.phpt getimagesize_wbmp.phpt getimagesize_variation4.phpt getimagesize_xbm.phpt Log: New image tests. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation3.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_error1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_error1.phpt +++ php-src/ext/standard/tests/image/getimagesize_error1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_jpgapp.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_jpgapp.phpt +++ php-src/ext/standard/tests/image/getimagesize_jpgapp.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/75x50.xbm?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/75x50.xbm +++ php-src/ext/standard/tests/image/75x50.xbm http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/75x50.wbmp?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/75x50.wbmp +++ php-src/ext/standard/tests/image/75x50.wbmp http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/2x2mm.tif?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/2x2mm.tif +++ php-src/ext/standard/tests/image/2x2mm.tif http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt +++ php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation2.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation1.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_wbmp.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_wbmp.phpt +++ php-src/ext/standard/tests/image/getimagesize_wbmp.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_variation4.phpt +++ php-src/ext/standard/tests/image/getimagesize_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_xbm.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/image/getimagesize_xbm.phpt +++ php-src/ext/standard/tests/image/getimagesize_xbm.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/image 2x2mm.tif 75x50.wbmp 75x50.xbm blank_file getimagesize_error1.phpt getimagesize_jpgapp.phpt getimagesize_tif_mm.phpt getimagesize_variation1.phpt getim
wharmby Thu Jan 22 22:59:54 2009 UTC Modified files: /php-src/ext/standard/tests/image getimagesize_wbmp.phpt getimagesize_tif_mm.phpt 75x50.wbmp getimagesize_variation2.phpt getimagesize_xbm.phpt testAPP.jpg 2x2mm.tif 75x50.xbm blank_file getimagesize_variation3.phpt getimagesize_error1.phpt getimagesize_variation1.phpt getimagesize_jpgapp.phpt getimagesize_variation4.phpt Log: New image tests. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_wbmp.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/getimagesize_wbmp.phpt diff -u /dev/null php-src/ext/standard/tests/image/getimagesize_wbmp.phpt:1.2 --- /dev/null Thu Jan 22 22:59:54 2009 +++ php-src/ext/standard/tests/image/getimagesize_wbmp.phpt Thu Jan 22 22:59:53 2009 @@ -0,0 +1,39 @@ +--TEST-- +GetImageSize() for wbmp format +--SKIPIF-- +?php + if (!defined(IMAGETYPE_WBMP)) { + die(skip wbmp file format is not available); + } +? +--FILE-- +?php +/* Prototype : proto array getimagesize(string imagefile [, array info]) + * Description: Get the size of an image as 4-element array + * Source code: ext/standard/image.c + * Alias to functions: + */ + +echo *** Testing getimagesize() : wbmp format ***\n; +var_dump(getimagesize(dirname(__FILE__) . /75x50.wbmp, $arr)); +var_dump($arr); + +? +===DONE=== +--EXPECT-- +*** Testing getimagesize() : wbmp format *** +array(5) { + [0]= + int(75) + [1]= + int(50) + [2]= + int(15) + [3]= + unicode(22) width=75 height=50 + [umime]= + unicode(18) image/vnd.wap.wbmp +} +array(0) { +} +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt diff -u /dev/null php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt:1.2 --- /dev/null Thu Jan 22 22:59:54 2009 +++ php-src/ext/standard/tests/image/getimagesize_tif_mm.phpt Thu Jan 22 22:59:54 2009 @@ -0,0 +1,39 @@ +--TEST-- +GetImageSize() for tiff format with big-endian (aka Motorola, aka MM) ordering +--SKIPIF-- +?php + if (!defined(IMAGETYPE_TIFF_MM)) { + die(skip tiff_mm file format is not available); + } +? +--FILE-- +?php +/* Prototype : proto array getimagesize(string imagefile [, array info]) + * Description: Get the size of an image as 4-element array + * Source code: ext/standard/image.c + * Alias to functions: + */ + +echo *** Testing getimagesize() : tiff_mm format ***\n; +var_dump(getimagesize(dirname(__FILE__) . /2x2mm.tif, $arr)); +var_dump($arr); + +? +===DONE=== +--EXPECT-- +*** Testing getimagesize() : tiff_mm format *** +array(5) { + [0]= + int(2) + [1]= + int(2) + [2]= + int(8) + [3]= + unicode(20) width=2 height=2 + [umime]= + unicode(10) image/tiff +} +array(0) { +} +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/75x50.wbmp?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/75x50.wbmp http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_variation2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/image/getimagesize_variation2.phpt diff -u /dev/null php-src/ext/standard/tests/image/getimagesize_variation2.phpt:1.2 --- /dev/null Thu Jan 22 22:59:54 2009 +++ php-src/ext/standard/tests/image/getimagesize_variation2.phpt Thu Jan 22 22:59:54 2009 @@ -0,0 +1,167 @@ +--TEST-- +Test getimagesize() function : usage variations - unexpected type for arg 2 +--SKIPIF-- +?php + if (!defined(IMAGETYPE_JPEG)) { + die(skip jpeg format is not available); + } +? +--FILE-- +?php +/* Prototype : proto array getimagesize(string imagefile [, array info]) + * Description: Get the size of an image as 4-element array + * Source code: ext/standard/image.c + * Alias to functions: + */ + +function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { + echo Error: $err_no - $err_msg, $filename($linenum)\n; +} +set_error_handler('test_error_handler'); + +echo *** Testing getimagesize() : usage variations ***\n; + +// Initialise function arguments not being substituted (if any) +$imagefile = dirname(__FILE__)./test1pix.jpg; + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + +//array of values to iterate over +$values = array( + + // int data + 0 = 0, + 1 = 1, + 12345 = 12345, + -2345 = -2345, + + // float
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/zlib/tests gzencode_variation2.phpt
wharmby Wed Jan 21 11:39:11 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/zlib/tests gzencode_variation2.phpt Log: New gzencode() test. php6 tets fails currentlly due to #47178. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzencode_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzencode_variation2.phpt +++ php-src/ext/zlib/tests/gzencode_variation2.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zlib/tests gzencode_variation2-win32.phpt gzencode_variation2.phpt
wharmby Wed Jan 21 11:39:13 2009 UTC Added files: /php-src/ext/zlib/tests gzencode_variation2-win32.phpt Modified files: /php-src/ext/zlib/tests gzencode_variation2.phpt Log: New gzencode() test. php6 tets fails currentlly due to #47178. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzencode_variation2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/zlib/tests/gzencode_variation2.phpt diff -u /dev/null php-src/ext/zlib/tests/gzencode_variation2.phpt:1.2 --- /dev/null Wed Jan 21 11:39:13 2009 +++ php-src/ext/zlib/tests/gzencode_variation2.phpt Wed Jan 21 11:39:12 2009 @@ -0,0 +1,42 @@ +--TEST-- +Test gzencode() function : variation - verify header contents with all encoding modes +--XFAIL-- +Test will fail until bug #47178 resolved; missing gzip headers whne FORCE_DEFLATE specified +--SKIPIF-- +?php + +if( substr(PHP_OS, 0, 3) == WIN ) { + die(skip.. Do not run on Windows); +} + +if (!extension_loaded(zlib)) { + print skip - ZLIB extension not loaded; +} +? +--FILE-- +?php +/* Prototype : string gzencode ( string $data [, int $level [, int $encoding_mode ]] ) + * Description: Gzip-compress a string + * Source code: ext/zlib/zlib.c + * Alias to functions: + */ + +echo *** Testing gzencode() : variation ***\n; + +$data = A small string to encode\n; + +echo \n-- Testing with each encoding_mode --\n; +var_dump(bin2hex(gzencode(b$data, -1))); +var_dump(bin2hex(gzencode(b$data, -1, FORCE_GZIP))); +var_dump(bin2hex(gzencode(b$data, -1, FORCE_DEFLATE))); + +? +===DONE=== +--EXPECTF-- +*** Testing gzencode() : variation *** + +-- Testing with each encoding_mode -- +unicode(90) 1f8b0803735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900 +unicode(90) 1f8b0803735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900 +unicode(86) 1f8b0803789c735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200735808cd +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzencode_variation2-win32.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzencode_variation2-win32.phpt +++ php-src/ext/zlib/tests/gzencode_variation2-win32.phpt --TEST-- Test gzencode() function : variation - verify header contents with all encoding modes --XFAIL-- Test will fail until bug #47178 resolved; missing gzip headers whne FORCE_DEFLATE specified --SKIPIF-- ?php if( substr(PHP_OS, 0, 3) != WIN ) { die(skip.. only for Windows); } if (!extension_loaded(zlib)) { print skip - ZLIB extension not loaded; } ? --FILE-- ?php /* Prototype : string gzencode ( string $data [, int $level [, int $encoding_mode ]] ) * Description: Gzip-compress a string * Source code: ext/zlib/zlib.c * Alias to functions: */ echo *** Testing gzencode() : variation ***\n; $data = A small string to encode\n; echo \n-- Testing with each encoding_mode --\n; var_dump(bin2hex(gzencode(b$data, -1))); var_dump(bin2hex(gzencode(b$data, -1, FORCE_GZIP))); var_dump(bin2hex(gzencode(b$data, -1, FORCE_DEFLATE))); ? ===DONE=== --EXPECTF-- *** Testing gzencode() : variation *** -- Testing with each encoding_mode -- unicode(90) 1f8b080b735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900 unicode(90) 1f8b080b735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200d7739de51900 unicode(86) 1f8b080b789c735428ce4dccc951282e29cacc4b5728c95748cd4bce4f49e50200735808cd ===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/zlib/tests gzencode_variation2.phpt
wharmby Wed Jan 21 11:39:14 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/zlib/tests gzencode_variation2.phpt Log: New gzencode() test. php6 tets fails currentlly due to #47178. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzencode_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzencode_variation2.phpt +++ php-src/ext/zlib/tests/gzencode_variation2.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/zlib/tests gzuncompress_error1.phpt
wharmby Wed Jan 21 12:28:33 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/zlib/tests gzuncompress_error1.phpt Log: New gzuncompress() test. php6 tets fails currentlly due to #47179. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzuncompress_error1.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzuncompress_error1.phpt +++ php-src/ext/zlib/tests/gzuncompress_error1.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zlib/tests gzuncompress_error1.phpt
wharmby Wed Jan 21 12:28:34 2009 UTC Modified files: /php-src/ext/zlib/tests gzuncompress_error1.phpt Log: New gzuncompress() test. php6 tets fails currentlly due to #47179. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzuncompress_error1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/zlib/tests/gzuncompress_error1.phpt diff -u /dev/null php-src/ext/zlib/tests/gzuncompress_error1.phpt:1.2 --- /dev/null Wed Jan 21 12:28:34 2009 +++ php-src/ext/zlib/tests/gzuncompress_error1.phpt Wed Jan 21 12:28:33 2009 @@ -0,0 +1,93 @@ +--TEST-- +Test gzuncompress() function : error conditions +--XFAIL-- +Test will fail until bug #47179 resolved; no error when $length too small +--SKIPIF-- +?php +if (!extension_loaded(zlib)) { + print skip - ZLIB extension not loaded; +} +? +--FILE-- +?php +/* Prototype : string gzuncompress(string data [, int length]) + * Description: Unzip a gzip-compressed string + * Source code: ext/zlib/zlib.c + * Alias to functions: + */ + + + +echo *** Testing gzuncompress() : error conditions ***\n; + +// Zero arguments +echo \n-- Testing gzuncompress() function with Zero arguments --\n; +var_dump( gzuncompress() ); + +//Test gzuncompress with one more than the expected number of arguments +echo \n-- Testing gzuncompress() function with more than expected no. of arguments --\n; +$data = 'string_val'; +$length = 10; +$extra_arg = 10; +var_dump( gzuncompress($data, $length, $extra_arg) ); + +echo \n-- Testing with Unicode string --\n; +var_dump(gzuncompress($data, $length)); + + +echo \n-- Testing with a buffer that is too small --\n; +$short_len = strlen($data) - 1; +$compressed = gzcompress(b$data); + +var_dump(gzuncompress($compressed, $short_len)); + + +echo \n-- Testing with incorrect arguments --\n; +var_dump(gzuncompress(123)); + +class Tester { +function Hello() { +echo Hello\n; +} +} + +$testclass = new Tester(); +var_dump(gzuncompress($testclass)); + +var_dump(gzuncompress($compressed, this is not a number\n)); + +? +===DONE=== +--EXPECTF-- +*** Testing gzuncompress() : error conditions *** + +-- Testing gzuncompress() function with Zero arguments -- + +Warning: gzuncompress() expects at least 1 parameter, 0 given in %s on line %d +NULL + +-- Testing gzuncompress() function with more than expected no. of arguments -- + +Warning: gzuncompress() expects at most 2 parameters, 3 given in %s on line %d +NULL + +-- Testing with Unicode string -- + +Warning: gzuncompress() expects parameter 1 to be strictly a binary string, Unicode string given in %s on line %d +NULL + +-- Testing with a buffer that is too small -- +Warning: gzuncompress(): buffer error in %s on line %d +bool(false) + +-- Testing with incorrect arguments -- + +Warning: gzuncompress(): data error in %s on line %d +bool(false) + +Warning: gzuncompress() expects parameter 1 to be binary string, object given in %s on line %d +NULL + +Warning: gzuncompress() expects parameter 2 to be long, Unicode string given in %s on line %d +NULL +===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_2) /ext/zlib/tests gzuncompress_error1.phpt
wharmby Wed Jan 21 12:28:35 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/zlib/tests gzuncompress_error1.phpt Log: New gzuncompress() test. php6 tets fails currentlly due to #47179. Tested on Windows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzuncompress_error1.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzuncompress_error1.phpt +++ php-src/ext/zlib/tests/gzuncompress_error1.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 printf.phpt
wharmby Thu Jan 22 00:23:01 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings printf.phpt Log: Fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/printf.phpt?r1=1.1.2.3.2.2r2=1.1.2.3.2.3diff_format=u Index: php-src/ext/standard/tests/strings/printf.phpt diff -u php-src/ext/standard/tests/strings/printf.phpt:1.1.2.3.2.2 php-src/ext/standard/tests/strings/printf.phpt:1.1.2.3.2.3 --- php-src/ext/standard/tests/strings/printf.phpt:1.1.2.3.2.2 Mon Sep 15 11:47:16 2008 +++ php-src/ext/standard/tests/strings/printf.phpt Thu Jan 22 00:23:01 2009 @@ -669,6 +669,8 @@ % *** Output for precision value more than maximum *** + +Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum of 40 digits in %s on line %d 12345678900. *** Output for invalid width(-15) specifier *** -- 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 printf.phpt
wharmby Thu Jan 22 00:23:05 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings printf.phpt Log: Fix test http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/printf.phpt?r1=1.1.2.4r2=1.1.2.5diff_format=u Index: php-src/ext/standard/tests/strings/printf.phpt diff -u php-src/ext/standard/tests/strings/printf.phpt:1.1.2.4 php-src/ext/standard/tests/strings/printf.phpt:1.1.2.5 --- php-src/ext/standard/tests/strings/printf.phpt:1.1.2.4 Mon Sep 15 11:47:03 2008 +++ php-src/ext/standard/tests/strings/printf.phpt Thu Jan 22 00:23:05 2009 @@ -669,6 +669,8 @@ % *** Output for precision value more than maximum *** + +Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum of 40 digits in %s on line %d 12345678900. *** Output for invalid width(-15) specifier *** -- 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_variation23.phpt sprintf_variation36.phpt sprintf_variation48.phpt vfprintf_basic1.phpt vfprintf_basic2.phpt vfprintf_basic3.phpt vf
wharmby Tue Jan 20 14:19:32 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings vfprintf_basic5.phpt vfprintf_variation3.phpt vfprintf_variation19_64bit.phpt vfprintf_variation20.phpt vfprintf_variation4_64bit.phpt vfprintf_basic6.phpt vfprintf_basic7_64bit.phpt vfprintf_basic9.phpt vfprintf_variation7.phpt vfprintf_variation15.phpt vfprintf_variation19.phpt vfprintf_basic4.phpt vfprintf_variation16.phpt vfprintf_basic7.phpt vfprintf_variation17.phpt vfprintf_basic3.phpt vfprintf_variation12_64bit.phpt vfprintf_variation4.phpt vfprintf_variation13.phpt vfprintf_variation11_64bit.phpt vfprintf_variation5.phpt vfprintf_variation15_64bit.phpt vfprintf_basic2.phpt vfprintf_variation13_64bit.phpt vfprintf_variation14_64bit.phpt vfprintf_variation6.phpt vfprintf_variation10.phpt vfprintf_variation14.phpt vfprintf_basic8.phpt vfprintf_variation9.phpt vfprintf_basic1.phpt vfprintf_variation16_64bit.phpt vfprintf_variation8.phpt vfprintf_variation21.phpt vfprintf_variation11.phpt vfprintf_variation12.phpt vfprintf_variation18.phpt Modified files: /php-src/ext/standard/tests/strings sprintf_variation36.phpt sprintf_variation48.phpt vsprintf_variation8.phpt sprintf_variation23.phpt vsprintf_variation15.phpt Log: New vfprintf() tests. Tested on Window, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation36.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation36.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation36.phpt:1.2.2.2 php-src/ext/standard/tests/strings/sprintf_variation36.phpt:1.2.2.3 --- php-src/ext/standard/tests/strings/sprintf_variation36.phpt:1.2.2.2 Sat Sep 29 16:54:56 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation36.phpt Tue Jan 20 14:19:31 2009 @@ -37,38 +37,42 @@ $count++; }; -echo Done; +// closing the resources +fclose($fp); +closedir($dfp); + ? +===DONE=== --EXPECTF-- *** Testing sprintf() : hexa formats with resource values *** -- Iteration 1 -- -string(%d) %d -string(%d) %dx -string(%d) %d +string(%d) %a +string(%d) %ax +string(%d) %a string(1) x -string(%d) %d -string(%d) %d -string(%d)%d +string(%d) %a +string(%d) %a +string(%d)%a string(%d) -%d -string(%d)%d -string(%d) %d +%a +string(4) %a +string(30) %a string(10) 0-9A-Fa-f] string(1) x -- Iteration 2 -- -string(%d) %d -string(%d) %dx -string(%d) %d +string(%d) %a +string(%d) %ax +string(%d) %a string(1) x -string(%d) %d -string(%d) %d -string(%d)%d +string(%d) %a +string(%d) %a +string(%d)%a string(%d) -%d -string(%d)%d -string(%d) %d +%a +string(4) %a +string(30) %a string(10) 0-9A-Fa-f] string(1) x -Done +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation48.phpt?r1=1.2.2.3r2=1.2.2.4diff_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.3 php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.2.2.4 --- php-src/ext/standard/tests/strings/sprintf_variation48.phpt:1.2.2.3 Mon Dec 24 04:27:55 2007 +++ php-src/ext/standard/tests/strings/sprintf_variation48.phpt
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings sprintf_variation23.phpt sprintf_variation36.phpt sprintf_variation48.phpt vfprintf_basic.phpt vfprintf_basic1.phpt vfprintf_basic2.phpt vfp
wharmby Tue Jan 20 14:19:44 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings vfprintf_variation19_64bit.phpt vfprintf_basic7_64bit.phpt vfprintf_variation12.phpt vfprintf_variation4_64bit.phpt vfprintf_variation13.phpt vfprintf_variation16.phpt vfprintf_variation1.phpt vfprintf_variation11_64bit.phpt vfprintf_variation15.phpt vfprintf_variation9.phpt vfprintf_variation14_64bit.phpt vfprintf_basic6.phpt vfprintf_error1.phpt vfprintf_error3.phpt vfprintf_variation16_64bit.phpt vfprintf_variation14.phpt vfprintf_variation12_64bit.phpt vfprintf_variation5.phpt vfprintf_variation11.phpt vfprintf_basic1.phpt vfprintf_variation3.phpt vfprintf_variation21.phpt vfprintf_variation4.phpt vfprintf_error2.phpt vfprintf_basic8.phpt vfprintf_basic4.phpt vfprintf_basic9.phpt vfprintf_basic2.phpt vfprintf_basic7.phpt vfprintf_variation19.phpt vfprintf_variation13_64bit.phpt vfprintf_variation17.phpt vfprintf_variation6.phpt vfprintf_basic3.phpt vfprintf_variation10.phpt vfprintf_variation20.phpt vfprintf_variation18.phpt vfprintf_basic5.phpt vfprintf_basic.phpt vfprintf_error4.phpt vfprintf_variation8.phpt vfprintf_variation15_64bit.phpt vfprintf_variation7.phpt Modified files: /php-src/ext/standard/tests/strings vsprintf_variation15.phpt sprintf_variation36.phpt vsprintf_variation8.phpt sprintf_variation23.phpt sprintf_variation48.phpt Log: New vfprintf() tests. Tested on Window, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vsprintf_variation15.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/strings/vsprintf_variation15.phpt diff -u php-src/ext/standard/tests/strings/vsprintf_variation15.phpt:1.1.2.2 php-src/ext/standard/tests/strings/vsprintf_variation15.phpt:1.1.2.3 --- php-src/ext/standard/tests/strings/vsprintf_variation15.phpt:1.1.2.2 Wed Nov 7 08:31:04 2007 +++ php-src/ext/standard/tests/strings/vsprintf_variation15.phptTue Jan 20 14:19:43 2009 @@ -32,7 +32,7 @@ $args_array = array( array(1234567, 01234567, 0 ), array(12345678900, 12345678900, 1234, 12345), - array(1234000, 10e20, 1.2e2), + array(1234000, 10.1234567e5, 1.2e2), array(1, 0, 00, 10_), array(3, 4, 1, 2) ); @@ -46,9 +46,9 @@ $counter++; } -echo Done; ? ---EXPECTF-- +===Done=== +--EXPECT-- *** Testing vsprintf() : unsigned formats and unsigned values *** -- Iteration 1 -- @@ -58,11 +58,11 @@ string(23) 3755744308 u 1234 12345 -- Iteration 3 -- -string(25)1234000 0 120 +string(25)1234000 1012345120 -- Iteration 4 -- string(10) #1 0 $0 10 -- Iteration 5 -- string(7) 1 2 3 4 -Done +===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_variation36.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/sprintf_variation36.phpt diff -u php-src/ext/standard/tests/strings/sprintf_variation36.phpt:1.1.2.1 php-src/ext/standard/tests/strings/sprintf_variation36.phpt:1.1.2.2 ---
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings strip_tags_variation1.phpt strip_tags_variation3.phpt stripcslashes_basic.phpt stripcslashes_error.phpt stripcslashes_variation1.phpt strips
wharmby Tue Jan 20 22:54:36 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings stripcslashes_error.phpt stripcslashes_variation1.phpt stripcslashes_basic.phpt Modified files: /php-src/ext/standard/tests/strings stripslashes_variation1.phpt strip_tags_variation1.phpt strip_tags_variation3.phpt Log: New stripcslashes() tests. Tested on Window, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation1.phpt?r1=1.1.2.1.2.2r2=1.1.2.1.2.3diff_format=u Index: php-src/ext/standard/tests/strings/stripslashes_variation1.phpt diff -u php-src/ext/standard/tests/strings/stripslashes_variation1.phpt:1.1.2.1.2.2 php-src/ext/standard/tests/strings/stripslashes_variation1.phpt:1.1.2.1.2.3 --- php-src/ext/standard/tests/strings/stripslashes_variation1.phpt:1.1.2.1.2.2 Wed Jun 25 12:16:17 2008 +++ php-src/ext/standard/tests/strings/stripslashes_variation1.phpt Tue Jan 20 22:54:36 2009 @@ -31,51 +31,51 @@ // 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 - , - '', - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // objects - new sample(), - - // resource - $file_handle, - - // NULL values - NULL, - null + // integer values +/*1*/0, + 1, + 12345, + -2345, + + // float values +/*5*/10.5, + -10.5, + 10.1234567e10, + 10.7654321E-10, + .5, + + // array values +/*10*/ array(), + array(0), + array(1), + array(1, 2), + array('color' = 'red', 'item' = 'pen'), + + // boolean values +/*15*/ true, + false, + TRUE, + FALSE, + + // empty string +/*19*/ , + '', + + // undefined variable +/*21*/ $undefined_var, + + // unset variable +/*22*/ $unset_var, + + // objects +/*23*/ new sample(), + + // resource +/*24*/ $file_handle, + + // null values +/*25*/ NULL, + null ); @@ -95,8 +95,8 @@ // closing the file fclose($file_handle); -echo Done\n; ? +===DONE=== --EXPECTF-- *** Testing stripslashes() : with non-string type argument *** @@ -118,9 +118,9 @@ -- Iteration 6 -- 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 -- Iteration 10 -- @@ -169,4 +169,4 @@ string(0) -- Iteration 26 -- string(0) -Done +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strip_tags_variation1.phpt?r1=1.1.2.4r2=1.1.2.5diff_format=u Index: php-src/ext/standard/tests/strings/strip_tags_variation1.phpt diff -u php-src/ext/standard/tests/strings/strip_tags_variation1.phpt:1.1.2.4 php-src/ext/standard/tests/strings/strip_tags_variation1.phpt:1.1.2.5 --- php-src/ext/standard/tests/strings/strip_tags_variation1.phpt:1.1.2.4 Wed Jun 25 12:16:16 2008 +++ php-src/ext/standard/tests/strings/strip_tags_variation1.phpt Tue Jan 20 22:54:36 2009 @@ -1,7 +1,7 @@ --TEST-- Test strip_tags() function : usage variations - unexpected values for 'str' argument --INI-- -short_open_tag = on +set short_open_tag = on --FILE-- ?php /* Prototype : string strip_tags(string $str [, string $allowable_tags]) @@ -32,51 +32,51 @@ //array of values to iterate over $values = array( - // int data - 0, - 1, - 12345, - -2345, - - // float data - 10.5, - -10.5, - 10.5e10, - 10.6E-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 - , - '', - - // object data - new classA(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource variable - $fp + // int data +/*1*/
[PHP-CVS] cvs: php-src /ext/standard/tests/strings strip_tags_variation1.phpt strip_tags_variation3.phpt stripcslashes_basic.phpt stripcslashes_error.phpt stripcslashes_variation1.phpt stripslashes_va
wharmby Tue Jan 20 22:54:39 2009 UTC Modified files: /php-src/ext/standard/tests/strings stripcslashes_error.phpt stripcslashes_variation1.phpt stripcslashes_basic.phpt strip_tags_variation1.phpt strip_tags_variation3.phpt stripslashes_variation1.phpt Log: New stripcslashes() tests. Tested on Window, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripcslashes_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/stripcslashes_error.phpt diff -u /dev/null php-src/ext/standard/tests/strings/stripcslashes_error.phpt:1.2 --- /dev/null Tue Jan 20 22:54:39 2009 +++ php-src/ext/standard/tests/strings/stripcslashes_error.phpt Tue Jan 20 22:54:39 2009 @@ -0,0 +1,34 @@ +--TEST-- +Test stripcslashes() function : error conditions +--FILE-- +?php + +/* Prototype : string stripcslashes ( string $str ) + * Description: Returns a string with backslashes stripped off. Recognizes C-like \n, \r ..., + * octal and hexadecimal representation. + * Source code: ext/standard/string.c +*/ + +echo *** Testing stripcslashes() : unexpected number of arguments ***; + + +echo \n-- Testing stripcslashes() function with no arguments --\n; +var_dump( stripcslashes() ); + +echo \n-- Testing stripcslashes() function with more than expected no. of arguments --\n; +$extra_arg = 10; +var_dump( stripcslashes(abc def, $extra_arg) ); +? +===DONE=== +--EXPECTF-- +*** Testing stripcslashes() : unexpected number of arguments *** +-- Testing stripcslashes() function with no arguments -- + +Warning: stripcslashes() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing stripcslashes() function with more than expected no. of arguments -- + +Warning: stripcslashes() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripcslashes_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/stripcslashes_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/strings/stripcslashes_variation1.phpt:1.2 --- /dev/null Tue Jan 20 22:54:39 2009 +++ php-src/ext/standard/tests/strings/stripcslashes_variation1.phptTue Jan 20 22:54:39 2009 @@ -0,0 +1,178 @@ +--TEST-- +Test stripcslashes() function : usage variations - non-string type argument +--INI-- +--FILE-- +?php +/* Prototype : string stripcslashes ( string $str ) + * Description: Returns a string with backslashes stripped off. Recognizes C-like \n, \r ..., + * octal and hexadecimal representation. + * Source code: ext/standard/string.c +*/ + +/* + * Test stripcslashes() with non-string type argument such as int, float, etc +*/ + +echo *** Testing stripcslashes() : with non-string type argument ***\n; +// initialize all required variables + +// get an unset variable +$unset_var = 'string_val'; +unset($unset_var); + +// declaring a class +class sample { + public function __toString() { + return object; + } +} + +// Defining resource +$file_handle = fopen(__FILE__, 'r'); + +// array with different values +$values = array ( + + // integer values +/*1*/0, + 1, + 12345, + -2345, + + // float values +/*5*/10.5, + -10.5, + 10.1234567e10, + 10.7654321E-10, + .5, + + // array values +/*10*/ array(), + array(0), + array(1), + array(1, 2), + array('color' = 'red', 'item' = 'pen'), + + // boolean values +/*15*/ true, + false, + TRUE, + FALSE, + + // empty string +/*19*/ , + '', + + // undefined variable +/*21*/ $undefined_var, + + // unset variable +/*22*/ $unset_var, + + // objects +/*23*/ new sample(), + + // resource +/*24*/ $file_handle, + + // null values +/*25*/ NULL, + null +); + + +// loop through each element of the array and check the working of stripcslashes() +// when $str arugment is supplied with different values +echo \n--- Testing stripcslashes() 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( stripcslashes($str) ); + + $counter ++; +} + +// closing the file
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings strip_tags_variation1.phpt strip_tags_variation3.phpt stripcslashes_basic.phpt stripcslashes_error.phpt stripcslashes_variation1.phpt strips
wharmby Tue Jan 20 22:54:42 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings stripcslashes_variation1.phpt stripcslashes_error.phpt stripcslashes_basic.phpt Modified files: /php-src/ext/standard/tests/strings strip_tags_variation1.phpt stripslashes_variation1.phpt strip_tags_variation3.phpt Log: New stripcslashes() tests. Tested on Window, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strip_tags_variation1.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/strings/strip_tags_variation1.phpt diff -u php-src/ext/standard/tests/strings/strip_tags_variation1.phpt:1.1.4.2 php-src/ext/standard/tests/strings/strip_tags_variation1.phpt:1.1.4.3 --- php-src/ext/standard/tests/strings/strip_tags_variation1.phpt:1.1.4.2 Tue Oct 9 12:47:00 2007 +++ php-src/ext/standard/tests/strings/strip_tags_variation1.phpt Tue Jan 20 22:54:41 2009 @@ -32,51 +32,51 @@ //array of values to iterate over $values = array( - // int data - 0, - 1, - 12345, - -2345, - - // float data - 10.5, - -10.5, - 10.5e10, - 10.6E-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 - , - '', - - // object data - new classA(), - - // undefined data - @$undefined_var, - - // unset data - @$unset_var, - - // resource variable - $fp + // int data +/*1*/ 0, + 1, + 12345, + -2345, + + // float data +/*5*/ 10.5, + -10.5, + 10.1234567e10, + 10.7654321E-10, + .5, + + // array data +/*10*/array(), + array(0), + array(1), + array(1, 2), + array('color' = 'red', 'item' = 'pen'), + + // null data +/*15*/NULL, + null, + + // boolean data +/*17*/true, + false, + TRUE, + FALSE, + + // empty data +/*21*/, + '', + + // object data +/*23*/new classA(), + + // undefined data +/*24*/@$undefined_var, + + // unset data +/*25*/@$unset_var, + + // resource variable +/*26*/$fp ); @@ -88,8 +88,8 @@ $iterator++; }; -echo Done; ? +===DONE=== --EXPECTF-- *** Testing strip_tags() : usage variations *** -- Iteration 1 -- @@ -105,9 +105,9 @@ -- Iteration 6 -- 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 -- Iteration 10 -- @@ -154,4 +154,4 @@ string(0) -- Iteration 26 -- string(%d) Resource id #%d -Done +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation1.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/standard/tests/strings/stripslashes_variation1.phpt diff -u php-src/ext/standard/tests/strings/stripslashes_variation1.phpt:1.1.2.2 php-src/ext/standard/tests/strings/stripslashes_variation1.phpt:1.1.2.3 --- php-src/ext/standard/tests/strings/stripslashes_variation1.phpt:1.1.2.2 Tue Oct 9 10:56:45 2007 +++ php-src/ext/standard/tests/strings/stripslashes_variation1.phpt Tue Jan 20 22:54:41 2009 @@ -31,51 +31,51 @@ // 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 - , - '', - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // objects - new sample(), - - // resource - $file_handle, - - // NULL values - NULL, - null + // integer values +/*1*/0, + 1, + 12345, + -2345, + + // float values +/*5*/10.5, + -10.5, + 10.1234567e10, + 10.7654321E-10, + .5, + + // array values +/*10*/ array(), + array(0), + array(1), + array(1, 2), +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings strtolower-win32.phpt strtoupper1-win32.phpt
wharmby Tue Jan 20 23:19:45 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings strtoupper1-win32.phpt strtolower-win32.phpt Log: Fix SKIPIF logic http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtoupper1-win32.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/strtoupper1-win32.phpt diff -u php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.1.2.1.2.1 Thu Aug 21 12:25:07 2008 +++ php-src/ext/standard/tests/strings/strtoupper1-win32.phpt Tue Jan 20 23:19:44 2009 @@ -2,7 +2,7 @@ Test strtoupper() function --SKIPIF-- ?php -if( (substr(PHP_OS, 0, 3) != WIN) (setlocale(LC_CTYPE, ) != English_United States.1252) ) +if( (substr(PHP_OS, 0, 3) != WIN) || (setlocale(LC_CTYPE, ) != English_United States.1252) ) die('skip Run only on Windows with locale as English_United States.1252'); ? --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtolower-win32.phpt?r1=1.1.2.1.2.1r2=1.1.2.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/strtolower-win32.phpt diff -u php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.1.2.1.2.1 php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.1.2.1.2.2 --- php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.1.2.1.2.1 Thu Aug 21 12:05:30 2008 +++ php-src/ext/standard/tests/strings/strtolower-win32.phptTue Jan 20 23:19:44 2009 @@ -2,7 +2,7 @@ Test strtolower() function --SKIPIF-- ?php -if( (substr(PHP_OS, 0, 3) != WIN) (setlocale(LC_CTYPE, ) != English_United States.1252) ) +if( (substr(PHP_OS, 0, 3) != WIN) || (setlocale(LC_CTYPE, ) != English_United States.1252) ) die('skip Run only on Windows with locale as English_United States.1252'); ? --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 strtolower-win32.phpt strtoupper1-win32.phpt
wharmby Tue Jan 20 23:19:47 2009 UTC Modified files: /php-src/ext/standard/tests/strings strtolower-win32.phpt strtoupper1-win32.phpt Log: Fix SKIPIF logic http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtolower-win32.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/strings/strtolower-win32.phpt diff -u php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.3 php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.4 --- php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.3Tue May 27 10:50:47 2008 +++ php-src/ext/standard/tests/strings/strtolower-win32.phptTue Jan 20 23:19:47 2009 @@ -2,7 +2,7 @@ Test strtolower() function --SKIPIF-- ?php -if( (substr(PHP_OS, 0, 3) != WIN) (@setlocale(LC_CTYPE, ) != English_United States.1252) ) +if( (substr(PHP_OS, 0, 3) != WIN) || (@setlocale(LC_CTYPE, ) != English_United States.1252) ) die('skip Run only on Windows with locale as English_United States.1252'); ? --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtoupper1-win32.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/standard/tests/strings/strtoupper1-win32.phpt diff -u php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.3 php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.4 --- php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.3 Tue May 27 10:50:47 2008 +++ php-src/ext/standard/tests/strings/strtoupper1-win32.phpt Tue Jan 20 23:19:47 2009 @@ -2,7 +2,7 @@ Test strtoupper() function --SKIPIF-- ?php -if( (substr(PHP_OS, 0, 3) != WIN) (@setlocale(LC_CTYPE, ) != English_United States.1252) ) +if( (substr(PHP_OS, 0, 3) != WIN) || (@setlocale(LC_CTYPE, ) != English_United States.1252) ) die('skip Run only on Windows with locale as English_United States.1252'); ? --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_2) /ext/standard/tests/strings strtolower-win32.phpt strtoupper1-win32.phpt
wharmby Tue Jan 20 23:19:49 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings strtoupper1-win32.phpt strtolower-win32.phpt Log: Fix SKIPIF logic http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtoupper1-win32.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/strtoupper1-win32.phpt diff -u php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.1.2.1 php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.1.2.1 Fri Aug 10 03:03:49 2007 +++ php-src/ext/standard/tests/strings/strtoupper1-win32.phpt Tue Jan 20 23:19:48 2009 @@ -2,7 +2,7 @@ Test strtoupper() function --SKIPIF-- ?php -if( (substr(PHP_OS, 0, 3) != WIN) (setlocale(LC_CTYPE, ) != English_United States.1252) ) +if( (substr(PHP_OS, 0, 3) != WIN) || (setlocale(LC_CTYPE, ) != English_United States.1252) ) die('skip Run only on Windows with locale as English_United States.1252'); ? --FILE-- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtolower-win32.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/strtolower-win32.phpt diff -u php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.1.2.1 php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/strtolower-win32.phpt:1.1.2.1Fri Aug 10 03:03:49 2007 +++ php-src/ext/standard/tests/strings/strtolower-win32.phptTue Jan 20 23:19:48 2009 @@ -2,7 +2,7 @@ Test strtolower() function --SKIPIF-- ?php -if( (substr(PHP_OS, 0, 3) != WIN) (setlocale(LC_CTYPE, ) != English_United States.1252) ) +if( (substr(PHP_OS, 0, 3) != WIN) || (setlocale(LC_CTYPE, ) != English_United States.1252) ) die('skip Run only on Windows with locale as English_United States.1252'); ? --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/zlib/tests gzinflate_error1.phpt
wharmby Tue Jan 20 23:37:47 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/zlib/tests gzinflate_error1.phpt Log: New gzinflate() error test. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzinflate_error1.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzinflate_error1.phpt +++ php-src/ext/zlib/tests/gzinflate_error1.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zlib/tests gzinflate_error1.phpt
wharmby Tue Jan 20 23:37:49 2009 UTC Modified files: /php-src/ext/zlib/tests gzinflate_error1.phpt Log: New gzinflate() error test. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzinflate_error1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/zlib/tests/gzinflate_error1.phpt diff -u /dev/null php-src/ext/zlib/tests/gzinflate_error1.phpt:1.2 --- /dev/null Tue Jan 20 23:37:49 2009 +++ php-src/ext/zlib/tests/gzinflate_error1.phptTue Jan 20 23:37:49 2009 @@ -0,0 +1,83 @@ +--TEST-- +Test gzinflate() function : error conditions +--SKIPIF-- +?php +if (!extension_loaded(zlib)) { + print skip - ZLIB extension not loaded; +} +? +--FILE-- +?php +/* Prototype : string gzinflate(string data [, int length]) + * Description: Unzip a gzip-compressed string + * Source code: ext/zlib/zlib.c + * Alias to functions: + */ + +include(dirname(__FILE__) . '/data.inc'); + +echo *** Testing gzinflate() : error conditions ***\n; + +echo \n-- Testing gzcompress() function with Zero arguments --\n; +var_dump( gzinflate() ); + +echo \n-- Testing gzcompress() function with more than expected no. of arguments --\n; +$data = 'string_val'; +$length = 10; +$extra_arg = 10; +var_dump( gzinflate(b$data, $length, $extra_arg) ); + +echo \n-- Testing with Unicode string --\n; +var_dump(gzinflate($data, $length)); + +echo \n-- Testing with a buffer that is too small --\n; +$short_len = strlen($data) - 1; +$compressed = gzcompress(b$data); + +var_dump(gzinflate($compressed, $short_len)); + +echo \n-- Testing with incorrect parameters --\n; + +class Tester { +function Hello() { +echo Hello\n; +} +} + +$testclass = new Tester(); +var_dump(gzinflate($testclass)); +var_dump(gzinflate(b$data, $testclass)); + +? +===DONE=== +--EXPECTF-- +*** Testing gzinflate() : error conditions *** + +-- Testing gzcompress() function with Zero arguments -- + +Warning: gzinflate() expects at least 1 parameter, 0 given in %s on line %d +NULL + +-- Testing gzcompress() function with more than expected no. of arguments -- + +Warning: gzinflate() expects at most 2 parameters, 3 given in %s on line %d +NULL + +-- Testing with Unicode string -- + +Warning: gzinflate() expects parameter 1 to be strictly a binary string, Unicode string given in %s on line %d +NULL + +-- Testing with a buffer that is too small -- + +Warning: gzinflate(): data error in %s on line %d +bool(false) + +-- Testing with incorrect parameters -- + +Warning: gzinflate() expects parameter 1 to be binary string, object given in %s on line %d +NULL + +Warning: gzinflate() expects parameter 2 to be long, object given in %s on line %d +NULL +===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_2) /ext/zlib/tests gzinflate_error1.phpt
wharmby Tue Jan 20 23:37:50 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/zlib/tests gzinflate_error1.phpt Log: New gzinflate() error test. Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/tests/gzinflate_error1.phpt?view=markuprev=1.1 Index: php-src/ext/zlib/tests/gzinflate_error1.phpt +++ php-src/ext/zlib/tests/gzinflate_error1.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 str_pad_variation1.phpt str_pad_variation2.phpt str_pad_variation3.phpt str_pad_variation4.phpt str_pad_variation5.phpt str_shuffle_basic.ph
wharmby Mon Jan 19 15:46:32 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings str_pad_variation3.phpt str_shuffle_basic.phpt strlen_variation1.phpt stristr_variation2.phpt strlen_error.phpt str_shuffle_variation1.phpt stristr_error.phpt str_shuffle_error.phpt strlen_basic.phpt stristr_basic.phpt str_pad_variation5.phpt stristr_variation1.phpt str_pad_variation1.phpt str_pad_variation2.phpt str_pad_variation4.phpt Modified files: /php-src/ext/standard/tests/strings strtr_variation5.phpt strtr_variation7.phpt strtr_variation6.phpt strtr_variation9.phpt Log: New tests for str_pad(), str_shuffle(), stristr() and strlen(). Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtr_variation5.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/standard/tests/strings/strtr_variation5.phpt diff -u php-src/ext/standard/tests/strings/strtr_variation5.phpt:1.1.2.3 php-src/ext/standard/tests/strings/strtr_variation5.phpt:1.1.2.4 --- php-src/ext/standard/tests/strings/strtr_variation5.phpt:1.1.2.3Tue Oct 9 10:56:45 2007 +++ php-src/ext/standard/tests/strings/strtr_variation5.phptMon Jan 19 15:46:31 2009 @@ -31,42 +31,42 @@ // array with different values $strings = array ( - // integer values - 0, - 1, - -2, - - // float values - 10.5, - -20.5, - 10.5e10, - - // array values - array(), - array(0), - array(1, 2), - - // boolean values - true, - false, - TRUE, - FALSE, - - // null vlaues - NULL, - null, - - // objects - new sample(), - - // resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var + // integer values +/*1*/0, + 1, + -2, + + // float values +/*4*/10.5, + -20.5, + 10.1234567e10, + + // array values +/*7*/array(), + array(0), + array(1, 2), + + // boolean values +/*10*/ true, + false, + TRUE, + FALSE, + + // null vlaues +/*14*/ NULL, + null, + + // objects +/*16*/ new sample(), + + // resource +/*17*/ $file_handle, + + // undefined variable +/*18*/ @$undefined_var, + + // unset variable +/*19*/ @$unset_var ); //defining 'from' argument @@ -86,8 +86,8 @@ fclose($file_handle); //closing the file handle -echo *** Done ***; ? +===Done=== --EXPECTF-- *** Testing strtr() function: with unexpected inputs for 'str' *** -- Iteration 1 -- @@ -101,7 +101,7 @@ -- Iteration 5 -- string(5) -ma.5 -- Iteration 6 -- -string(12) ta5a +string(12) tatm34567aaa -- Iteration 7 -- Notice: Array to string conversion in %s on line %d @@ -129,9 +129,9 @@ -- Iteration 16 -- string(13) s02ple objec1 -- Iteration 17 -- -string(%d) Resource id #%d +string(%d) Resource id #%s -- Iteration 18 -- string(0) -- Iteration 19 -- string(0) -*** Done *** +===Done=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtr_variation7.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/strings/strtr_variation7.phpt diff -u php-src/ext/standard/tests/strings/strtr_variation7.phpt:1.1.2.1 php-src/ext/standard/tests/strings/strtr_variation7.phpt:1.1.2.2 --- php-src/ext/standard/tests/strings/strtr_variation7.phpt:1.1.2.1Mon Oct 8 15:19:55 2007 +++ php-src/ext/standard/tests/strings/strtr_variation7.phptMon Jan 19 15:46:31 2009 @@ -37,42 +37,42 @@ // array of values for 'to' argument $to_arr = array ( - // integer values - 0, - 1, - -2, - - // float values - 10.5, - -20.5, - 10.5e10, - - // array values - array(), - array(0), - array(1, 2), - - // boolean values - true, - false, - TRUE, - FALSE, - - // null vlaues - NULL, - null, - - // objects - new sample(), - - // resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset
[PHP-CVS] cvs: php-src /ext/standard/tests/strings str_pad_variation1.phpt str_pad_variation2.phpt str_pad_variation3.phpt str_pad_variation4.phpt str_pad_variation5.phpt str_shuffle_basic.phpt str_sh
wharmby Mon Jan 19 15:46:38 2009 UTC Modified files: /php-src/ext/standard/tests/strings str_pad_variation2.phpt stristr_variation2.phpt stristr_variation1.phpt strlen_basic.phpt str_shuffle_variation1.phpt stristr_basic.phpt str_pad_variation5.phpt str_pad_variation1.phpt strlen_error.phpt strlen_variation1.phpt str_pad_variation4.phpt str_pad_variation3.phpt str_shuffle_basic.phpt stristr_error.phpt str_shuffle_error.phpt strtr_variation9.phpt strtr_variation6.phpt strtr_variation7.phpt strtr_variation5.phpt Log: New tests for str_pad(), str_shuffle(), stristr() and strlen(). Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_pad_variation2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/str_pad_variation2.phpt diff -u /dev/null php-src/ext/standard/tests/strings/str_pad_variation2.phpt:1.2 --- /dev/null Mon Jan 19 15:46:36 2009 +++ php-src/ext/standard/tests/strings/str_pad_variation2.phpt Mon Jan 19 15:46:35 2009 @@ -0,0 +1,139 @@ +--TEST-- +Test str_pad() function : usage variations - unexpected inputs for '$pad_length' argument +--FILE-- +?php +/* Prototype : string str_pad ( string $input , int $pad_length [, string $pad_string [, int $pad_type ]] ) + * Description: Pad a string to a certain length with another string + * Source code: ext/standard/string.c +*/ + +/* Test str_pad() function: with unexpected inputs for '$pad_length' + * and expected type for '$input' +*/ + +echo *** Testing str_pad() function: with unexpected inputs for 'pad_length' argument ***\n; + +//get an unset variable +$unset_var = 'string_val'; +unset($unset_var); + +//defining a class +class sample { + public function __toString() { +return sample object; + } +} + +//getting the resource +$file_handle = fopen(__FILE__, r); + +// array with different values for $input +$pad_lengths = array ( + + // integer values +/*1*/0, + 1, + -2, + 255, + + // float values +/*5*/10.5, + -20.5, + 10.12345e2, + + // array values +/*8*/array(), + array(0), + array(1, 2), + + // boolean values +/*11*/ true, + false, + TRUE, + FALSE, + + // null vlaues +/*15*/ NULL, + null, + + // objects +/*17*/ new sample(), + + // resource +/*18*/ $file_handle, + + // undefined variable +/*19*/ @$undefined_var, + + // unset variable +/*20*/ @$unset_var +); + +//defining '$input' argument +$input = Test string; + +// loop through with each element of the $pad_lengths array to test str_pad() function +$count = 1; +foreach($pad_lengths as $pad_length) { + echo -- Iteration $count --\n; + var_dump( str_pad($input, $pad_length) ); + $count ++; +} + +fclose($file_handle); //closing the file handle + +? +===DONE=== +--EXPECTF-- +*** Testing str_pad() function: with unexpected inputs for 'pad_length' argument *** +-- Iteration 1 -- +unicode(11) Test string +-- Iteration 2 -- +unicode(11) Test string +-- Iteration 3 -- +unicode(11) Test string +-- Iteration 4 -- +unicode(255) Test string +-- Iteration 5 -- +unicode(11) Test string +-- Iteration 6 -- +unicode(11) Test string +-- Iteration 7 -- +unicode(1012) Test string
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings str_pad_variation1.phpt str_pad_variation2.phpt str_pad_variation3.phpt str_pad_variation4.phpt str_pad_variation5.phpt str_shuffle_basic.ph
wharmby Mon Jan 19 15:46:43 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings stristr_variation2.phpt stristr_error.phpt str_pad_variation2.phpt str_pad_variation1.phpt str_pad_variation4.phpt str_pad_variation5.phpt str_shuffle_variation1.phpt strlen_basic.phpt str_shuffle_basic.phpt stristr_basic.phpt stristr_variation1.phpt strlen_error.phpt strlen_variation1.phpt str_pad_variation3.phpt str_shuffle_error.phpt Modified files: /php-src/ext/standard/tests/strings strtr_variation7.phpt strtr_variation6.phpt strtr_variation5.phpt strtr_variation9.phpt Log: New tests for str_pad(), str_shuffle(), stristr() and strlen(). Tested on WIndows, Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtr_variation7.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/standard/tests/strings/strtr_variation7.phpt diff -u php-src/ext/standard/tests/strings/strtr_variation7.phpt:1.1.4.3 php-src/ext/standard/tests/strings/strtr_variation7.phpt:1.1.4.4 --- php-src/ext/standard/tests/strings/strtr_variation7.phpt:1.1.4.3Wed Jun 25 12:16:17 2008 +++ php-src/ext/standard/tests/strings/strtr_variation7.phptMon Jan 19 15:46:40 2009 @@ -37,42 +37,42 @@ // array of values for 'to' argument $to_arr = array ( - // integer values - 0, - 1, - -2, - - // float values - 10.5, - -20.5, - 10.5e10, - - // array values - array(), - array(0), - array(1, 2), - - // boolean values - true, - false, - TRUE, - FALSE, - - // null vlaues - NULL, - null, - - // objects - new sample(), - - // resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var + // integer values +/*1*/0, + 1, + -2, + + // float values +/*4*/10.5, + -20.5, + 10.12345675e10, + + // array values +/*7*/array(), + array(0), + array(1, 2), + + // boolean values +/*10*/ true, + false, + TRUE, + FALSE, + + // null vlaues +/*14*/ NULL, + null, + + // objects +/*16*/ new sample(), + + // resource +/*17*/ $file_handle, + + // undefined variable +/*18*/ @$undefined_var, + + // unset variable +/*19*/ @$unset_var ); // loop through with each element of the $to array to test strtr() function @@ -86,8 +86,8 @@ fclose($file_handle); //closing the file handle -echo *** Done ***; ? +===DONE=== --EXPECTF-- *** Testing strtr() function: with unexpected inputs for 'to' *** @@ -107,7 +107,7 @@ string(6) .52-20 -- Iteration 6 -- -string(6) 000105 +string(6) 234101 -- Iteration 7 -- @@ -155,4 +155,4 @@ -- Iteration 19 -- string(6) 012atm -*** Done *** +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtr_variation6.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/strings/strtr_variation6.phpt diff -u php-src/ext/standard/tests/strings/strtr_variation6.phpt:1.1.4.2 php-src/ext/standard/tests/strings/strtr_variation6.phpt:1.1.4.3 --- php-src/ext/standard/tests/strings/strtr_variation6.phpt:1.1.4.2Mon Oct 8 15:21:36 2007 +++ php-src/ext/standard/tests/strings/strtr_variation6.phptMon Jan 19 15:46:40 2009 @@ -34,42 +34,42 @@ // array of values for 'from' $from_arr = array ( - // integer values - 0, - 1, - -2, - - // float values - 10.5, - -20.5, - 10.5e10, - - // array values - array(), - array(0), - array(1, 2), - - // boolean values - true, - false, - TRUE, - FALSE, - - // null vlaues - NULL, - null, - - // objects - new sample(), - - // resource - $file_handle, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var + // integer values +/*1*/0, + 1, + -2, + + // float values +/*4*/10.5, + -20.5, +
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings strval_basic.phpt strval_error.phpt strval_variation1.phpt strval_variation2.phpt
wharmby Mon Jan 19 15:54:43 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings strval_basic.phpt strval_variation2.phpt strval_error.phpt strval_variation1.phpt Log: New strval() tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_basic.phpt +++ php-src/ext/standard/tests/strings/strval_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_variation2.phpt +++ php-src/ext/standard/tests/strings/strval_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_error.phpt +++ php-src/ext/standard/tests/strings/strval_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_variation1.phpt +++ php-src/ext/standard/tests/strings/strval_variation1.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 strval_basic.phpt strval_error.phpt strval_variation1.phpt strval_variation2.phpt
wharmby Mon Jan 19 15:54:46 2009 UTC Modified files: /php-src/ext/standard/tests/strings strval_variation2.phpt strval_variation1.phpt strval_error.phpt strval_basic.phpt Log: New strval() tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_variation2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/strval_variation2.phpt diff -u /dev/null php-src/ext/standard/tests/strings/strval_variation2.phpt:1.2 --- /dev/null Mon Jan 19 15:54:45 2009 +++ php-src/ext/standard/tests/strings/strval_variation2.phpt Mon Jan 19 15:54:45 2009 @@ -0,0 +1,82 @@ +--TEST-- +Test strval() function : usage variations - Pass all valid char codes +--FILE-- +?php +/* Prototype : string strval ( mixed $var ) + * Description: Get the string value of a variable. + * Source code: ext/standard/string.c + */ + +echo *** Testing strval() : usage variations - Pass all valid char codes ***\n; + +$s0 = \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f; +$s1 = \x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f; +$s2 = \x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f; +$s3 = \x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f; +$s4 = \x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f; +$s5 = \x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f; +$s6 = \x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f; +$s7 = \x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f; +$s8 = \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f; +$s9 = \x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f; +$sa = \xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf; +$sb = \xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf; +$sc = \xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf; +$sd = \xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf; +$se = \xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef; +$sf = \xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff; + +echo bin2hex((binary)strval($s0)); +echo \n; +echo bin2hex((binary)strval($s1)); +echo \n; +echo bin2hex((binary)strval($s2)); +echo \n; +echo bin2hex((binary)strval($s3)); +echo \n; +echo bin2hex((binary)strval($s4)); +echo \n; +echo bin2hex((binary)strval($s5)); +echo \n; +echo bin2hex((binary)strval($s6)); +echo \n; +echo bin2hex((binary)strval($s7)); +echo \n; +echo bin2hex((binary)strval($s8)); +echo \n; +echo bin2hex((binary)strval($s9)); +echo \n; +echo bin2hex((binary)strval($sa)); +echo \n; +echo bin2hex((binary)strval($sb)); +echo \n; +echo bin2hex((binary)strval($sc)); +echo \n; +echo bin2hex((binary)strval($sd)); +echo \n; +echo bin2hex((binary)strval($se)); +echo \n; +echo bin2hex((binary)strval($sf)); +echo \n; + +? +===DONE=== +--EXPECTF-- +*** Testing strval() : usage variations - Pass all valid char codes *** +000102030405060708090a0b0c0d0e0f +101112131415161718191a1b1c1d1e1f +202122232425262728292a2b2c2d2e2f +303132333435363738393a3b3c3d3e3f +404142434445464748494a4b4c4d4e4f +505152535455565758595a5b5c5d5e5f +606162636465666768696a6b6c6d6e6f +707172737475767778797a7b7c7d7e7f +808182838485868788898a8b8c8d8e8f +909192939495969798999a9b9c9d9e9f +a0a1a2a3a4a5a6a7a8a9aaabacadaeaf +b0b1b2b3b4b5b6b7b8b9babbbcbdbebf +c0c1c2c3c4c5c6c7c8c9cacbcccdcecf +d0d1d2d3d4d5d6d7d8d9dadbdcdddedf +e0e1e2e3e4e5e6e7e8e9eaebecedeeef +f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/strval_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/strings/strval_variation1.phpt:1.2 --- /dev/null Mon Jan 19 15:54:45 2009 +++ php-src/ext/standard/tests/strings/strval_variation1.phpt Mon Jan 19 15:54:45 2009 @@ -0,0 +1,190 @@ +--TEST-- +Test strval() function : usage variations - Pass different data types as strval +--FILE-- +?php +/* Prototype : string strval ( mixed $var ) + * Description: Get the string value of a variable. + * Source code: ext/standard/string.c + */ + +echo *** Testing strval() : usage variations ***\n; + +error_reporting(E_ALL ^ E_NOTICE); + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + +//getting the resource +$file_handle = fopen(__FILE__, r); + +class MyClass +{ + function __toString() { +return MyClass; + } +} + +//array of values to iterate over +$values = array( + //Decimal values +/*1*/0, + 1, + 12345, + -12345, + + //Octal values +/*5*/02, + 010, + 030071, +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings strval_basic.phpt strval_error.phpt strval_variation1.phpt strval_variation2.phpt
wharmby Mon Jan 19 15:54:47 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings strval_basic.phpt strval_variation2.phpt strval_error.phpt strval_variation1.phpt Log: New strval() tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_basic.phpt +++ php-src/ext/standard/tests/strings/strval_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_variation2.phpt +++ php-src/ext/standard/tests/strings/strval_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_error.phpt +++ php-src/ext/standard/tests/strings/strval_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strval_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/strval_variation1.phpt +++ php-src/ext/standard/tests/strings/strval_variation1.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 vprintf_basic1.phpt vprintf_basic2.phpt vprintf_basic3.phpt vprintf_basic4.phpt vprintf_basic5.phpt vprintf_basic6.phpt vprintf_basic7.phpt
wharmby Mon Jan 19 16:03:37 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings vprintf_variation1.phpt vprintf_variation7.phpt vprintf_basic1.phpt vprintf_variation13_64bit.phpt vprintf_variation19.phpt vprintf_basic3.phpt vprintf_variation15_64bit.phpt vprintf_basic5.phpt vprintf_variation6.phpt vprintf_basic2.phpt vprintf_basic7_64bit.phpt vprintf_variation16_64bit.phpt vprintf_variation13.phpt vprintf_variation19_64bit.phpt vprintf_variation11_64bit.phpt vprintf_variation9.phpt vprintf_variation3.phpt vprintf_variation2.phpt vprintf_variation11.phpt vprintf_variation18.phpt vprintf_variation10.phpt vprintf_variation17.phpt vprintf_basic9.phpt vprintf_variation12_64bit.phpt vprintf_basic8.phpt vprintf_error.phpt vprintf_variation8.phpt vprintf_variation4.phpt vprintf_variation12.phpt vprintf_variation16.phpt vprintf_variation4_64bit.phpt vprintf_basic4.phpt vprintf_basic6.phpt vprintf_variation14_64bit.phpt vprintf_variation15.phpt vprintf_variation14.phpt vprintf_variation5.phpt vprintf_basic7.phpt Log: New vprintf() tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation1.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation7.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_basic1.phpt +++ php-src/ext/standard/tests/strings/vprintf_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation13_64bit.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation13_64bit.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation13_64bit.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation19.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation19.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation19.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_basic3.phpt +++ php-src/ext/standard/tests/strings/vprintf_basic3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation15_64bit.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation15_64bit.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation15_64bit.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_basic5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_basic5.phpt +++ php-src/ext/standard/tests/strings/vprintf_basic5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation6.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_basic2.phpt +++
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings vprintf_basic1.phpt vprintf_basic2.phpt vprintf_basic3.phpt vprintf_basic4.phpt vprintf_basic5.phpt vprintf_basic6.phpt vprintf_basic7.phpt
wharmby Mon Jan 19 16:03:44 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings vprintf_basic7_64bit.phpt vprintf_variation15.phpt vprintf_variation12_64bit.phpt vprintf_basic6.phpt vprintf_variation16.phpt vprintf_error.phpt vprintf_basic8.phpt vprintf_variation9.phpt vprintf_variation5.phpt vprintf_variation19.phpt vprintf_basic7.phpt vprintf_variation19_64bit.phpt vprintf_variation10.phpt vprintf_basic3.phpt vprintf_basic2.phpt vprintf_variation13_64bit.phpt vprintf_variation1.phpt vprintf_variation16_64bit.phpt vprintf_basic9.phpt vprintf_basic4.phpt vprintf_variation8.phpt vprintf_variation11_64bit.phpt vprintf_variation4.phpt vprintf_variation17.phpt vprintf_variation14_64bit.phpt vprintf_variation12.phpt vprintf_variation13.phpt vprintf_variation6.phpt vprintf_basic1.phpt vprintf_variation7.phpt vprintf_variation14.phpt vprintf_variation4_64bit.phpt vprintf_basic5.phpt vprintf_variation18.phpt vprintf_variation11.phpt vprintf_variation3.phpt vprintf_variation2.phpt vprintf_variation15_64bit.phpt Log: New vprintf() tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_basic7_64bit.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_basic7_64bit.phpt +++ php-src/ext/standard/tests/strings/vprintf_basic7_64bit.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation15.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation15.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation15.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation12_64bit.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation12_64bit.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation12_64bit.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_basic6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_basic6.phpt +++ php-src/ext/standard/tests/strings/vprintf_basic6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation16.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation16.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation16.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_error.phpt +++ php-src/ext/standard/tests/strings/vprintf_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_basic8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_basic8.phpt +++ php-src/ext/standard/tests/strings/vprintf_basic8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation9.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation9.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation9.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation5.phpt +++ php-src/ext/standard/tests/strings/vprintf_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/vprintf_variation19.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/vprintf_variation19.phpt +++
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings substr_replace_error.phpt unpack_error.phpt
wharmby Mon Jan 19 17:13:16 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings substr_replace_error.phpt unpack_error.phpt Log: New substr_replace() and unpack() error tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/substr_replace_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/substr_replace_error.phpt +++ php-src/ext/standard/tests/strings/substr_replace_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/unpack_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/unpack_error.phpt +++ php-src/ext/standard/tests/strings/unpack_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/strings substr_replace_error.phpt unpack_error.phpt
wharmby Mon Jan 19 17:13:17 2009 UTC Modified files: /php-src/ext/standard/tests/strings substr_replace_error.phpt unpack_error.phpt Log: New substr_replace() and unpack() error tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/substr_replace_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/substr_replace_error.phpt diff -u /dev/null php-src/ext/standard/tests/strings/substr_replace_error.phpt:1.2 --- /dev/null Mon Jan 19 17:13:17 2009 +++ php-src/ext/standard/tests/strings/substr_replace_error.phptMon Jan 19 17:13:17 2009 @@ -0,0 +1,70 @@ +--TEST-- +Test substr_replace() function : error conditions +--FILE-- +?php +/* Prototype : mixed substr_replace ( mixed $string , string $replacement , int $start [, int $length ] ) + * Description: Replace text within a portion of a string + * Source code: ext/standard/string.c +*/ + +/* + * Testing substr_replace() for error conditions +*/ + +echo *** Testing substr_replace() : error conditions ***\n; + +$s1 = Good morning; + +echo \n-- Testing substr_replace() function with less than expected no. of arguments --\n; +var_dump(substr_replace()); +var_dump(substr_replace($s1, evening)); + +echo \n-- Testing substr_replace() function with more than expected no. of arguments --\n; +var_dump(substr_replace($s1, evening, 5, 7, true)); + +echo \n-- Testing substr_replace() function with start and length different types --\n; +var_dump(substr_replace($s1, evening, array(5))); +var_dump(substr_replace($s1, evening, 5, array(8))); + +echo \n-- Testing substr_replace() function with start and length with a different number of elments --\n; +var_dump(substr_replace($s1, evening, array(5, 1), array(8))); + +echo \n-- Testing substr_replace() function with start and length as arrays but string not--\n; +var_dump(substr_replace($s1, evening, array(5), array(8))); + +? +===DONE=== +--EXPECTF-- +*** Testing substr_replace() : error conditions *** + +-- Testing substr_replace() function with less than expected no. of arguments -- + +Warning: substr_replace() expects at least 3 parameters, 0 given in %s on line %d +NULL + +Warning: substr_replace() expects at least 3 parameters, 2 given in %s on line %d +NULL + +-- Testing substr_replace() function with more than expected no. of arguments -- + +Warning: substr_replace() expects at most 4 parameters, 5 given in %s on line %d +NULL + +-- Testing substr_replace() function with start and length different types -- + +Warning: substr_replace(): 'from' and 'len' should be of same type - numerical or array in %s on line %d +unicode(12) Good morning + +Warning: substr_replace(): 'from' and 'len' should be of same type - numerical or array in %s on line %d +unicode(12) Good morning + +-- Testing substr_replace() function with start and length with a different number of elments -- + +Warning: substr_replace(): 'from' and 'len' should have the same number of elements in %s on line %d +unicode(12) Good morning + +-- Testing substr_replace() function with start and length as arrays but string not-- + +Warning: substr_replace(): Functionality of 'from' and 'len' as arrays is not implemented in %s on line %d +unicode(12) Good morning +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/unpack_error.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/unpack_error.phpt diff -u /dev/null php-src/ext/standard/tests/strings/unpack_error.phpt:1.2 --- /dev/null Mon Jan 19 17:13:17 2009 +++ php-src/ext/standard/tests/strings/unpack_error.phptMon Jan 19 17:13:17 2009 @@ -0,0 +1,42 @@ +--TEST-- +Test unpack() function : error conditions +--FILE-- +?php + +/* Prototype : array unpack ( string $format , string $data ) + * Description: Unpack data from binary string + * Source code: ext/standard/pack.c +*/ + +echo *** Testing unpack() : error conditions ***\n; + +echo \n-- Testing unpack() function with no arguments --\n; +var_dump( unpack() ); + +echo \n-- Testing unpack() function with more than expected no. of arguments --\n; +$extra_arg = 10; +var_dump(unpack(I, pack(I, 65534), $extra_arg)); + +echo \n-- Testing unpack() function with invalid format character --\n; +$extra_arg = 10; +var_dump(unpack(Z, pack(I, 65534))); +? +===DONE=== +--EXPECTF-- +*** Testing unpack() : error conditions *** + +-- Testing unpack() function with no arguments -- + +Warning: unpack() expects exactly 2 parameters, 0 given in %s on line %d +NULL + +-- Testing unpack() function with more than expected no. of arguments -- + +Warning: unpack() expects exactly 2 parameters, 3 given in %s on line %d +NULL + +-- Testing unpack() function with invalid format character -- + +Warning: unpack(): Invalid format type Z in %s on line %d +bool(false) +===DONE=== -- PHP CVS Mailing List
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings substr_replace_error.phpt unpack_error.phpt
wharmby Mon Jan 19 17:13:18 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings unpack_error.phpt substr_replace_error.phpt Log: New substr_replace() and unpack() error tests. Tested on Windows, Linux and Linux 64 bit. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/unpack_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/unpack_error.phpt +++ php-src/ext/standard/tests/strings/unpack_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/substr_replace_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/substr_replace_error.phpt +++ php-src/ext/standard/tests/strings/substr_replace_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/strings explode_error.phpt explode_variation1.phpt explode_variation2.phpt explode_variation3.phpt explode_variation4.phpt explode_variation5.phpt explode_va
wharmby Sun Jan 18 14:34:15 2009 UTC Added files: /php-src/ext/standard/tests/strings explode_variation4.phpt explode_variation6.phpt explode_variation1.phpt explode_variation5.phpt explode_variation2.phpt explode_variation3.phpt explode_error.phpt Log: New explode() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/explode_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/explode_variation4.phpt +++ php-src/ext/standard/tests/strings/explode_variation4.phpt --TEST-- Test explode() function : usage variations - match longer string --FILE-- ?php /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) * Description: Split a string by string. * Source code: ext/standard/string.c */ echo *** Testing explode() function: match longer string ***\n; $pizza = piece1 piece2 piece3 piece4 piece5 piece6 p; $pieces = explode( p, $pizza); var_dump($pieces); ? ===DONE=== --EXPECT-- *** Testing explode() function: match longer string *** array(7) { [0]= unicode(6) piece1 [1]= unicode(5) iece2 [2]= unicode(5) iece3 [3]= unicode(5) iece4 [4]= unicode(5) iece5 [5]= unicode(5) iece6 [6]= unicode(0) } ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/explode_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/explode_variation6.phpt +++ php-src/ext/standard/tests/strings/explode_variation6.phpt --TEST-- Test explode() function : usage variations - misc tests --FILE-- ?php /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) * Description: Split a string by string. * Source code: ext/standard/string.c */ echo *** Testing explode() function: misc tests ***\n; $str = bone\x00two\x00three\x00four; echo \n-- positive limit with null separator --\n; $e = test_explode(b\x00, $str, 2); echo \n-- negative limit (since PHP 5.1) with null separator --\n; $e = test_explode(b\x00, $str, -2); echo \n-- unknown string --\n; $e = test_explode(bfred, $str,1); echo \n-- limit = 0 --\n; $e = test_explode(b\x00, $str, 0); echo \n-- limit = -1 --\n; $e = test_explode(b\x00, $str, -1); echo \n-- large limit = -100 --\n; $e = test_explode(b\x00, $str, 100); function test_explode($delim, $string, $limit) { $e = explode($delim, $string, $limit); foreach ( $e as $v) { var_dump(bin2hex($v)); } } ? ===DONE=== --EXPECT-- *** Testing explode() function: misc tests *** -- positive limit with null separator -- unicode(6) 6f6e65 unicode(28) 74776f00746872656500666f7572 -- negative limit (since PHP 5.1) with null separator -- unicode(6) 6f6e65 unicode(6) 74776f -- unknown string -- unicode(36) 6f6e650074776f00746872656500666f7572 -- limit = 0 -- unicode(36) 6f6e650074776f00746872656500666f7572 -- limit = -1 -- unicode(6) 6f6e65 unicode(6) 74776f unicode(10) 7468726565 -- large limit = -100 -- unicode(6) 6f6e65 unicode(6) 74776f unicode(10) 7468726565 unicode(8) 666f7572 ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/explode_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/explode_variation1.phpt +++ php-src/ext/standard/tests/strings/explode_variation1.phpt --TEST-- Test explode() function : usage variations - test values for $delimiter argument --FILE-- ?php /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) * Description: Split a string by string. * Source code: ext/standard/string.c */ echo *** Testing explode() function: with unexpected inputs for 'delimiter' argument ***\n; //get an unset variable $unset_var = 'string_val'; unset($unset_var); //defining a class class sample { public function __toString() { return sample object; } } //getting the resource $file_handle = fopen(__FILE__, r); // array with different values for $delimeter $delimeters = array ( // integer values /*1*/ 0, 1, 255, 256, 2147483647, -2147483648, // float values /*7*/ 10.5, -20.5, 10.1234567e10, // array values /*10*/array(), array(0), array(1, 2), // boolean values /*13*/true, false, TRUE, FALSE, // null values /*17*/NULL, null, //
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings explode_error.phpt explode_variation1.phpt explode_variation2.phpt explode_variation3.phpt explode_variation4.phpt explode_variation5.phpt e
wharmby Sun Jan 18 14:34:52 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings explode_variation6.phpt explode_variation1.phpt explode_variation2.phpt explode_variation4.phpt explode_variation3.phpt explode_variation5.phpt explode_error.phpt Log: New explode() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/explode_variation6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/explode_variation6.phpt +++ php-src/ext/standard/tests/strings/explode_variation6.phpt --TEST-- Test explode() function : usage variations - misc tests --FILE-- ?php /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) * Description: Split a string by string. * Source code: ext/standard/string.c */ echo *** Testing explode() function: misc tests ***\n; $str = bone\x00two\x00three\x00four; echo \n-- positive limit with null separator --\n; $e = test_explode(b\x00, $str, 2); echo \n-- negative limit (since PHP 5.1) with null separator --\n; $e = test_explode(b\x00, $str, -2); echo \n-- unknown string --\n; $e = test_explode(bfred, $str,1); echo \n-- limit = 0 --\n; $e = test_explode(b\x00, $str, 0); echo \n-- limit = -1 --\n; $e = test_explode(b\x00, $str, -1); echo \n-- large limit = -100 --\n; $e = test_explode(b\x00, $str, 100); function test_explode($delim, $string, $limit) { $e = explode($delim, $string, $limit); foreach ( $e as $v) { var_dump(bin2hex($v)); } } ? ===DONE=== --EXPECT-- *** Testing explode() function: misc tests *** -- positive limit with null separator -- unicode(6) 6f6e65 unicode(28) 74776f00746872656500666f7572 -- negative limit (since PHP 5.1) with null separator -- unicode(6) 6f6e65 unicode(6) 74776f -- unknown string -- unicode(36) 6f6e650074776f00746872656500666f7572 -- limit = 0 -- unicode(36) 6f6e650074776f00746872656500666f7572 -- limit = -1 -- unicode(6) 6f6e65 unicode(6) 74776f unicode(10) 7468726565 -- large limit = -100 -- unicode(6) 6f6e65 unicode(6) 74776f unicode(10) 7468726565 unicode(8) 666f7572 ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/explode_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/explode_variation1.phpt +++ php-src/ext/standard/tests/strings/explode_variation1.phpt --TEST-- Test explode() function : usage variations - test values for $delimiter argument --FILE-- ?php /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) * Description: Split a string by string. * Source code: ext/standard/string.c */ echo *** Testing explode() function: with unexpected inputs for 'delimiter' argument ***\n; //get an unset variable $unset_var = 'string_val'; unset($unset_var); //defining a class class sample { public function __toString() { return sample object; } } //getting the resource $file_handle = fopen(__FILE__, r); // array with different values for $delimeter $delimeters = array ( // integer values /*1*/ 0, 1, 255, 256, 2147483647, -2147483648, // float values /*7*/ 10.5, -20.5, 10.1234567e10, // array values /*10*/array(), array(0), array(1, 2), // boolean values /*13*/true, false, TRUE, FALSE, // null values /*17*/NULL, null, // objects /*19*/new sample(), // resource /*20*/$file_handle, // undefined variable /*21*/@$undefined_var, // unset variable /*22*/@$unset_var ); // loop through with each element of the $delimeters array to test explode() function $count = 1; $string = piece1 piece2 piece3 piece4 piece5 piece6; $limit = 5; foreach($delimeters as $delimeter) { echo -- Iteration $count --\n; var_dump( explode($delimeter, $string, $limit) ); $count ++; } fclose($file_handle); //closing the file handle ? ===DONE=== --EXPECTF-- *** Testing explode() function: with unexpected inputs for 'delimiter' argument *** -- Iteration 1 -- array(1) { [0]= unicode(41) piece1 piece2 piece3 piece4 piece5 piece6 } -- Iteration 2 -- array(2) { [0]= unicode(5) piece [1]= unicode(35) piece2 piece3 piece4 piece5 piece6 } --
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings explode_error.phpt explode_variation1.phpt explode_variation2.phpt explode_variation3.phpt explode_variation4.phpt explode_variation5.phpt e
wharmby Sun Jan 18 14:35:00 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings explode_variation2.phpt explode_variation4.phpt explode_variation3.phpt explode_variation5.phpt explode_error.phpt explode_variation1.phpt explode_variation6.phpt Log: New explode() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/explode_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/explode_variation2.phpt +++ php-src/ext/standard/tests/strings/explode_variation2.phpt --TEST-- Test explode() function : usage variations - test values for $string argument --FILE-- ?php /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) * Description: Split a string by string. * Source code: ext/standard/string.c */ echo *** Testing explode() function: with unexpected inputs for 'string' argument ***\n; //get an unset variable $unset_var = 'string_val'; unset($unset_var); //defining a class class sample { public function __toString() { return sample object; } } //getting the resource $file_handle = fopen(__FILE__, r); // array with different values for $string $strings = array ( // integer values /*1*/ 0, 1, 255, 256, 2147483647, -2147483648, // float values /*7*/ 10.5, -20.5, 10.1234567e5, // array values /*10*/array(), array(0), array(1, 2), // boolean values /*13*/true, false, TRUE, FALSE, // null values /*17*/NULL, null, // objects /*19*/new sample(), // resource /*20*/$file_handle, // undefined variable /*21*/@$undefined_var, // unset variable /*22*/@$unset_var ); // loop through with each element of the $strings array to test explode() function $count = 1; $delimeter = ; $limit = 5; foreach($strings as $string) { echo -- Iteration $count --\n; var_dump( explode($delimeter, $string, $limit) ); $count ++; } fclose($file_handle); //closing the file handle ? ===Done=== --EXPECTF-- *** Testing explode() function: with unexpected inputs for 'string' argument *** -- Iteration 1 -- array(1) { [0]= unicode(1) 0 } -- Iteration 2 -- array(1) { [0]= unicode(1) 1 } -- Iteration 3 -- array(1) { [0]= unicode(3) 255 } -- Iteration 4 -- array(1) { [0]= unicode(3) 256 } -- Iteration 5 -- array(1) { [0]= unicode(10) 2147483647 } -- Iteration 6 -- array(1) { [0]= unicode(11) -2147483648 } -- Iteration 7 -- array(1) { [0]= unicode(4) 10.5 } -- Iteration 8 -- array(1) { [0]= unicode(5) -20.5 } -- Iteration 9 -- array(1) { [0]= unicode(10) 1012345.67 } -- Iteration 10 -- Warning: explode() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d NULL -- Iteration 11 -- Warning: explode() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d NULL -- Iteration 12 -- Warning: explode() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d NULL -- Iteration 13 -- array(1) { [0]= unicode(1) 1 } -- Iteration 14 -- array(1) { [0]= unicode(0) } -- Iteration 15 -- array(1) { [0]= unicode(1) 1 } -- Iteration 16 -- array(1) { [0]= unicode(0) } -- Iteration 17 -- array(1) { [0]= unicode(0) } -- Iteration 18 -- array(1) { [0]= unicode(0) } -- Iteration 19 -- array(2) { [0]= unicode(6) sample [1]= unicode(6) object } -- Iteration 20 -- Warning: explode() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d NULL -- Iteration 21 -- array(1) { [0]= unicode(0) } -- Iteration 22 -- array(1) { [0]= unicode(0) } ===Done=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/explode_variation4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/explode_variation4.phpt +++ php-src/ext/standard/tests/strings/explode_variation4.phpt --TEST-- Test explode() function : usage variations - match longer string --FILE-- ?php /* Prototype : array explode ( string $delimiter , string $string [, int $limit ] ) * Description: Split a string by string. * Source code: ext/standard/string.c */ echo *** Testing explode() function: match
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings sscanf_basic1.phpt sscanf_basic2.phpt sscanf_basic3.phpt sscanf_basic4.phpt sscanf_basic5.phpt sscanf_basic6.phpt sscanf_basic7.phpt sscanf_
wharmby Sun Jan 18 14:40:22 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings sscanf_basic2.phpt sscanf_basic3.phpt sscanf_basic8.phpt sscanf_variation1.phpt sscanf_basic6.phpt sscanf_variation2.phpt sscanf_basic5.phpt sscanf_basic1.phpt sscanf_error.phpt sscanf_basic7.phpt sscanf_basic4.phpt Log: New sscanf() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic2.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic3.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic8.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_variation1.phpt +++ php-src/ext/standard/tests/strings/sscanf_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic6.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_variation2.phpt +++ php-src/ext/standard/tests/strings/sscanf_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic5.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic1.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_error.phpt +++ php-src/ext/standard/tests/strings/sscanf_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic7.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic4.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic4.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 sscanf_basic1.phpt sscanf_basic2.phpt sscanf_basic3.phpt sscanf_basic4.phpt sscanf_basic5.phpt sscanf_basic6.phpt sscanf_basic7.phpt sscanf_basic8.ph
wharmby Sun Jan 18 14:40:25 2009 UTC Modified files: /php-src/ext/standard/tests/strings sscanf_basic4.phpt sscanf_variation2.phpt sscanf_basic6.phpt sscanf_basic8.phpt sscanf_error.phpt sscanf_basic2.phpt sscanf_basic5.phpt sscanf_variation1.phpt sscanf_basic7.phpt sscanf_basic3.phpt sscanf_basic1.phpt Log: New sscanf() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic4.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/sscanf_basic4.phpt diff -u /dev/null php-src/ext/standard/tests/strings/sscanf_basic4.phpt:1.2 --- /dev/null Sun Jan 18 14:40:25 2009 +++ php-src/ext/standard/tests/strings/sscanf_basic4.phpt Sun Jan 18 14:40:25 2009 @@ -0,0 +1,43 @@ +--TEST-- +Test sscanf() function : basic functionality - char format +--FILE-- +?php + +/* Prototype : mixed sscanf ( string $str , string $format [, mixed $... ] ) + * Description: Parses input from a string according to a format + * Source code: ext/standard/string.c +*/ + +echo *** Testing sscanf() : basic functionality - using char format ***\n; + +$str = X = A + B - C; +$format = %c = %c + %c - %c; + +echo \n-- Try sccanf() WITHOUT optional args --\n; +// extract details using short format +list($arg1, $arg2, $arg3, $arg4) = sscanf($str, $format); +var_dump($arg1, $arg2, $arg3, $arg4); + +echo \n-- Try sccanf() WITH optional args --\n; +// extract details using long format +$res = sscanf($str, $format, $arg1, $arg2, $arg3, $arg4); +var_dump($res, $arg1, $arg2, $arg3, $arg4); + +? +===DONE=== +--EXPECT-- +*** Testing sscanf() : basic functionality - using char format *** + +-- Try sccanf() WITHOUT optional args -- +unicode(1) X +unicode(1) A +unicode(1) B +unicode(1) C + +-- Try sccanf() WITH optional args -- +int(4) +unicode(1) X +unicode(1) A +unicode(1) B +unicode(1) C +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_variation2.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/sscanf_variation2.phpt diff -u /dev/null php-src/ext/standard/tests/strings/sscanf_variation2.phpt:1.2 --- /dev/null Sun Jan 18 14:40:25 2009 +++ php-src/ext/standard/tests/strings/sscanf_variation2.phpt Sun Jan 18 14:40:25 2009 @@ -0,0 +1,153 @@ +--TEST-- +Test sscanf() function : usage variations - unexpected inputs for '$format' argument +--FILE-- +?php +/* Prototype : mixed sscanf ( string $str , string $format [, mixed $... ] ) + * Description: Parses input from a string according to a format + * Source code: ext/standard/string.c +*/ + +echo *** Testing sscanf() function: with unexpected inputs for 'format' argument ***\n; + +//get an unset variable +$unset_var = 'string_val'; +unset($unset_var); + +//defining a class +class sample { + public function __toString() { +return sample object; + } +} + +//getting the resource +$file_handle = fopen(__FILE__, r); + +// array with different values for $input +$inputs = array ( + + // integer values +/*1*/0, + 1, + -2, + 2147483647, + -2147483648, + + // float values +/*6*/10.5, + -20.5, + 10.1234567e10, + + // array values +/*9*/array(), + array(0), + array(1, 2), + + // boolean values +/*12*/ true, + false, + TRUE, + FALSE, + + // null values +/*16*/ NULL, + null, + + // objects +/*18*/ new sample(), + + // resource +/*19*/ $file_handle, + + // undefined variable +/*20*/ @$undefined_var, + + // unset variable +/*21*/ @$unset_var +); + +//defining '$pad_length' argument +$str = Hello World; + +// loop through with each element of the $inputs array to test sscanf() function +$count = 1; +foreach($inputs as $input) { + echo -- Iteration $count --\n; + var_dump( sscanf($str, $input) ); + $count ++; +} + +fclose($file_handle); //closing the file handle + +? +===DONE=== +--EXPECTF-- +*** Testing sscanf() function: with unexpected inputs for 'format' argument *** +-- Iteration 1 -- +array(0) { +} +-- Iteration 2 -- +array(0) { +} +-- Iteration 3 -- +array(0) { +} +-- Iteration 4 -- +array(0) { +} +--
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings sscanf_basic1.phpt sscanf_basic2.phpt sscanf_basic3.phpt sscanf_basic4.phpt sscanf_basic5.phpt sscanf_basic6.phpt sscanf_basic7.phpt sscanf_
wharmby Sun Jan 18 14:40:29 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings sscanf_basic1.phpt sscanf_variation1.phpt sscanf_basic6.phpt sscanf_basic7.phpt sscanf_basic2.phpt sscanf_error.phpt sscanf_basic3.phpt sscanf_variation2.phpt sscanf_basic4.phpt sscanf_basic8.phpt sscanf_basic5.phpt Log: New sscanf() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic1.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_variation1.phpt +++ php-src/ext/standard/tests/strings/sscanf_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic6.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic6.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic6.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic7.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic7.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic7.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic2.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_error.phpt +++ php-src/ext/standard/tests/strings/sscanf_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic3.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic3.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_variation2.phpt +++ php-src/ext/standard/tests/strings/sscanf_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic4.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic4.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic8.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic8.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic8.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sscanf_basic5.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sscanf_basic5.phpt +++ php-src/ext/standard/tests/strings/sscanf_basic5.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 sha1_basic.phpt sha1_error.phpt sha1_file.phpt sha1_variation1.phpt sha1_variation2.phpt
wharmby Sun Jan 18 19:37:42 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings sha1_variation2.phpt sha1_basic.phpt sha1_variation1.phpt sha1_file.phpt sha1_error.phpt Log: New sha1f() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_variation2.phpt +++ php-src/ext/standard/tests/strings/sha1_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_basic.phpt +++ php-src/ext/standard/tests/strings/sha1_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_variation1.phpt +++ php-src/ext/standard/tests/strings/sha1_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_file.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_file.phpt +++ php-src/ext/standard/tests/strings/sha1_file.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_error.phpt +++ php-src/ext/standard/tests/strings/sha1_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/strings sha1_basic.phpt sha1_error.phpt sha1_file.phpt sha1_variation1.phpt sha1_variation2.phpt
wharmby Sun Jan 18 19:37:44 2009 UTC Modified files: /php-src/ext/standard/tests/strings sha1_variation1.phpt sha1_file.phpt sha1_error.phpt sha1_variation2.phpt sha1_basic.phpt Log: New sha1f() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_variation1.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/sha1_variation1.phpt diff -u /dev/null php-src/ext/standard/tests/strings/sha1_variation1.phpt:1.2 --- /dev/null Sun Jan 18 19:37:44 2009 +++ php-src/ext/standard/tests/strings/sha1_variation1.phpt Sun Jan 18 19:37:43 2009 @@ -0,0 +1,157 @@ +--TEST-- +Test sha1() function : usage variations - unexpected values for 'str' argument +--FILE-- +?php + +/* Prototype: string sha1 ( string $str [, bool $raw_output ] ) + * Description: Calculate the sha1 hash of a string + */ + +echo *** Testing sha1() : unexpected values for 'str' ***\n; + +$raw = false; + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + +//defining class for object variable +class MyClass +{ + public function __toString() + { +return object; + } +} + +//resource variable +$fp = fopen(__FILE__, 'r'); + +//different values for 'str' argument +$values = array( + + // int data + 0, + 1, + 12345, + -2345, + + // float data + 10.5, + -10.5, + 10.1234567e10, + 10.1234567E-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 + , + '', + + // object data + new MyClass(), + + // undefined data + @$undefined_var, + + // unset data + @$unset_var, + + //resource data + $fp +); + +// loop through each element of $values for 'str' argument +for($count = 0; $count count($values); $count++) { + echo -- Iteration .($count+1). --\n; + var_dump( sha1($values[$count], $raw) ); +} + +//closing resource +fclose($fp); + +? +===DONE=== +--EXPECTF-- +*** Testing sha1() : unexpected values for 'str' *** +-- Iteration 1 -- +unicode(40) b6589fc6ab0dc82cf12099d1c2d40ab994e8410c +-- Iteration 2 -- +unicode(40) 356a192b7913b04c54574d18c28d46e6395428ab +-- Iteration 3 -- +unicode(40) 8cb2237d0679ca88db6464eac60da96345513964 +-- Iteration 4 -- +unicode(40) bc97c643aba3b6c6abe253222f439d4002a87528 +-- Iteration 5 -- +unicode(40) 1287384bc5ef3ab84a36a5ef1d888df2763567f4 +-- Iteration 6 -- +unicode(40) c9d6e1b691f17c8ae6d458984a5f56f80e62a60b +-- Iteration 7 -- +unicode(40) 39493e1e645578a655f532e1f9bcff67991f2c2f +-- Iteration 8 -- +unicode(40) 681b45cae882ad795afd54ccc2a04ad58e056b83 +-- Iteration 9 -- +unicode(40) 1b390cd54a0c0d4f27fa7adf23e3c45536e9f37c +-- Iteration 10 -- + +Warning: sha1() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +-- Iteration 11 -- + +Warning: sha1() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +-- Iteration 12 -- + +Warning: sha1() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +-- Iteration 13 -- + +Warning: sha1() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +-- Iteration 14 -- + +Warning: sha1() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +-- Iteration 15 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 16 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 17 -- +unicode(40) 356a192b7913b04c54574d18c28d46e6395428ab +-- Iteration 18 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 19 -- +unicode(40) 356a192b7913b04c54574d18c28d46e6395428ab +-- Iteration 20 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 21 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 22 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 23 -- +unicode(40) 1615307cc4523f183e777df67f168c86908e8007 +-- Iteration 24 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 25 -- +unicode(40) da39a3ee5e6b4b0d3255bfef95601890afd80709 +-- Iteration 26 -- + +Warning: sha1() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d +NULL +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_file.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/strings/sha1_file.phpt diff -u /dev/null php-src/ext/standard/tests/strings/sha1_file.phpt:1.2 --- /dev/null Sun Jan 18 19:37:44 2009 +++ php-src/ext/standard/tests/strings/sha1_file.phpt Sun Jan 18 19:37:43 2009 @@ -0,0 +1,131 @@ +--TEST-- +Test sha1_file() function with ASCII output and raw binary
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/strings sha1_basic.phpt sha1_error.phpt sha1_file.phpt sha1_variation1.phpt sha1_variation2.phpt
wharmby Sun Jan 18 19:37:46 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings sha1_file.phpt sha1_basic.phpt sha1_error.phpt sha1_variation1.phpt sha1_variation2.phpt Log: New sha1f() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_file.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_file.phpt +++ php-src/ext/standard/tests/strings/sha1_file.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_basic.phpt +++ php-src/ext/standard/tests/strings/sha1_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_error.phpt +++ php-src/ext/standard/tests/strings/sha1_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_variation1.phpt +++ php-src/ext/standard/tests/strings/sha1_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sha1_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/sha1_variation2.phpt +++ php-src/ext/standard/tests/strings/sha1_variation2.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 hebrev_basic.phpt hebrev_error.phpt hebrev_variation1.phpt hebrev_variation2.phpt hebrevc_basic.phpt hebrevc_error.phpt hebrevc_variation1.p
wharmby Sun Jan 18 21:59:33 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/strings hebrev_variation2.phpt hebrev_error.phpt hebrevc_error.phpt hebrevc_variation1.phpt hebrevc_basic.phpt hebrevc_variation2.phpt hebrev_variation1.phpt hebrev_basic.phpt Log: New hebrev() and hebrevc() tests. Tested on Windows. Linux and Linux 64 bit http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrev_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrev_variation2.phpt +++ php-src/ext/standard/tests/strings/hebrev_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrev_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrev_error.phpt +++ php-src/ext/standard/tests/strings/hebrev_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrevc_error.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrevc_error.phpt +++ php-src/ext/standard/tests/strings/hebrevc_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrevc_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrevc_variation1.phpt +++ php-src/ext/standard/tests/strings/hebrevc_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrevc_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrevc_basic.phpt +++ php-src/ext/standard/tests/strings/hebrevc_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrevc_variation2.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrevc_variation2.phpt +++ php-src/ext/standard/tests/strings/hebrevc_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrev_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrev_variation1.phpt +++ php-src/ext/standard/tests/strings/hebrev_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/hebrev_basic.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/strings/hebrev_basic.phpt +++ php-src/ext/standard/tests/strings/hebrev_basic.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php