Annotation of embedaddon/php/ext/mbstring/tests/mb_regex_encoding_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test mb_regex_encoding() function : basic functionality
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 : proto 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: * Test Basic functionality of mb_regex_encoding
17: */
18:
19: echo "*** Testing mb_regex_encoding() : basic functionality ***\n";
20:
21: var_dump(mb_regex_encoding());
22:
23: var_dump(mb_regex_encoding('UTF-8'));
24:
25: var_dump(mb_regex_encoding());
26:
27:
28: echo "Done";
29: ?>
30: --EXPECTF--
31: *** Testing mb_regex_encoding() : basic functionality ***
32: string(%d) "%s"
33: bool(true)
34: string(5) "UTF-8"
35: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>