Add failing test for missing warnings #507
This commit is contained in:
parent
40f0e21fdf
commit
1a53582a21
@ -71,6 +71,7 @@ Extra-Source-Files: ChangeLog
|
|||||||
test/data/pattern-synonyms/*.hs
|
test/data/pattern-synonyms/*.hs
|
||||||
test/data/quasi-quotes/*.hs
|
test/data/quasi-quotes/*.hs
|
||||||
test/data/template-haskell/*.hs
|
test/data/template-haskell/*.hs
|
||||||
|
test/data/check-missing-warnings/*.hs
|
||||||
|
|
||||||
Library
|
Library
|
||||||
Default-Language: Haskell2010
|
Default-Language: Haskell2010
|
||||||
|
@ -52,3 +52,8 @@ spec = do
|
|||||||
withDirectory_ "test/data/ghc-mod-check/lib/Data" $ do
|
withDirectory_ "test/data/ghc-mod-check/lib/Data" $ do
|
||||||
res <- runD $ checkSyntax ["Foo.hs"]
|
res <- runD $ checkSyntax ["Foo.hs"]
|
||||||
res `shouldBe` ""
|
res `shouldBe` ""
|
||||||
|
|
||||||
|
it "emits warnings generated in GHC's desugar stage" $ do
|
||||||
|
withDirectory_ "test/data/check-missing-warnings" $ do
|
||||||
|
res <- runD $ checkSyntax ["DesugarWarnings.hs"]
|
||||||
|
res `shouldBe` "test/data/check-missing-warnings/DesugarWarnings.hs:5:9:Warning: Pattern match(es) are non-exhaustiveIn a case alternative: Patterns not matched: _ : _"
|
||||||
|
5
test/data/check-missing-warnings/DesugarWarnings.hs
Normal file
5
test/data/check-missing-warnings/DesugarWarnings.hs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
module Warnings (zoo) where
|
||||||
|
|
||||||
|
zoo :: [a] -> ()
|
||||||
|
zoo x = case x of
|
||||||
|
[] -> undefined
|
Loading…
Reference in New Issue
Block a user