Fixes #6: implement \uXXXX escaping

This commit is contained in:
Thomas Pelletier
2013-07-01 21:38:00 +02:00
parent f2a1344e12
commit 71141675e5
2 changed files with 32 additions and 0 deletions
+9
View File
@@ -300,3 +300,12 @@ func TestMultiline(t *testing.T) {
token{tokenEOF, ""},
})
}
func TestKeyEqualStringUnicodeEscape(t *testing.T) {
testFlow(t, "foo = \"hello \\u2665\"", []token{
token{tokenKey, "foo"},
token{tokenEqual, "="},
token{tokenString, "hello ♥"},
token{tokenEOF, ""},
})
}