CaseSplit panic sorted. closes https://github.com/kazu-yamamoto/ghc-mod/issues/336
This commit is contained in:
@@ -1,25 +1,20 @@
|
||||
{-# 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
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
hspec spec
|
||||
|
||||
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"
|
||||
res `shouldBe` "24 1 24 30"++
|
||||
" \"mlAppend Nil y = _mlAppend_body\NUL"++
|
||||
"mlAppend (Cons x1 x2) y = _mlAppend_body\"\n"
|
||||
|
||||
Reference in New Issue
Block a user