Add some tests for nested empty arrays

This commit is contained in:
Thomas Pelletier
2013-12-10 17:46:30 +01:00
parent a34fc5f051
commit 01609e0ab7
2 changed files with 21 additions and 0 deletions
+14
View File
@@ -300,6 +300,20 @@ func TestInvalidEsquapeSequence(t *testing.T) {
})
}
func TestNestedArrays(t *testing.T) {
testFlow(t, "foo = [[[]]]", []token{
token{tokenKey, "foo"},
token{tokenEqual, "="},
token{tokenLeftBracket, "["},
token{tokenLeftBracket, "["},
token{tokenLeftBracket, "["},
token{tokenRightBracket, "]"},
token{tokenRightBracket, "]"},
token{tokenRightBracket, "]"},
token{tokenEOF, ""},
})
}
func TestKeyEqualNumber(t *testing.T) {
testFlow(t, "foo = 42", []token{
token{tokenKey, "foo"},