1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Test that rangesOfWordsFrom doesn’t produce words for whitespace.

This commit is contained in:
Rob Rix 2015-12-14 12:46:20 -05:00
parent bf9aa915a3
commit 8951bebfa7

View File

@ -129,6 +129,10 @@ main = hspec $ do
Line [ Div (Just "delete") [ span " * Debugging", Break ] ]
] `shouldBe` Nothing
describe "rangesOfWordsFrom" $ do
it "should produce no ranges for whitespace" $
rangesOfWordsFrom 0 " \t\n " `shouldBe` []
where
rightRowText text = rightRow [ Text text ]
rightRow xs = Row EmptyLine (Line xs)