Testcase for case-split crash

This commit is contained in:
Nikolay Yakimov 2016-03-15 23:33:28 +03:00
parent c925e920a0
commit 8e2c6fd083
2 changed files with 9 additions and 0 deletions

View File

@ -39,3 +39,8 @@ spec = do
res `shouldBe` "38 21 38 59"++
" \"mlReverse' Nil accum = _mlReverse_body\NUL"++
" mlReverse' (Cons xs'1 xs'2) accum = _mlReverse_body\"\n"
it "doesn't crash when source doesn't make sense" $
withDirectory_ "test/data/case-split" $ do
res <- runD $ splits "Crash.hs" 4 6
res `shouldBe` []

View File

@ -0,0 +1,4 @@
module Crash where
test :: Maybe a
test x = undefined