mirror of
https://github.com/github/semantic.git
synced 2024-11-24 17:04:47 +03:00
Remove the openLineBy tests using openElement.
This commit is contained in:
parent
bd3bee668a
commit
bbbd874722
@ -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 "" ]
|
||||
|
Loading…
Reference in New Issue
Block a user