1
1
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:
joshvera 2015-12-16 11:58:52 -05:00
parent 14fab0f57e
commit b4fb04fccc

View File

@ -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)