Don't crash when assigning group array to array

This commit is contained in:
Thomas Pelletier
2015-12-01 13:56:31 +01:00
parent ab7a652912
commit a6c6ad1f5f
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -626,3 +626,10 @@ func TestDoubleEqual(t *testing.T) {
t.Error("Bad error message:", err.Error())
}
}
func TestGroupArrayReassign(t *testing.T) {
_, err := Load("[hello]\n[[hello]]")
if err.Error() != "(2, 3): key \"hello\" is already assigned and not of type group array" {
t.Error("Bad error message:", err.Error())
}
}