test for Lint.
This commit is contained in:
13
test/LintSpec.hs
Normal file
13
test/LintSpec.hs
Normal file
@@ -0,0 +1,13 @@
|
||||
module LintSpec where
|
||||
|
||||
import Test.Hspec
|
||||
import Lint
|
||||
import Types
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
describe "lintSyntax" $ do
|
||||
it "check syntax with HList" $ do
|
||||
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"
|
||||
|
||||
5
test/data/hlint.hs
Normal file
5
test/data/hlint.hs
Normal file
@@ -0,0 +1,5 @@
|
||||
module Hlist where
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
putStrLn "Hello, world!"
|
||||
Reference in New Issue
Block a user