CheckSpec.hs 449 B

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