diff --git a/test/Spec.hs b/test/Spec.hs index 22fc87af9..3f05f2db1 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -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)