summaryrefslogtreecommitdiff
path: root/parser_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'parser_test.go')
-rw-r--r--parser_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/parser_test.go b/parser_test.go
index 09cf7f4..bc2867e 100644
--- a/parser_test.go
+++ b/parser_test.go
@@ -203,6 +203,15 @@ func TestAutoWS(t *testing.T) {
require.Equal(t, "hello", result.Child[1].Token)
require.Equal(t, "", ps.Get())
})
+
+ t.Run("unicode whitespace", func(t *testing.T) {
+ ps := NewState(" \u202f hello")
+ ps.WS = UnicodeWhitespace
+
+ result := Exact("hello")(ps)
+ require.Equal(t, "hello", result.Token)
+ require.False(t, ps.Errored())
+ })
}
func runParser(input string, parser Parser) (Result, *State) {