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

Remove the openLineBy tests using openElement.

This commit is contained in:
Rob Rix 2015-12-22 16:35:23 -05:00
parent bd3bee668a
commit bbbd874722

View File

@ -81,24 +81,12 @@ spec = do
splitTermByLines (Info range mempty :< Leaf source) source `shouldBe` (Line . (:[]) . (:< Leaf source) . (`Info` mempty) <$> actualLineRanges range source, range)
describe "openLineBy" $ do
it "produces the earliest non-empty line in a list, if open" $
openLineBy openElement [
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 "*/" ] ])
it "produces the earliest non-empty line in a list, if open" $
openLineBy (openTerm "\n ") [
Line [ Info (Range 1 2) mempty :< Leaf "" ],
Line [ Info (Range 0 1) mempty :< Leaf "" ]
] `shouldBe` (Just $ Line [ Info (Range 1 2) mempty :< Leaf "" ])
it "returns Nothing if the earliest non-empty line is closed" $
openLineBy openElement [
Line [ Div (Just "delete") [ span " * Debugging", Break ] ]
] `shouldBe` Nothing
it "returns Nothing if the earliest non-empty line is closed" $
openLineBy (openTerm "\n") [
Line [ Info (Range 0 1) mempty :< Leaf "" ]