Skip to content

Commit 96b4ed4

Browse files
committed
Add test case for same strings
1 parent eee99a2 commit 96b4ed4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/mbstring/tests/mb_trim.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ var_dump(bin2hex(mb_ltrim(mb_convert_encoding("\u{FEFF}漢字", "UTF-16BE", "UTF
5656
echo "== SJIS ==\n";
5757
var_dump(mb_convert_encoding(mb_trim("\x81\x40\x82\xa0\x81\x40", "\x81\x40", "SJIS"), "UTF-8", "SJIS"));
5858

59+
echo "== Same strings ==\n";
60+
var_dump(mb_trim("foo", "oo"));
61+
5962
echo "== \$encoding throws ValueError ==\n";
6063
try {
6164
var_dump(mb_trim( "\u{180F}", "", "NULL"));
@@ -107,5 +110,7 @@ string(8) "226f575b"
107110
string(8) "6f225b57"
108111
== SJIS ==
109112
string(3) "あ"
113+
== Same strings ==
114+
string(1) "f"
110115
== $encoding throws ValueError ==
111116
string(73) "mb_trim(): Argument #3 ($encoding) must be a valid encoding, "NULL" given"

0 commit comments

Comments
 (0)