Commit 0b0ced3f authored by Vaibhav Sagar's avatar Vaibhav Sagar

src/tests/IHaskell/Test/Parser.hs: add test for case-insensitive LANGUAGE pragmas

parent 0aa2bca6
......@@ -12,7 +12,7 @@ import Test.HUnit (assertBool, assertFailure)
import IHaskell.Test.Util (ghc, strip)
import IHaskell.Eval.Parser (parseString, getModuleName, unloc, layoutChunks, Located(..),
CodeBlock(..), DirectiveType(..), StringLoc(..))
CodeBlock(..), DirectiveType(..), StringLoc(..), PragmaType(..))
import IHaskell.Eval.ParseShell (parseShell)
#if !MIN_VERSION_base(4,8,0)
......@@ -197,6 +197,9 @@ testParseString = describe "Parser" $ do
"parse error (possibly incorrect indentation or mismatched brackets)"
]
it "parses LANGUAGE pragmas case-insensitively" $
parses "{-# LaNgUaGe OverloadedStrings #-}" `like` [Pragma PragmaLanguage ["OverloadedStrings"]]
it "breaks without data kinds" $
parses "data X = 3" `like` [dataKindsError]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment