1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Test that openLine will produce open lines.

This commit is contained in:
Rob Rix 2015-12-10 16:29:18 -05:00
parent 69307c76d1
commit 6a73248a46

View File

@ -116,6 +116,14 @@ main = hspec $ do
Line [ span "*/" ]
], Range 0 5)
describe "openLine" $ do
it "should produce the earliest open line in a list" $
openLine [
Line [ Div (Just "delete") [ span "*/" ] ],
Line [ Div (Just "delete") [ span " * Debugging", Break ] ],
Line [ Div (Just "delete") [ span "/*", Break ] ]
] `shouldBe` (Just $ Line [ Div (Just "delete") [ span "*/" ] ])
where
rightRowText text = rightRow [ Text text ]
rightRow xs = Row EmptyLine (Line xs)