Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
KimHyeonwoo committed Jul 18, 2022
1 parent 70d6286 commit 61705df
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 61705df

Please sign in to comment.