+FilterEmoji

This commit is contained in:
gazebo
2019-10-16 16:37:59 +08:00
parent 444b0583d0
commit ae275c8645
2 changed files with 20 additions and 4 deletions

View File

@@ -128,7 +128,7 @@ func BenchmarkFilterMb4(b *testing.B) {
}
}
func TestFilterMb4(t *testing.T) {
func TestFilterEmoji(t *testing.T) {
for _, v := range [][]string{
[]string{
`
@@ -143,11 +143,11 @@ func TestFilterMb4(t *testing.T) {
"abcd中国人",
},
[]string{
"日配冷藏❄❄",
"日配冷藏❄❄",
"a❄日配冷藏❄❄🀄A❄",
"a日配冷藏A",
},
} {
str := FilterMb4(v[0])
str := FilterEmoji(v[0])
if str != v[1] {
t.Fatalf("%s failed\nshould be:%s\nbut it's:%s", v[0], v[1], str)
}