mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Test that multiple words → multiple ranges.
This commit is contained in:
parent
da6995ae54
commit
1bdfa51702
@ -139,6 +139,9 @@ main = hspec $ do
|
||||
it "should produce a list containing the range of the string for a single-word string" $
|
||||
rangesOfWordsFrom 0 "word" `shouldBe` [ Range 0 4 ]
|
||||
|
||||
it "should produce a list of ranges for whitespace-separated words" $
|
||||
rangesOfWordsFrom 0 "wordOne wordTwo" `shouldBe` [ Range 0 7, Range 8 15 ]
|
||||
|
||||
where
|
||||
rightRowText text = rightRow [ Text text ]
|
||||
rightRow xs = Row EmptyLine (Line xs)
|
||||
|
Loading…
Reference in New Issue
Block a user