ghc-mod/test/CheckSpec.hs

17 lines
515 B
Haskell
Raw Normal View History

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