Skip to content

Commit 5f74668

Browse files
committed
Add test for 9a9a28c
1 parent 9a9a28c commit 5f74668

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

decode_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,3 +1346,16 @@ func TestInvalidUnmarshalText(t *testing.T) {
13461346
}
13471347
}
13481348
}
1349+
1350+
func TestDecodeSingleQuoteStringInterface(t *testing.T) {
1351+
buf := []byte(`{ 'key': 'value' }`)
1352+
got := make(map[string]interface{})
1353+
err := Unmarshal(buf, &got)
1354+
if err != nil {
1355+
t.Errorf("Unmarshal: %v", err)
1356+
}
1357+
want := map[string]interface{}{"key": "value"}
1358+
if !reflect.DeepEqual(got, want) {
1359+
t.Errorf("Unmarshal = %q; want %q", got, want)
1360+
}
1361+
}

0 commit comments

Comments
 (0)