Don't allow empty intermediate tables

This commit is contained in:
Thomas Pelletier
2013-12-10 16:23:53 +01:00
parent 8081f3cc09
commit c743c90315
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -203,6 +203,13 @@ func TestDuplicateGroups(t *testing.T) {
}
}
func TestEmptyIntermediateTable(t *testing.T) {
_, err := Load("[foo..bar]")
if err.Error() != "empty intermediate table" {
t.Error("Bad error message:", err.Error())
}
}
func TestMissingFile(t *testing.T) {
_, err := LoadFile("foo.toml")
if err.Error() != "open foo.toml: no such file or directory" {