Skip to content

Commit

Permalink
Add test for 9a9a28c
Browse files Browse the repository at this point in the history
  • Loading branch information
titanous committed Jan 20, 2023
1 parent 9a9a28c commit 5f74668
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1346,3 +1346,16 @@ func TestInvalidUnmarshalText(t *testing.T) {
}
}
}

func TestDecodeSingleQuoteStringInterface(t *testing.T) {
buf := []byte(`{ 'key': 'value' }`)
got := make(map[string]interface{})
err := Unmarshal(buf, &got)
if err != nil {
t.Errorf("Unmarshal: %v", err)
}
want := map[string]interface{}{"key": "value"}
if !reflect.DeepEqual(got, want) {
t.Errorf("Unmarshal = %q; want %q", got, want)
}
}

0 comments on commit 5f74668

Please sign in to comment.