mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-17 20:06:07 +00:00
src/tests/IHaskell/Test/Parser.hs: add test for case-insensitive LANGUAGE pragmas
This commit is contained in:
parent
0aa2bca692
commit
0b0ced3fd4
@ -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]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user