Fix tests, move option records to Types module

This commit is contained in:
Nikolay Yakimov
2015-12-06 00:56:19 +03:00
parent ad16b739eb
commit b2fb54a356
8 changed files with 30 additions and 23 deletions

View File

@@ -8,10 +8,10 @@ spec :: Spec
spec = do
describe "lint" $ do
it "can detect a redundant import" $ do
res <- runD $ lint "test/data/hlint/hlint.hs"
res <- runD $ lint defaultLintOpts "test/data/hlint/hlint.hs"
res `shouldBe` "test/data/hlint/hlint.hs:4:8: Error: Redundant do\NULFound:\NUL do putStrLn \"Hello, world!\"\NULWhy not:\NUL putStrLn \"Hello, world!\"\n"
context "when no suggestions are given" $ do
it "doesn't output an empty line" $ do
res <- runD $ lint "test/data/ghc-mod-check/lib/Data/Foo.hs"
res <- runD $ lint defaultLintOpts "test/data/ghc-mod-check/lib/Data/Foo.hs"
res `shouldBe` ""