com php-src: add test for mb_chr and mb_ord: ext/mb string/tests/mb_chr.phpt ext/mbstring/tests/mb_ord.ph pt

From: Date: Sat, 07 Mar 2015 17:03:45 +0000
Subject: com php-src: add test for mb_chr and mb_ord: ext/mb string/tests/mb_chr.phpt ext/mbstring/tests/mb_ord.ph pt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93710@lists.php.net to get a copy of this message
Commit: 00324a379c80c5f6eb69f1c53331de92d75ca1e8 Author: Masaki Kagaya <masakielastic@gmail.com> Fri, 20 Feb 2015 18:43:21 +0900 Parents: 325faea56fcd91a18a663486de204b7c5db1ae0d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=00324a379c80c5f6eb69f1c53331de92d75ca1e8 Log: add test for mb_chr and mb_ord Changed paths: A ext/mbstring/tests/mb_chr.phpt A ext/mbstring/tests/mb_ord.phpt Diff: diff --git a/ext/mbstring/tests/mb_chr.phpt b/ext/mbstring/tests/mb_chr.phpt new file mode 100644 index 0000000..8edc8a2 --- /dev/null +++ b/ext/mbstring/tests/mb_chr.phpt @@ -0,0 +1,16 @@ +--TEST-- +mb_chr() +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FILE-- +<?php +var_dump( + "\u{20bb7}" === mb_chr(0x20bb7), + "?" === mb_chr(0xd800), + "\x8f\xa1\xef" === mb_chr(0x8fa1ef, "EUC-JP-2004") +); +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) \ No newline at end of file diff --git a/ext/mbstring/tests/mb_ord..phpt b/ext/mbstring/tests/mb_ord.phpt new file mode 100644 index 0000000..8c9a407 --- /dev/null +++ b/ext/mbstring/tests/mb_ord.phpt @@ -0,0 +1,16 @@ +--TEST-- +mb_ord() +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FILE-- +<?php +var_dump( + 0x20bb7 === mb_ord("\u{20bb7}"), + 0x3f === mb_ord("\u{d800}"), + 0x8fa1ef === mb_ord("\x8f\xa1\xef", "EUC-JP-2004") +); +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) \ No newline at end of file

« previous php.cvs (#93710) next »