@@ -199,7 +199,6 @@ tests = testGroup "completions" [
199
199
200
200
snippetTests :: TestTree
201
201
snippetTests = testGroup " snippets" [
202
- ignoreTestBecause " no support for snippets" $
203
202
testCase " work for argumentless constructors" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
204
203
doc <- openDoc " Completion.hs" " haskell"
205
204
_ <- waitForDiagnosticsFrom doc
@@ -211,10 +210,9 @@ snippetTests = testGroup "snippets" [
211
210
let item = head $ filter ((== " Nothing" ) . (^. label)) compls
212
211
liftIO $ do
213
212
item ^. insertTextFormat @?= Just Snippet
214
- item ^. insertText @?= Just " Nothing"
213
+ item ^. insertText @?= Just " Nothing "
215
214
216
- , ignoreTestBecause " no support for snippets" $
217
- testCase " work for polymorphic types" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
215
+ , testCase " work for polymorphic types" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
218
216
doc <- openDoc " Completion.hs" " haskell"
219
217
_ <- waitForDiagnosticsFrom doc
220
218
@@ -229,8 +227,7 @@ snippetTests = testGroup "snippets" [
229
227
item ^. insertTextFormat @?= Just Snippet
230
228
item ^. insertText @?= Just " foldl ${1:b -> a -> b} ${2:b} ${3:t a}"
231
229
232
- , ignoreTestBecause " no support for snippets" $
233
- testCase " work for complex types" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
230
+ , testCase " work for complex types" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
234
231
doc <- openDoc " Completion.hs" " haskell"
235
232
_ <- waitForDiagnosticsFrom doc
236
233
@@ -245,8 +242,7 @@ snippetTests = testGroup "snippets" [
245
242
item ^. insertTextFormat @?= Just Snippet
246
243
item ^. insertText @?= Just " mapM ${1:a -> m b} ${2:t a}"
247
244
248
- , ignoreTestBecause " no support for snippets" $
249
- testCase " work for infix functions" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
245
+ , testCase " work for infix functions" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
250
246
doc <- openDoc " Completion.hs" " haskell"
251
247
_ <- waitForDiagnosticsFrom doc
252
248
@@ -259,10 +255,9 @@ snippetTests = testGroup "snippets" [
259
255
item ^. label @?= " filter"
260
256
item ^. kind @?= Just CiFunction
261
257
item ^. insertTextFormat @?= Just Snippet
262
- item ^. insertText @?= Just " filter` "
258
+ item ^. insertText @?= Just " filter ${1:a -> Bool} ${2:[a]} "
263
259
264
- , ignoreTestBecause " no support for snippets" $
265
- testCase " work for infix functions in backticks" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
260
+ , testCase " work for infix functions in backticks" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
266
261
doc <- openDoc " Completion.hs" " haskell"
267
262
_ <- waitForDiagnosticsFrom doc
268
263
@@ -275,10 +270,9 @@ snippetTests = testGroup "snippets" [
275
270
item ^. label @?= " filter"
276
271
item ^. kind @?= Just CiFunction
277
272
item ^. insertTextFormat @?= Just Snippet
278
- item ^. insertText @?= Just " filter"
273
+ item ^. insertText @?= Just " filter ${1:a -> Bool} ${2:[a]} "
279
274
280
- , ignoreTestBecause " no support for snippets" $
281
- testCase " work for qualified infix functions" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
275
+ , testCase " work for qualified infix functions" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
282
276
doc <- openDoc " Completion.hs" " haskell"
283
277
_ <- waitForDiagnosticsFrom doc
284
278
@@ -291,10 +285,9 @@ snippetTests = testGroup "snippets" [
291
285
item ^. label @?= " intersperse"
292
286
item ^. kind @?= Just CiFunction
293
287
item ^. insertTextFormat @?= Just Snippet
294
- item ^. insertText @?= Just " intersperse` "
288
+ item ^. insertText @?= Just " intersperse ${1:a} ${2:[a]} "
295
289
296
- , ignoreTestBecause " no support for snippets" $
297
- testCase " work for qualified infix functions in backticks" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
290
+ , testCase " work for qualified infix functions in backticks" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
298
291
doc <- openDoc " Completion.hs" " haskell"
299
292
_ <- waitForDiagnosticsFrom doc
300
293
@@ -307,7 +300,7 @@ snippetTests = testGroup "snippets" [
307
300
item ^. label @?= " intersperse"
308
301
item ^. kind @?= Just CiFunction
309
302
item ^. insertTextFormat @?= Just Snippet
310
- item ^. insertText @?= Just " intersperse"
303
+ item ^. insertText @?= Just " intersperse ${1:a} ${2:[a]} "
311
304
312
305
, testCase " respects lsp configuration" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
313
306
doc <- openDoc " Completion.hs" " haskell"
0 commit comments