@@ -18,7 +18,7 @@ import Test.Tasty.HUnit
18
18
19
19
tests :: TestTree
20
20
tests = testGroup " completions" [
21
- -- testCase "works" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
21
+ -- testCase "works" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
22
22
-- doc <- openDoc "Completion.hs" "haskell"
23
23
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
24
24
@@ -40,7 +40,7 @@ tests = testGroup "completions" [
40
40
-- resolved ^. insertTextFormat @?= Just Snippet
41
41
-- resolved ^. insertText @?= Just "putStrLn ${1:String}"
42
42
43
- -- , testCase "completes imports" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
43
+ -- , testCase "completes imports" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
44
44
-- doc <- openDoc "Completion.hs" "haskell"
45
45
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
46
46
@@ -54,7 +54,7 @@ tests = testGroup "completions" [
54
54
-- item ^. detail @?= Just "Data.Maybe"
55
55
-- item ^. kind @?= Just CiModule
56
56
57
- -- , testCase "completes qualified imports" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
57
+ -- , testCase "completes qualified imports" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
58
58
-- doc <- openDoc "Completion.hs" "haskell"
59
59
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
60
60
@@ -68,7 +68,7 @@ tests = testGroup "completions" [
68
68
-- item ^. detail @?= Just "Data.List"
69
69
-- item ^. kind @?= Just CiModule
70
70
71
- -- , testCase "completes language extensions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
71
+ -- , testCase "completes language extensions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
72
72
-- doc <- openDoc "Completion.hs" "haskell"
73
73
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
74
74
@@ -81,7 +81,7 @@ tests = testGroup "completions" [
81
81
-- item ^. label @?= "OverloadedStrings"
82
82
-- item ^. kind @?= Just CiKeyword
83
83
84
- -- , testCase "completes pragmas" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
84
+ -- , testCase "completes pragmas" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
85
85
-- doc <- openDoc "Completion.hs" "haskell"
86
86
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
87
87
@@ -96,7 +96,7 @@ tests = testGroup "completions" [
96
96
-- item ^. insertTextFormat @?= Just Snippet
97
97
-- item ^. insertText @?= Just "LANGUAGE ${1:extension} #-}"
98
98
99
- -- , testCase "completes pragmas no close" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
99
+ -- , testCase "completes pragmas no close" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
100
100
-- doc <- openDoc "Completion.hs" "haskell"
101
101
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
102
102
@@ -111,7 +111,7 @@ tests = testGroup "completions" [
111
111
-- item ^. insertTextFormat @?= Just Snippet
112
112
-- item ^. insertText @?= Just "LANGUAGE ${1:extension}"
113
113
114
- -- , testCase "completes options pragma" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
114
+ -- , testCase "completes options pragma" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
115
115
-- doc <- openDoc "Completion.hs" "haskell"
116
116
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
117
117
@@ -128,7 +128,7 @@ tests = testGroup "completions" [
128
128
129
129
-- -- -----------------------------------
130
130
131
- -- , testCase "completes ghc options pragma values" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
131
+ -- , testCase "completes ghc options pragma values" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
132
132
-- doc <- openDoc "Completion.hs" "haskell"
133
133
134
134
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
@@ -146,14 +146,14 @@ tests = testGroup "completions" [
146
146
147
147
-- -- -----------------------------------
148
148
149
- -- , testCase "completes with no prefix" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
149
+ -- , testCase "completes with no prefix" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
150
150
-- doc <- openDoc "Completion.hs" "haskell"
151
151
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
152
152
-- compls <- getCompletions doc (Position 5 7)
153
153
-- liftIO $ filter ((== "!!") . (^. label)) compls `shouldNotSatisfy` null
154
154
155
155
-- -- See https://github.com/haskell/haskell-ide-engine/issues/903
156
- -- , testCase "strips compiler generated stuff from completions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
156
+ -- , testCase "strips compiler generated stuff from completions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
157
157
-- doc <- openDoc "DupRecFields.hs" "haskell"
158
158
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
159
159
@@ -168,7 +168,7 @@ tests = testGroup "completions" [
168
168
-- item ^. detail @?= Just "Two -> Int\nDupRecFields"
169
169
-- item ^. insertText @?= Just "accessor ${1:Two}"
170
170
171
- -- , testCase "have implicit foralls on basic polymorphic types" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
171
+ -- , testCase "have implicit foralls on basic polymorphic types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
172
172
-- doc <- openDoc "Completion.hs" "haskell"
173
173
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
174
174
-- let te = TextEdit (Range (Position 5 7) (Position 5 9)) "id"
@@ -180,7 +180,7 @@ tests = testGroup "completions" [
180
180
-- liftIO $
181
181
-- resolved ^. detail @?= Just "a -> a\nPrelude"
182
182
183
- -- , testCase "have implicit foralls with multiple type variables" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
183
+ -- , testCase "have implicit foralls with multiple type variables" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
184
184
-- doc <- openDoc "Completion.hs" "haskell"
185
185
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
186
186
-- let te = TextEdit (Range (Position 5 7) (Position 5 24)) "flip"
@@ -198,7 +198,7 @@ tests = testGroup "completions" [
198
198
199
199
-- snippetTests :: TestTree
200
200
-- snippetTests = testGroup "snippets" [
201
- -- testCase "work for argumentless constructors" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
201
+ -- testCase "work for argumentless constructors" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
202
202
-- doc <- openDoc "Completion.hs" "haskell"
203
203
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
204
204
@@ -211,7 +211,7 @@ tests = testGroup "completions" [
211
211
-- item ^. insertTextFormat @?= Just Snippet
212
212
-- item ^. insertText @?= Just "Nothing"
213
213
214
- -- , testCase "work for polymorphic types" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
214
+ -- , testCase "work for polymorphic types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
215
215
-- doc <- openDoc "Completion.hs" "haskell"
216
216
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
217
217
@@ -228,7 +228,7 @@ tests = testGroup "completions" [
228
228
-- resolved ^. insertTextFormat @?= Just Snippet
229
229
-- resolved ^. insertText @?= Just "foldl ${1:b -> a -> b} ${2:b} ${3:t a}"
230
230
231
- -- , testCase "work for complex types" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
231
+ -- , testCase "work for complex types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
232
232
-- doc <- openDoc "Completion.hs" "haskell"
233
233
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
234
234
@@ -245,7 +245,7 @@ tests = testGroup "completions" [
245
245
-- resolved ^. insertTextFormat @?= Just Snippet
246
246
-- resolved ^. insertText @?= Just "mapM ${1:a -> m b} ${2:t a}"
247
247
248
- -- , testCase "work for infix functions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
248
+ -- , testCase "work for infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
249
249
-- doc <- openDoc "Completion.hs" "haskell"
250
250
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
251
251
@@ -260,7 +260,7 @@ tests = testGroup "completions" [
260
260
-- item ^. insertTextFormat @?= Just Snippet
261
261
-- item ^. insertText @?= Just "filter`"
262
262
263
- -- , testCase "work for infix functions in backticks" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
263
+ -- , testCase "work for infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
264
264
-- doc <- openDoc "Completion.hs" "haskell"
265
265
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
266
266
@@ -275,7 +275,7 @@ tests = testGroup "completions" [
275
275
-- item ^. insertTextFormat @?= Just Snippet
276
276
-- item ^. insertText @?= Just "filter"
277
277
278
- -- , testCase "work for qualified infix functions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
278
+ -- , testCase "work for qualified infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
279
279
-- doc <- openDoc "Completion.hs" "haskell"
280
280
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
281
281
@@ -290,7 +290,7 @@ tests = testGroup "completions" [
290
290
-- item ^. insertTextFormat @?= Just Snippet
291
291
-- item ^. insertText @?= Just "intersperse`"
292
292
293
- -- , testCase "work for qualified infix functions in backticks" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
293
+ -- , testCase "work for qualified infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
294
294
-- doc <- openDoc "Completion.hs" "haskell"
295
295
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
296
296
@@ -306,7 +306,7 @@ tests = testGroup "completions" [
306
306
-- item ^. insertText @?= Just "intersperse"
307
307
308
308
-- -- TODO : Fix compile issue in the test "Variable not in scope: object"
309
- -- , testCase "respects lsp configuration" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
309
+ -- , testCase "respects lsp configuration" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
310
310
-- doc <- openDoc "Completion.hs" "haskell"
311
311
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
312
312
@@ -317,7 +317,7 @@ tests = testGroup "completions" [
317
317
318
318
-- checkNoSnippets doc
319
319
320
- -- , testCase "respects client capabilities" $ runSession hieCommand noSnippetsCaps "test/testdata/completion" $ do
320
+ -- , testCase "respects client capabilities" $ runSession hlsCommand noSnippetsCaps "test/testdata/completion" $ do
321
321
-- doc <- openDoc "Completion.hs" "haskell"
322
322
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
323
323
@@ -359,7 +359,7 @@ tests = testGroup "completions" [
359
359
contextTests :: TestTree
360
360
contextTests = testGroup " contexts" [
361
361
ignoreTestBecause " Broken: Timed out waiting to receive a message from the server" $
362
- testCase " only provides type suggestions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
362
+ testCase " only provides type suggestions" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
363
363
doc <- openDoc " Context.hs" " haskell"
364
364
_ <- count 2 $ skipManyTill loggingNotification noDiagnostics
365
365
compls <- getCompletions doc (Position 2 17 )
@@ -368,7 +368,7 @@ contextTests = testGroup "contexts" [
368
368
compls `shouldNotContainCompl` " interact"
369
369
370
370
, ignoreTestBecause " Broken: Timed out waiting to receive a message from the server" $
371
- testCase " only provides type suggestions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
371
+ testCase " only provides type suggestions" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
372
372
doc <- openDoc " Context.hs" " haskell"
373
373
_ <- count 2 $ skipManyTill loggingNotification noDiagnostics
374
374
compls <- getCompletions doc (Position 3 9 )
@@ -377,7 +377,7 @@ contextTests = testGroup "contexts" [
377
377
compls `shouldNotContainCompl` " Applicative"
378
378
379
379
-- This currently fails if , testCase takes too long to typecheck the module
380
- -- , testCase "completes qualified type suggestions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
380
+ -- , testCase "completes qualified type suggestions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
381
381
-- doc <- openDoc "Context.hs" "haskell"
382
382
-- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
383
383
-- let te = TextEdit (Range (Position 2 17) (Position 2 17)) " -> Conc."
0 commit comments