2013-02-13 06:28:29 +00:00
|
|
|
module CheckSpec where
|
|
|
|
|
|
|
|
import Check
|
2013-03-02 07:14:55 +00:00
|
|
|
import Cradle
|
2013-02-13 06:28:29 +00:00
|
|
|
import Expectation
|
2013-03-02 07:14:55 +00:00
|
|
|
import Test.Hspec
|
2013-02-13 06:28:29 +00:00
|
|
|
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
|
2013-03-02 07:14:55 +00:00
|
|
|
cradle <- findCradle Nothing
|
|
|
|
res <- checkSyntax defaultOptions cradle "main.hs"
|
2013-02-13 07:04:22 +00:00
|
|
|
res `shouldBe` "main.hs:5:1:Warning: Top-level binding with no type signature: main :: IO ()\NUL\n"
|