Add test for newlines in arrays

This commit is contained in:
Thomas Pelletier
2013-03-26 11:52:42 +01:00
parent 329092b812
commit edc78bc0bf
+7
View File
@@ -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) { func TestMissingFile(t *testing.T) {
_, err := LoadFile("foo.toml") _, err := LoadFile("foo.toml")
if (err.Error() != "open foo.toml: no such file or directory") { if (err.Error() != "open foo.toml: no such file or directory") {