test for Cabal where exec depends on its lib and its fix code.

This commit is contained in:
Kazu Yamamoto
2013-02-13 15:28:29 +09:00
parent c63f04a926
commit a05e4e817d
8 changed files with 89 additions and 1 deletions

14
test/CheckSpec.hs Normal file
View File

@@ -0,0 +1,14 @@
module CheckSpec where
import Test.Hspec
import Check
import Expectation
import Types
spec :: Spec
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"
res `shouldBe` "main.hs:5:1:Warning:Top-level binding with no type signature: main :: IO ()\NUL\n"