Merge pull request #40 from pelletier/pelletier/space-in-keys

Accept spaces in keys
This commit is contained in:
Thomas Pelletier
2015-07-17 16:53:53 -07:00
3 changed files with 66 additions and 0 deletions
+9
View File
@@ -39,6 +39,15 @@ func TestValidKeyGroup(t *testing.T) {
})
}
func TestNestedQuotedUnicodeKeyGroup(t *testing.T) {
testFlow(t, `[ j . "ʞ" . l ]`, []token{
token{Position{1, 1}, tokenLeftBracket, "["},
token{Position{1, 2}, tokenKeyGroup, ` j . "ʞ" . l `},
token{Position{1, 15}, tokenRightBracket, "]"},
token{Position{1, 16}, tokenEOF, ""},
})
}
func TestUnclosedKeyGroup(t *testing.T) {
testFlow(t, "[hello world", []token{
token{Position{1, 1}, tokenLeftBracket, "["},