Fix case-split test failures on GHC 7.6 and 7.8

This commit is contained in:
Nikolay Yakimov 2016-07-10 16:23:56 +03:00
parent 80409b2030
commit 0e788e295c
2 changed files with 11 additions and 1 deletions

5
stack-8.yaml Normal file
View File

@ -0,0 +1,5 @@
flags: {}
packages:
- '.'
extra-deps: []
resolver: nightly-2016-06-04

View File

@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
module CaseSplitSpec where module CaseSplitSpec where
import Language.Haskell.GhcMod import Language.Haskell.GhcMod
@ -43,4 +44,8 @@ spec = do
it "doesn't crash when source doesn't make sense" $ it "doesn't crash when source doesn't make sense" $
withDirectory_ "test/data/case-split" $ do withDirectory_ "test/data/case-split" $ do
res <- runD $ splits "Crash.hs" 4 6 res <- runD $ splits "Crash.hs" 4 6
res `shouldBe` [] #if __GLASGOW_HASKELL__ < 710
res `shouldBe` "4 1 4 19 \"test x = undefined\"\n"
#else
res `shouldBe` ""
#endif