encoder: added test for #287

This commit is contained in:
Thomas Pelletier
2021-04-08 10:24:38 -04:00
parent 37714006b6
commit f2378983d9
+16
View File
@@ -885,3 +885,19 @@ world'`,
})
}
}
func TestIssue287(t *testing.T) {
b := `y=[[{}]]`
v := map[string]interface{}{}
err := toml.Unmarshal([]byte(b), &v)
require.NoError(t, err)
expected := map[string]interface{}{
"y": []interface{}{
[]interface{}{
nil,
},
},
}
require.Equal(t, expected, v)
}