mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 02:57:40 +08:00
15 lines
255 B
Go
15 lines
255 B
Go
package utils
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestXmlEscape(t *testing.T) {
|
|
input := "A \x00 terminated string."
|
|
expected := "A \uFFFD terminated string."
|
|
text := XmlEscape(input)
|
|
if text != expected {
|
|
t.Errorf("have %v, want %v", text, expected)
|
|
}
|
|
}
|