Skip to content

Commit

Permalink
Add test case for EUC-JP
Browse files Browse the repository at this point in the history
  • Loading branch information
youkidearitai committed Mar 17, 2024
1 parent 216e104 commit 8eb03ce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ext/mbstring/tests/mb_ucfirst_lcfirst.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ var_dump(bin2hex(mb_ucfirst(mb_convert_encoding("ebi", "SJIS", "UTF-8"), "
var_dump(bin2hex(mb_lcfirst(mb_convert_encoding("EBI", "SJIS", "UTF-8"), "SJIS")));
var_dump(bin2hex(mb_ucfirst(hex2bin("8471"), "SJIS"))); /* б */
var_dump(bin2hex(mb_lcfirst(hex2bin("8441"), "SJIS"))); /* Б */
var_dump(bin2hex(mb_ucfirst(hex2bin("83bf"), "SJIS"))); /* α */
var_dump(bin2hex(mb_lcfirst(hex2bin("839f"), "SJIS"))); /* Α */
echo "== EUC-JP ==\n";
var_dump(bin2hex(mb_ucfirst(hex2bin("a6d8"), "EUC-JP"))); /* Ω */
var_dump(bin2hex(mb_lcfirst(hex2bin("a6b8"), "EUC-JP"))); /* ω */
echo "== Longer strings ==\n";
var_dump(mb_ucfirst("э" . str_repeat("A", 65536)) === "Э" . str_repeat("A", 65536));
var_dump(mb_lcfirst("Э" . str_repeat("A", 65536)) === "э" . str_repeat("A", 65536));
Expand All @@ -85,6 +90,11 @@ string(12) "826482828289"
string(12) "828582618268"
string(4) "8441"
string(4) "8471"
string(4) "839f"
string(4) "83bf"
== EUC-JP ==
string(4) "a6b8"
string(4) "a6d8"
== Longer strings ==
bool(true)
bool(true)

0 comments on commit 8eb03ce

Please sign in to comment.