2014-08-23 09:01:49 +00:00
|
|
|
module CaseSplitSpec where
|
|
|
|
|
|
|
|
import Language.Haskell.GhcMod
|
|
|
|
import Test.Hspec
|
|
|
|
import TestUtils
|
|
|
|
import Dir
|
|
|
|
|
2014-08-23 12:06:26 +00:00
|
|
|
main :: IO ()
|
|
|
|
main = do
|
|
|
|
hspec spec
|
|
|
|
|
2014-08-23 09:01:49 +00:00
|
|
|
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
|
2014-08-23 12:06:26 +00:00
|
|
|
res `shouldBe` "24 1 24 30"++
|
|
|
|
" \"mlAppend Nil y = _mlAppend_body\NUL"++
|
|
|
|
"mlAppend (Cons x1 x2) y = _mlAppend_body\"\n"
|