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

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

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