2013-02-12 05:31:01 +00:00
|
|
|
module LintSpec where
|
|
|
|
|
2013-05-20 02:29:44 +00:00
|
|
|
import Language.Haskell.GhcMod
|
2013-02-12 05:31:01 +00:00
|
|
|
import Test.Hspec
|
|
|
|
|
|
|
|
spec :: Spec
|
|
|
|
spec = do
|
|
|
|
describe "lintSyntax" $ do
|
2014-03-13 00:34:45 +00:00
|
|
|
it "check syntax with HLint" $ do
|
2013-02-12 05:31:01 +00: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"
|
|
|
|
|