cvs: php-src /ext/ctype/tests bug25745.phpt

From: Date: Fri, 03 Oct 2003 16:59:45 +0000
Subject: cvs: php-src /ext/ctype/tests bug25745.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24029@lists.php.net to get a copy of this message
moriyoshi Fri Oct 3 12:59:45 2003 EDT Added files: /php-src/ext/ctype/tests bug25745.phpt Log: Add regression test for bug #25745 Index: php-src/ext/ctype/tests/bug25745.phpt +++ php-src/ext/ctype/tests/bug25745.phpt --TEST-- Bug #25745 (ctype functions fail with non-ascii characters) --FILE-- <?php $funcs = array( "ctype_alnum", "ctype_alpha", "ctype_cntrl", "ctype_digit", "ctype_graph", "ctype_lower", "ctype_print", "ctype_punct", "ctype_space", "ctype_upper", "ctype_xdigit" ); foreach ($funcs as $ctype_func) { for ($i = 0; $i < 256; $i++) { $a = $ctype_func($i); $b = $ctype_func(chr($i)); if ($a != $b) { echo "broken... $ctype_func($i) = $a, $ctype_func(chr($i)) = $b\n"; exit; } } } echo "ok\n"; ?> --EXPECT-- ok

« previous php.cvs (#24029) next »