decoder: add test for #507
This commit is contained in:
@@ -818,6 +818,13 @@ bar = 2021-04-08
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestIssue507(t *testing.T) {
|
||||||
|
data := []byte{'0', '=', '\n', '0', 'a', 'm', 'e'}
|
||||||
|
m := map[string]interface{}{}
|
||||||
|
err := toml.Unmarshal(data, &m)
|
||||||
|
require.Error(t, err)
|
||||||
|
}
|
||||||
|
|
||||||
func TestUnmarshalDecodeErrors(t *testing.T) {
|
func TestUnmarshalDecodeErrors(t *testing.T) {
|
||||||
examples := []struct {
|
examples := []struct {
|
||||||
desc string
|
desc string
|
||||||
|
|||||||
Reference in New Issue
Block a user