Don't allow two equals for the same key

This commit is contained in:
Thomas Pelletier
2013-12-10 17:28:16 +01:00
parent 5ffe2e5565
commit e8d5dbf787
2 changed files with 12 additions and 4 deletions
+8
View File
@@ -284,6 +284,14 @@ func TestFloatWithTwoDots(t *testing.T) {
})
}
func TestDoubleEqualKey(t *testing.T) {
testFlow(t, "foo= = 2", []token{
token{tokenKey, "foo"},
token{tokenEqual, "="},
token{tokenError, "cannot have multiple equals for the same key"},
})
}
func TestKeyEqualNumber(t *testing.T) {
testFlow(t, "foo = 42", []token{
token{tokenKey, "foo"},