diff --git a/test/VspSpec.hs b/test/VspSpec.hs index 15b1dd3b3..e977eaf4c 100644 --- a/test/VspSpec.hs +++ b/test/VspSpec.hs @@ -248,3 +248,15 @@ vspSpec = do , "baz =" , " putStrLn \"hello world\"" ] + it "indexes using utf-16 codepoints" $ do + let + orig = unlines + [ "a𐐀b" + , "a𐐀b" + ] + new = applyChange (fromString orig) + $ J.TextDocumentContentChangeEvent (mkRange 1 0 1 3) (Just 3) "𐐀𐐀" + lines (Rope.toString new) `shouldBe` + [ "a𐐀b" + , "𐐀𐐀b" + ]