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.3&r2=1.1.4.4&diff_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.3 Wed Jun 25 12:16:17 2008 +++ php-src/ext/standard/tests/strings/strtr_variation7.phpt Mon 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.2&r2=1.1.4.3&diff_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.2 Mon Oct 8 15:21:36 2007 +++ php-src/ext/standard/tests/strings/strtr_variation6.phpt Mon 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, + 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 'to' argument @@ -85,9 +85,8 @@ } fclose($file_handle); //closing the file handle - -echo "*** Done ***"; ?> +===DONE=== --EXPECTF-- *** Testing strtr() function: with unexpected inputs for 'from' *** -- Iteration 1 -- @@ -101,7 +100,7 @@ -- Iteration 5 -- string(6) "m1tatm" -- Iteration 6 -- -string(6) "2a2atm" +string(6) "tm0atm" -- Iteration 7 -- Notice: Array to string conversion in %s on line %d @@ -134,4 +133,4 @@ string(6) "012atm" -- Iteration 19 -- string(6) "012atm" -*** Done *** +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtr_variation5.phpt?r1=1.1.4.5&r2=1.1.4.6&diff_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.4.5 php-src/ext/standard/tests/strings/strtr_variation5.phpt:1.1.4.6 --- php-src/ext/standard/tests/strings/strtr_variation5.phpt:1.1.4.5 Wed Jun 25 12:16:17 2008 +++ php-src/ext/standard/tests/strings/strtr_variation5.phpt Mon Jan 19 15:46:40 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) "ta5aaaaaaaaa" +string(12) "tatm34567aaa" -- Iteration 7 -- Warning: strtr() expects parameter 1 to be string, array given in %s on line %d @@ -136,4 +136,4 @@ string(0) "" -- Iteration 19 -- string(0) "" -*** Done *** +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtr_variation9.phpt?r1=1.1.4.5&r2=1.1.4.6&diff_format=u Index: php-src/ext/standard/tests/strings/strtr_variation9.phpt diff -u php-src/ext/standard/tests/strings/strtr_variation9.phpt:1.1.4.5 php-src/ext/standard/tests/strings/strtr_variation9.phpt:1.1.4.6 --- php-src/ext/standard/tests/strings/strtr_variation9.phpt:1.1.4.5 Wed Jun 25 12:16:17 2008 +++ php-src/ext/standard/tests/strings/strtr_variation9.phpt Mon Jan 19 15:46:41 2009 @@ -29,44 +29,44 @@ // array with different values $values = array ( - // integer values - 0, - 1, - -2, - - // float values - 10.5, - -20.5, - 10.5e10, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // 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), + array(1, 2), + array('color' => 'red', 'item' => 'pen'), + + // boolean values +/*12*/ true, + false, + TRUE, + FALSE, + + // null vlaues +/*16*/ NULL, + null, + + // objects +/*18*/ new sample(), + + // resource +/*19*/ $file_handle, + + // undefined variable +/*20*/ @$undefined_var, + + // unset variable +/*21*/ @$unset_var ); // loop through with each element of the $values array to test strtr() function @@ -80,8 +80,8 @@ fclose($file_handle); //closing the file handle -echo "*** Done ***"; ?> +===DONE=== --EXPECTF-- *** Testing strtr() function: with unexpected inputs for all arguments *** @@ -116,7 +116,7 @@ bool(false) -- Iteration 6 -- -string(12) "105000000000" +string(12) "101234567000" Warning: strtr(): The second argument is not an array in %s on line %d bool(false) @@ -222,4 +222,4 @@ Warning: strtr(): The second argument is not an array in %s on line %d bool(false) -*** Done *** +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stristr_variation2.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/stristr_variation2.phpt +++ php-src/ext/standard/tests/strings/stristr_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stristr_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/stristr_error.phpt +++ php-src/ext/standard/tests/strings/stristr_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_pad_variation2.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_pad_variation2.phpt +++ php-src/ext/standard/tests/strings/str_pad_variation2.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_pad_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_pad_variation1.phpt +++ php-src/ext/standard/tests/strings/str_pad_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_pad_variation4.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_pad_variation4.phpt +++ php-src/ext/standard/tests/strings/str_pad_variation4.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_pad_variation5.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_pad_variation5.phpt +++ php-src/ext/standard/tests/strings/str_pad_variation5.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_shuffle_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_shuffle_variation1.phpt +++ php-src/ext/standard/tests/strings/str_shuffle_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strlen_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/strlen_basic.phpt +++ php-src/ext/standard/tests/strings/strlen_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_shuffle_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_shuffle_basic.phpt +++ php-src/ext/standard/tests/strings/str_shuffle_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stristr_basic.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/stristr_basic.phpt +++ php-src/ext/standard/tests/strings/stristr_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stristr_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/stristr_variation1.phpt +++ php-src/ext/standard/tests/strings/stristr_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strlen_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/strlen_error.phpt +++ php-src/ext/standard/tests/strings/strlen_error.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strlen_variation1.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/strlen_variation1.phpt +++ php-src/ext/standard/tests/strings/strlen_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_pad_variation3.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_pad_variation3.phpt +++ php-src/ext/standard/tests/strings/str_pad_variation3.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_shuffle_error.phpt?view=markup&rev=1.1 Index: php-src/ext/standard/tests/strings/str_shuffle_error.phpt +++ php-src/ext/standard/tests/strings/str_shuffle_error.phpt
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php