Using Cradle.

This commit is contained in:
Kazu Yamamoto
2013-03-02 16:14:55 +09:00
parent f43af4be29
commit a393f8a971
10 changed files with 62 additions and 101 deletions

View File

@@ -1,8 +1,9 @@
module CheckSpec where
import Test.Hspec
import Check
import Cradle
import Expectation
import Test.Hspec
import Types
spec :: Spec
@@ -10,5 +11,6 @@ spec = do
describe "checkSyntax" $ do
it "can check even if an executable depends on its library" $ do
withDirectory "test/data/ghc-mod-check" $ do
res <- checkSyntax defaultOptions "main.hs"
cradle <- findCradle Nothing
res <- checkSyntax defaultOptions cradle "main.hs"
res `shouldBe` "main.hs:5:1:Warning: Top-level binding with no type signature: main :: IO ()\NUL\n"