This commit is contained in:
KimHyeonwoo 2022-07-18 21:34:12 +09:00
parent 70d6286ba8
commit 61705df089
1 changed files with 15 additions and 0 deletions

View File

@ -3985,3 +3985,18 @@ func TestIssue372(t *testing.T) {
t.Errorf("unexpected result: %v != %v", got, expected)
}
}
type issue384 string
func (t *issue384) UnmarshalJSON(b []byte) error {
return nil
}
func TestIssue384(t *testing.T) {
in := "{\"data\":{\"text\": \"" + strings.Repeat("-", 492) + "\\\"\"}}\n"
dec := json.NewDecoder(strings.NewReader(in))
var v issue384
if err := dec.Decode(&v); err != nil {
t.Errorf("unexpected error: %v", err)
}
}