Quoted string

This commit is contained in:
Tnze
2021-05-26 02:15:45 +08:00
parent 00fcdb4b14
commit 3b2f81ea1f
2 changed files with 34 additions and 10 deletions

View File

@ -8,7 +8,7 @@ import (
func TestEncoder_WriteSNBT(t *testing.T) {
var buf bytes.Buffer
e := NewEncoder(&buf)
if err := e.WriteSNBT(`{ abc: a123}`); err != nil {
if err := e.WriteSNBT(`{ "abc": "a123"}`); err != nil {
t.Fatal(err)
}
t.Log(buf.Bytes())