Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
0b0ced3f
Commit
0b0ced3f
authored
Apr 26, 2018
by
Vaibhav Sagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tests/IHaskell/Test/Parser.hs: add test for case-insensitive LANGUAGE pragmas
parent
0aa2bca6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Parser.hs
src/tests/IHaskell/Test/Parser.hs
+4
-1
No files found.
src/tests/IHaskell/Test/Parser.hs
View file @
0b0ced3f
...
@@ -12,7 +12,7 @@ import Test.HUnit (assertBool, assertFailure)
...
@@ -12,7 +12,7 @@ import Test.HUnit (assertBool, assertFailure)
import
IHaskell.Test.Util
(
ghc
,
strip
)
import
IHaskell.Test.Util
(
ghc
,
strip
)
import
IHaskell.Eval.Parser
(
parseString
,
getModuleName
,
unloc
,
layoutChunks
,
Located
(
..
),
import
IHaskell.Eval.Parser
(
parseString
,
getModuleName
,
unloc
,
layoutChunks
,
Located
(
..
),
CodeBlock
(
..
),
DirectiveType
(
..
),
StringLoc
(
..
))
CodeBlock
(
..
),
DirectiveType
(
..
),
StringLoc
(
..
)
,
PragmaType
(
..
)
)
import
IHaskell.Eval.ParseShell
(
parseShell
)
import
IHaskell.Eval.ParseShell
(
parseShell
)
#
if
!
MIN_VERSION_base
(
4
,
8
,
0
)
#
if
!
MIN_VERSION_base
(
4
,
8
,
0
)
...
@@ -197,6 +197,9 @@ testParseString = describe "Parser" $ do
...
@@ -197,6 +197,9 @@ testParseString = describe "Parser" $ do
"parse error (possibly incorrect indentation or mismatched brackets)"
"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"
$
it
"breaks without data kinds"
$
parses
"data X = 3"
`
like
`
[
dataKindsError
]
parses
"data X = 3"
`
like
`
[
dataKindsError
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment