mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
Test the property that we don’t promote through empty lines onto closed lines.
This is falsified by empty row elision.
This commit is contained in:
parent
7e67a6a490
commit
963887a115
@ -131,6 +131,10 @@ spec = do
|
||||
forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $
|
||||
\ (a, b) -> adjoin2 [ a ] b `shouldBe` [ b, a ]
|
||||
|
||||
prop "does not promote elements through empty lines onto closed lines" $
|
||||
forAll ((arbitrary `suchThat` isClosed) >>= \ a -> ((,) a) <$> (arbitrary `suchThat` isClosed)) $
|
||||
\ (a, b) -> adjoin2 [ Row EmptyLine EmptyLine, a ] b `shouldBe` [ b, Row EmptyLine EmptyLine, a ]
|
||||
|
||||
it "does not promote elements through empty lines onto complete lines" $
|
||||
adjoin2 [ rightRowText "b", leftRow [ Break ] ] (leftRowText "a") `shouldBe`
|
||||
[ leftRowText "a", rightRowText "b", leftRow [ Break ] ]
|
||||
|
Loading…
Reference in New Issue
Block a user