remove unicode
This commit is contained in:
parent
a46fe140a3
commit
98afd39913
1 changed files with 2 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ func TestSplitMessage(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Preserve Unicode characters",
|
name: "Preserve Unicode characters",
|
||||||
content: strings.Repeat("世", 1000), // 3000 bytes
|
content: strings.Repeat("\u4e16", 1000), // 3000 bytes
|
||||||
maxLen: 2000,
|
maxLen: 2000,
|
||||||
expectChunks: 2,
|
expectChunks: 2,
|
||||||
checkContent: func(t *testing.T, chunks []string) {
|
checkContent: func(t *testing.T, chunks []string) {
|
||||||
|
|
@ -87,7 +87,7 @@ func TestSplitMessage(t *testing.T) {
|
||||||
// Go strings are UTF-8, if we split mid-rune it would be bad,
|
// Go strings are UTF-8, if we split mid-rune it would be bad,
|
||||||
// but standard slicing might do that.
|
// but standard slicing might do that.
|
||||||
// Let's assume standard behavior is acceptable or check if it produces invalid rune?
|
// Let's assume standard behavior is acceptable or check if it produces invalid rune?
|
||||||
if !strings.Contains(chunks[0], "世") {
|
if !strings.Contains(chunks[0], "\u4e16") {
|
||||||
t.Error("Chunk should contain unicode characters")
|
t.Error("Chunk should contain unicode characters")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue