test for Info.

This commit is contained in:
Kazu Yamamoto
2013-02-13 16:22:07 +09:00
parent e3f09cd476
commit 6752a8edcf
3 changed files with 22 additions and 0 deletions

14
test/InfoSpec.hs Normal file
View File

@@ -0,0 +1,14 @@
module InfoSpec where
import Test.Hspec
import Expectation
import Info
import Types
spec :: Spec
spec = do
describe "typeExpr" $ do
it "shows types of the expression and its outers" $ do
withDirectory "test/data/ghc-mod-check" $ do
res <- typeExpr defaultOptions "Data.Foo" 9 5 "Data/Foo.hs"
res `shouldBe` "9 5 11 40 \"Int -> a -> a -> a\"\n7 1 11 40 \"Int -> Integer\"\n"