mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Test that a single word string is covered by the returned range.
This commit is contained in:
parent
fca022109c
commit
da6995ae54
@ -136,6 +136,9 @@ main = hspec $ do
|
||||
it "should produce no ranges for whitespace" $
|
||||
rangesOfWordsFrom 0 " \t\n " `shouldBe` []
|
||||
|
||||
it "should produce a list containing the range of the string for a single-word string" $
|
||||
rangesOfWordsFrom 0 "word" `shouldBe` [ Range 0 4 ]
|
||||
|
||||
where
|
||||
rightRowText text = rightRow [ Text text ]
|
||||
rightRow xs = Row EmptyLine (Line xs)
|
||||
|
Loading…
Reference in New Issue
Block a user