Annotation of embedaddon/php/ext/ctype/tests/ctype_punct_variation2.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test ctype_punct() function : usage variations - different integers
                      3: --SKIPIF--
                      4: <?php require_once('skipif.inc'); ?>
                      5: --FILE--
                      6: <?php
                      7: /* Prototype  : bool ctype_punct(mixed $c)
                      8:  * Description: Checks for any printable character which is not whitespace 
                      9:  * or an alphanumeric character 
                     10:  * Source code: ext/ctype/ctype.c
                     11:  */
                     12: 
                     13: /*
                     14:  * Pass different integers to ctype_punct() to test which character codes are considered
                     15:  * valid punctuation characters
                     16:  */
                     17: 
                     18: echo "*** Testing ctype_punct() : usage variations ***\n";
                     19: 
                     20: $orig = setlocale(LC_CTYPE, "C"); 
                     21: 
                     22: for ($c = 1; $c < 256; $c++) {
                     23:        if (ctype_punct($c)) {
                     24:                echo "character code $c is punctuation\n";
                     25:        }
                     26: }
                     27: 
                     28: setlocale(LC_CTYPE, $orig); 
                     29: ?>
                     30: ===DONE===
                     31: --EXPECTF--
                     32: *** Testing ctype_punct() : usage variations ***
                     33: character code 33 is punctuation
                     34: character code 34 is punctuation
                     35: character code 35 is punctuation
                     36: character code 36 is punctuation
                     37: character code 37 is punctuation
                     38: character code 38 is punctuation
                     39: character code 39 is punctuation
                     40: character code 40 is punctuation
                     41: character code 41 is punctuation
                     42: character code 42 is punctuation
                     43: character code 43 is punctuation
                     44: character code 44 is punctuation
                     45: character code 45 is punctuation
                     46: character code 46 is punctuation
                     47: character code 47 is punctuation
                     48: character code 58 is punctuation
                     49: character code 59 is punctuation
                     50: character code 60 is punctuation
                     51: character code 61 is punctuation
                     52: character code 62 is punctuation
                     53: character code 63 is punctuation
                     54: character code 64 is punctuation
                     55: character code 91 is punctuation
                     56: character code 92 is punctuation
                     57: character code 93 is punctuation
                     58: character code 94 is punctuation
                     59: character code 95 is punctuation
                     60: character code 96 is punctuation
                     61: character code 123 is punctuation
                     62: character code 124 is punctuation
                     63: character code 125 is punctuation
                     64: character code 126 is punctuation
                     65: ===DONE===

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