Files
ghc-mod/test/LintSpec.hs

13 lines
400 B
Haskell
Raw Normal View History

2013-02-12 14:31:01 +09:00
module LintSpec where
2013-05-20 11:29:44 +09:00
import Language.Haskell.GhcMod
2013-02-12 14:31:01 +09:00
import Test.Hspec
spec :: Spec
spec = do
describe "lintSyntax" $ do
2014-03-13 09:34:45 +09:00
it "check syntax with HLint" $ do
2013-02-12 14:31:01 +09:00
res <- lintSyntax defaultOptions "test/data/hlint.hs"
res `shouldBe` "test/data/hlint.hs:4:8: Error: Redundant do\NULFound:\NUL do putStrLn \"Hello, world!\"\NULWhy not:\NUL putStrLn \"Hello, world!\"\n"