Annotation of embedaddon/php/ext/standard/tests/strings/strnatcmp_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test strnatcmp() function : error conditions
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : int strnatcmp  ( string $str1  , string $str2  )
                      6:  * Description: String comparisons using a "natural order" algorithm
                      7:  * Source code: ext/standard/string.c
                      8: */
                      9: echo "*** Testing strnatcmp() : error conditions ***\n";
                     10: 
                     11: echo "-- Testing strnatcmp() function with Zero arguments --\n";
                     12: var_dump( strnatcmp() );
                     13: 
                     14: echo "\n\n-- Testing strnatcmp() function with more than expected no. of arguments --\n";
                     15: $str1 = "abc1";
                     16: $str2 = "ABC1";
                     17: $extra_arg = 10;
                     18: var_dump( strnatcmp( $str1, $str2, $extra_arg) );
                     19: 
                     20: ?>
                     21: ===DONE===
                     22: --EXPECTF--
                     23: *** Testing strnatcmp() : error conditions ***
                     24: -- Testing strnatcmp() function with Zero arguments --
                     25: 
                     26: Warning: strnatcmp() expects exactly 2 parameters, 0 given in %s on line %d
                     27: NULL
                     28: 
                     29: 
                     30: -- Testing strnatcmp() function with more than expected no. of arguments --
                     31: 
                     32: Warning: strnatcmp() expects exactly 2 parameters, 3 given in %s on line %d
                     33: NULL
                     34: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>