mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Test equivalent precomposed/decomposed unicode is not equal
This commit is contained in:
parent
14fab0f57e
commit
b4fb04fccc
@ -160,6 +160,15 @@ main = hspec $ do
|
||||
Row (Line [ Ul (Just "category-branch") [ span "a" ] ]) (Line [ Ul (Just "category-branch") [ span "a" ] ])
|
||||
], (Range 0 7, Range 0 1))
|
||||
|
||||
describe "unicode" $
|
||||
it "equivalent precomposed and decomposed characters are not equal" $
|
||||
let (sourceA, sourceB) = ("ẗ", "ẗ")
|
||||
syntax = (Leaf . Free . offsetAnnotated 0 0 $ unchanged "ẗ" "leaf" (Leaf ""))
|
||||
in
|
||||
annotatedToRows (formatted sourceA sourceB "leaf" syntax) sourceA sourceB `shouldBe`
|
||||
([ Row (Line [ span "ẗ" ]) (Line [ span "ẗ"]) ], (Range 0 2, Range 0 1))
|
||||
|
||||
|
||||
describe "adjoin2" $ do
|
||||
prop "is idempotent for additions of empty rows" $
|
||||
\ a -> adjoin2 (adjoin2 [ a ] mempty) mempty == (adjoin2 [ a ] mempty)
|
||||
|
Loading…
Reference in New Issue
Block a user