Add test for newlines in arrays
This commit is contained in:
@@ -163,6 +163,13 @@ func TestUnterminatedArray(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewlinesInArrays(t *testing.T) {
|
||||
tree, err := Load("a = [1,\n2,\n3]")
|
||||
assertTree(t, tree, err, map[string]interface{}{
|
||||
"a": []int64{int64(1), int64(2), int64(3)},
|
||||
})
|
||||
}
|
||||
|
||||
func TestMissingFile(t *testing.T) {
|
||||
_, err := LoadFile("foo.toml")
|
||||
if (err.Error() != "open foo.toml: no such file or directory") {
|
||||
|
||||
Reference in New Issue
Block a user