Annotation of embedaddon/php/ext/ctype/tests/ctype_graph_variation4.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test ctype_graph() function : usage variations - octal and hexadecimal values
        !             3: --SKIPIF--
        !             4: <?php require_once('skipif.inc'); ?>
        !             5: --FILE--
        !             6: <?php
        !             7: /* Prototype  : bool ctype_graph(mixed $c)
        !             8:  * Description: Checks for any printable character(s) except space 
        !             9:  * Source code: ext/ctype/ctype.c 
        !            10:  */
        !            11: 
        !            12: /*
        !            13:  * Pass octal and hexadecimal values to ctype_graph() to test behaviour
        !            14:  */
        !            15: 
        !            16: echo "*** Testing ctype_graph() : usage variations ***\n";
        !            17: 
        !            18: $orig = setlocale(LC_CTYPE, "C");
        !            19: 
        !            20: $octal_values = array(061,  062,  063,  064);
        !            21: $hex_values = array  (0x31, 0x32, 0x33, 0x34);
        !            22: 
        !            23: echo "\n-- Octal Values --\n";
        !            24: $iterator = 1;
        !            25: foreach($octal_values as $c) {
        !            26:        echo "-- Iteration $iterator --\n";
        !            27:        var_dump(ctype_graph($c));
        !            28:        $iterator++;
        !            29: }
        !            30: 
        !            31: echo "\n-- Hexadecimal Values --\n";
        !            32: $iterator = 1;
        !            33: foreach($hex_values as $c) {
        !            34:        echo "-- Iteration $iterator --\n";
        !            35:        var_dump(ctype_graph($c));
        !            36:        $iterator++;
        !            37: }
        !            38: 
        !            39: setlocale(LC_CTYPE, $orig);
        !            40: ?>
        !            41: ===DONE===
        !            42: --EXPECTF--
        !            43: *** Testing ctype_graph() : usage variations ***
        !            44: 
        !            45: -- Octal Values --
        !            46: -- Iteration 1 --
        !            47: bool(true)
        !            48: -- Iteration 2 --
        !            49: bool(true)
        !            50: -- Iteration 3 --
        !            51: bool(true)
        !            52: -- Iteration 4 --
        !            53: bool(true)
        !            54: 
        !            55: -- Hexadecimal Values --
        !            56: -- Iteration 1 --
        !            57: bool(true)
        !            58: -- Iteration 2 --
        !            59: bool(true)
        !            60: -- Iteration 3 --
        !            61: bool(true)
        !            62: -- Iteration 4 --
        !            63: bool(true)
        !            64: ===DONE===

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