1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

adjoin2 is idempotent for additions of and onto empty rows.

This commit is contained in:
Rob Rix 2015-12-11 00:12:28 -05:00
parent bec2f01f02
commit 23d11c1cc8

View File

@ -100,6 +100,10 @@ main = hspec $ do
], (Range 0 7, Range 0 1))
describe "adjoin2" $ do
prop "is idempotent for additions of empty rows" $
\ () -> let empty = Row EmptyLine EmptyLine in
adjoin2 (adjoin2 [ empty ] empty) empty == (adjoin2 [ empty ] empty)
it "appends appends HTML onto incomplete lines" $
adjoin2 [ rightRowText "[" ] (rightRowText "a") `shouldBe`
[ rightRow [ Text "[", Text "a" ] ]