From 23d11c1cc88ee12f55a0d975ffc381066e7bf527 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 11 Dec 2015 00:12:28 -0500 Subject: [PATCH] adjoin2 is idempotent for additions of and onto empty rows. --- test/Spec.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/Spec.hs b/test/Spec.hs index a2b73f74b..fe70f0f39 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -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" ] ]