From 9efc31259757fd8a0fc43b647dccfa451be4169d Mon Sep 17 00:00:00 2001 From: Igor Ranieri Date: Sun, 21 Sep 2025 10:41:30 +0200 Subject: [PATCH] Unicode with splits. Doesn't feel right. --- test/Spec.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/Spec.hs b/test/Spec.hs index dd5e325..4a32156 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -16,6 +16,7 @@ main :: IO () main = hspec $ do describe "Lexer" do describe "minimal" do + it "handles unicode" unicode it "space chars" space it "bare string" someString it "emphasis" emphatic @@ -34,6 +35,13 @@ main = hspec $ do -- Tests ------------ +unicode :: Expectation +unicode = + "ドラゴンクエストの冒険者🐉" + `shouldLexTo` [ (1, 1, Token "ドラゴンクエストの冒険者") + , (1, 13, Token "🐉") + ] + ignoreNesting :: Expectation ignoreNesting = ">/foo/"