Handle dots in keys

This commit is contained in:
Thomas Pelletier
2013-12-10 21:51:40 +01:00
parent 0c4e891f3e
commit dc20c454d7
4 changed files with 33 additions and 17 deletions
+8
View File
@@ -121,6 +121,14 @@ func TestKeyWithSharpAndEqual(t *testing.T) {
token{tokenEOF, ""},
})
}
func TestKeyWithSymbolsAndEqual(t *testing.T) {
testFlow(t, "~!@#$^&*()_+-`1234567890[]\\|/?><.,;:' = 5", []token{
token{tokenKey, "~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'"},
token{tokenEqual, "="},
token{tokenInteger, "5"},
token{tokenEOF, ""},
})
}
func TestKeyEqualStringEscape(t *testing.T) {
testFlow(t, "foo = \"hello\\\"\"", []token{