This commit is contained in:
Alan Zimmerman
2014-08-23 11:01:49 +02:00
parent 5b32667060
commit 9101f306d1
3 changed files with 77 additions and 0 deletions

25
test/CaseSplitSpec.hs Normal file
View File

@@ -0,0 +1,25 @@
{-# LANGUAGE CPP #-}
module CaseSplitSpec where
import Control.Applicative ((<$>))
import Data.List (isPrefixOf)
import Language.Haskell.GhcMod
#if __GLASGOW_HASKELL__ < 706
import System.Environment.Executable (getExecutablePath)
#else
import System.Environment (getExecutablePath)
#endif
import System.Exit
import System.FilePath
import System.Process
import Test.Hspec
import TestUtils
import Dir
spec :: Spec
spec = do
describe "case split" $ do
it "does not blow up on HsWithBndrs panic" $ do
withDirectory_ "test/data/case-split" $ do
res <- runD $ splits "Vect.hs" 24 10
res `shouldBe` "9 5 11 40 \"Int -> a -> a -> a\"\n7 1 11 40 \"Int -> Integer\"\n"