From: Alex Dowad Date: Wed, 15 Jul 2020 19:41:50 +0000 (+0200) Subject: Additional tests for mbstring extension X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc98c1346d75f6132c61bc2df56cf974f866c7a3;p=php Additional tests for mbstring extension --- diff --git a/ext/mbstring/tests/mb_decode_numericentity.phpt b/ext/mbstring/tests/mb_decode_numericentity.phpt index 00ef793065..91b3249247 100644 --- a/ext/mbstring/tests/mb_decode_numericentity.phpt +++ b/ext/mbstring/tests/mb_decode_numericentity.phpt @@ -19,7 +19,11 @@ echo mb_decode_numericentity('�', $convmap), "\n"; echo mb_decode_numericentity('�', $convmap), "\n"; echo mb_decode_numericentity('�', $convmap), "\n"; echo mb_decode_numericentity('�', $convmap), "\n"; + echo mb_decode_numericentity('�', $convmap), "\n"; +echo mb_decode_numericentity('�', $convmap), "\n"; +echo mb_decode_numericentity('�', $convmap), "\n"; +echo mb_decode_numericentity('�', $convmap), "\n"; $convmap = []; echo mb_decode_numericentity('föo', $convmap, "UTF-8")."\n"; @@ -41,5 +45,8 @@ aŒbœcÅ dÅ¡e€fg � � � +� +� +� föo mb_decode_numericentity(): Argument #2 ($convmap) must have a multiple of 4 elements diff --git a/ext/mbstring/tests/mb_strcut.phpt b/ext/mbstring/tests/mb_strcut.phpt index 939f6d6243..40cc3ddb0d 100644 --- a/ext/mbstring/tests/mb_strcut.phpt +++ b/ext/mbstring/tests/mb_strcut.phpt @@ -6,26 +6,77 @@ mb_strcut() output_handler= --FILE-- --EXPECT-- -¤Îʸ -0123¤³¤Îʸ»úÎó¤ÏÆüËܸì¤Ç¤¹¡£EUC-JP¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡£ÆüËܸì¤ÏÌÌÅݽ­¤¤¡£ +== EUC-JP == +[a4ce cab8] +[a4b3 a4ce] +[30 31 32 33 a4b3 a4ce cab8 bbfa cef3 a4cf c6fc cbdc b8ec a4c7 a4b9 a1a3 45 55 43 2d 4a 50 a4f2 bbc8 a4c3 a4c6 a4a4 a4de a4b9 a1a3 c6fc cbdc b8ec a4cf cccc c5dd bdad a4a4 a1a3] +OK OK -OK: 0123¤³¤Îʸ +== UTF-8 == +[] +[] +[] +[e288ae] +[e288ae 20] +[e288ae 20 45] +[] +[e288ae] +[e288ae 20] +== UTF-16LE == +[] +[] +[1a04] +[1a04] +[1a04] +[1a04] +[1a04 3804] diff --git a/ext/mbstring/tests/mb_strwidth.phpt b/ext/mbstring/tests/mb_strwidth.phpt index c7e256a16e..6eb26df2f1 100644 --- a/ext/mbstring/tests/mb_strwidth.phpt +++ b/ext/mbstring/tests/mb_strwidth.phpt @@ -4,28 +4,30 @@ mb_strwidth() --FILE-- --EXPECT-- 1: 68 +2: 10 +3: 21 +4: 21 +5: 21