Annotation of embedaddon/php/ext/mbstring/tests/mb_regex_encoding_error2.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test mb_regex_encoding() function : error conditions - Pass an unknown encoding
                      3: --SKIPIF--
                      4: <?php
                      5: extension_loaded('mbstring') or die('skip');
                      6: function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
                      7: ?>
                      8: --FILE--
                      9: <?php
                     10: /* Prototype  : string mb_regex_encoding([string $encoding])
                     11:  * Description: Returns the current encoding for regex as a string. 
                     12:  * Source code: ext/mbstring/php_mbregex.c
                     13:  */
                     14: 
                     15: /*
                     16:  * Pass mb_regex_encoding an unknown type of encoding
                     17:  */
                     18: 
                     19: echo "*** Testing mb_regex_encoding() : error conditions ***\n";
                     20: 
                     21: var_dump(mb_regex_encoding('unknown'));
                     22: 
                     23: 
                     24: echo "Done";
                     25: ?>
                     26: --EXPECTF--
                     27: *** Testing mb_regex_encoding() : error conditions ***
                     28: 
                     29: Warning: mb_regex_encoding(): Unknown encoding "unknown" in %s on line %d
                     30: bool(false)
                     31: Done

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