mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
add more unit testing cases for package gstr
This commit is contained in:
@ -342,6 +342,9 @@ func Test_HideStr(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
t.Assert(gstr.HideStr("15928008611", 40, "*"), "159****8611")
|
||||
t.Assert(gstr.HideStr("john@kohg.cn", 40, "*"), "jo*n@kohg.cn")
|
||||
t.Assert(gstr.HideStr("张三", 50, "*"), "张*")
|
||||
t.Assert(gstr.HideStr("张小三", 50, "*"), "张*三")
|
||||
t.Assert(gstr.HideStr("欧阳小三", 50, "*"), "欧**三")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user