also test \ is escaped

This commit is contained in:
Kovid Goyal 2022-12-13 10:21:19 +05:30
parent 0ab618c2dc
commit d235b673d1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -14,7 +14,7 @@ func TestEncodeJSON(t *testing.T) {
tests := map[string]string{
"a b\nc\td\a": `a b\nc\td\u0007`,
"•": `\u2022`,
`a"b`: `a\"b`,
`a"b\c`: `a\"b\\c`,
"\U0001f123": `\ud83c\udd23`,
}
var s escaped_string