mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Test the rows generated for single line empty unchanged indexed nodes.
This commit is contained in:
parent
89afcac011
commit
35c573e00b
@ -28,6 +28,9 @@ main = hspec $ do
|
||||
describe "annotatedToRows" $ do
|
||||
it "outputs one row for single-line unchanged leaves" $
|
||||
annotatedToRows (unchanged "a" "leaf" (Leaf "")) "a" "a" `shouldBe` ([ Row [ Span (Just "leaf") "a" ] [ Span (Just "leaf") "a" ] ], Range 0 1, Range 0 1)
|
||||
|
||||
it "outputs one row for single-line empty unchanged indexed nodes" $
|
||||
annotatedToRows (unchanged "[]" "branch" (Indexed [])) "[]" "[]" `shouldBe` ([ Row [ Ul (Just "branch") [] ] [ Ul (Just "branch") [] ] ], Range 0 2, Range 0 2)
|
||||
where
|
||||
oneLineUnchangedIndexedSource = "[ a, b, c ]"
|
||||
oneLineUnchangedIndexedRange = totalRange oneLineUnchangedIndexedSource
|
||||
|
Loading…
Reference in New Issue
Block a user