refactoring for testing.

This commit is contained in:
Kazu Yamamoto
2013-03-04 18:11:09 +09:00
parent 69cc0f8ce4
commit 1047c76906
6 changed files with 47 additions and 49 deletions

View File

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