support old chat format system which based on §

This commit is contained in:
Tnze
2019-06-19 01:44:21 +08:00
parent f625f06001
commit 8c0b0e89ab
2 changed files with 73 additions and 20 deletions

View File

@ -26,6 +26,9 @@ var jsons = []string{
`{"translate":"translation.test.escape","with":["str1","str2"]}`,
`{"translate":"translation.test.args","with":["str1","str2"]}`,
`{"translate":"translation.test.world"}`,
`"Tnze"`,
`"§0Tnze"`,
}
var texts = []string{
@ -37,6 +40,9 @@ var texts = []string{
"%s %str1 %%s %%str2",
"str1 str2",
"world",
"Tnze",
"\033[30mTnze",
}
var ctexts = []string{
@ -48,6 +54,9 @@ var ctexts = []string{
"%s %str1 %%s %%str2",
"str1 str2",
"world",
"Tnze",
"Tnze",
}
func TestChatMsgFormatString(t *testing.T) {