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
de493373
Commit
de493373
authored
Dec 18, 2013
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting tests
parent
d0f6ad7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
Hspec.hs
Hspec.hs
+25
-25
No files found.
Hspec.hs
View file @
de493373
...
@@ -95,48 +95,48 @@ main = hspec $ do
...
@@ -95,48 +95,48 @@ main = hspec $ do
completionTests
=
do
completionTests
=
do
describe
"Completion"
$
do
describe
"Completion"
$
do
it
"correctly gets the completion identifier without dots"
$
do
it
"correctly gets the completion identifier without dots"
$
do
"hello!"
`
completes
`
[
"hello"
]
"hello!"
`
completes
`
[
"hello"
]
"hello aa!bb goodbye"
`
completes
`
[
"aa"
]
"hello aa!bb goodbye"
`
completes
`
[
"aa"
]
"hello aabb! goodbye"
`
completes
`
[
"aabb"
]
"hello aabb! goodbye"
`
completes
`
[
"aabb"
]
"aacc! goodbye"
`
completes
`
[
"aacc"
]
"aacc! goodbye"
`
completes
`
[
"aacc"
]
"hello !aabb goodbye"
`
completes
`
[]
"hello !aabb goodbye"
`
completes
`
[]
"!aabb goodbye"
`
completes
`
[]
"!aabb goodbye"
`
completes
`
[]
it
"correctly gets the completion identifier with dots"
$
do
it
"correctly gets the completion identifier with dots"
$
do
"hello test.aa!bb goodbye"
`
completes
`
[
"test"
,
"aa"
]
"hello test.aa!bb goodbye"
`
completes
`
[
"test"
,
"aa"
]
"Test.!"
`
completes
`
[
"Test"
,
""
]
"Test.!"
`
completes
`
[
"Test"
,
""
]
"Test.Thing!"
`
completes
`
[
"Test"
,
"Thing"
]
"Test.Thing!"
`
completes
`
[
"Test"
,
"Thing"
]
"Test.Thing.!"
`
completes
`
[
"Test"
,
"Thing"
,
""
]
"Test.Thing.!"
`
completes
`
[
"Test"
,
"Thing"
,
""
]
"Test.Thing.!nope"
`
completes
`
[
"Test"
,
"Thing"
,
""
]
"Test.Thing.!nope"
`
completes
`
[
"Test"
,
"Thing"
,
""
]
it
"correctly gets the completion type"
$
do
it
"correctly gets the completion type"
$
do
completionType
"import Data."
[
"Data"
,
""
]
`
shouldBe
`
ModuleName
"Data"
""
completionType
"import Data."
[
"Data"
,
""
]
`
shouldBe
`
ModuleName
"Data"
""
completionType
"import Prel"
[
"Prel"
]
`
shouldBe
`
ModuleName
""
"Prel"
completionType
"import Prel"
[
"Prel"
]
`
shouldBe
`
ModuleName
""
"Prel"
completionType
"import D
ata.Bloop.M"
[
"Data"
,
"Bloop"
,
"M"
]
`
shouldBe
`
ModuleName
"Data.Bloop
"
"M"
completionType
"import D
.B.M"
[
"D"
,
"B"
,
"M"
]
`
shouldBe
`
ModuleName
"D.B
"
"M"
completionType
" import A."
[
"A"
,
""
]
`
shouldBe
`
ModuleName
"A"
""
completionType
" import A."
[
"A"
,
""
]
`
shouldBe
`
ModuleName
"A"
""
completionType
"import a.x"
[
"a"
,
"x"
]
`
shouldBe
`
Identifier
"x"
completionType
"import a.x"
[
"a"
,
"x"
]
`
shouldBe
`
Identifier
"x"
completionType
"A.x"
[
"A"
,
"x"
]
`
shouldBe
`
Qualified
"A"
"x"
completionType
"A.x"
[
"A"
,
"x"
]
`
shouldBe
`
Qualified
"A"
"x"
completionType
"a.x"
[
"a"
,
"x"
]
`
shouldBe
`
Identifier
"x"
completionType
"a.x"
[
"a"
,
"x"
]
`
shouldBe
`
Identifier
"x"
completionType
"pri"
[
"pri"
]
`
shouldBe
`
Identifier
"pri"
completionType
"pri"
[
"pri"
]
`
shouldBe
`
Identifier
"pri"
it
"properly completes identifiers"
$
do
it
"properly completes identifiers"
$
do
"pri!"
`
completionHas
`
[
"print"
]
"pri!"
`
completionHas
`
[
"print"
]
"ma!"
`
completionHas
`
[
"map"
]
"ma!"
`
completionHas
`
[
"map"
]
"hello ma!"
`
completionHas
`
[
"map"
]
"hello ma!"
`
completionHas
`
[
"map"
]
"print $ catMa!"
`
completionHas
`
[
"catMaybes"
]
"print $ catMa!"
`
completionHas
`
[
"catMaybes"
]
it
"properly completes qualified identifiers"
$
do
it
"properly completes qualified identifiers"
$
do
"Control.Monad.liftM!"
`
completionHas
`
[
"Control.Monad.liftM"
"Control.Monad.liftM!"
`
completionHas
`
[
"Control.Monad.liftM"
,
"Control.Monad.liftM2"
,
"Control.Monad.liftM2"
,
"Control.Monad.liftM5"
]
,
"Control.Monad.liftM5"
]
"print $ List.intercal!"
`
completionHas
`
[
"List.intercalate"
]
"print $ List.intercal!"
`
completionHas
`
[
"List.intercalate"
]
"print $ Data.Maybe.cat!"
`
completionHas
`
[
"Data.Maybe.catMaybes"
]
"print $ Data.Maybe.cat!"
`
completionHas
`
[
"Data.Maybe.catMaybes"
]
"print $ Maybe.catM!"
`
completionHas
`
[
"Maybe.catMaybes"
]
"print $ Maybe.catM!"
`
completionHas
`
[
"Maybe.catMaybes"
]
it
"properly completes imports"
$
do
it
"properly completes imports"
$
do
"import Data.!"
`
completionHas
`
[
"Data.Maybe"
,
"Data.List"
]
"import Data.!"
`
completionHas
`
[
"Data.Maybe"
,
"Data.List"
]
"import Data.M!"
`
completionHas
`
[
"Data.Maybe"
]
"import Data.M!"
`
completionHas
`
[
"Data.Maybe"
]
"import Prel!"
`
completionHas
`
[
"Prelude"
]
"import Prel!"
`
completionHas
`
[
"Prelude"
]
evalTests
=
do
evalTests
=
do
describe
"Code Evaluation"
$
do
describe
"Code Evaluation"
$
do
...
...
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