@@ -199,7 +199,6 @@ tests = testGroup "completions" [
199199
200200snippetTests :: TestTree
201201snippetTests = testGroup " snippets" [
202- ignoreTestBecause " no support for snippets" $
203202 testCase " work for argumentless constructors" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
204203 doc <- openDoc " Completion.hs" " haskell"
205204 _ <- waitForDiagnosticsFrom doc
@@ -211,10 +210,9 @@ snippetTests = testGroup "snippets" [
211210 let item = head $ filter ((== " Nothing" ) . (^. label)) compls
212211 liftIO $ do
213212 item ^. insertTextFormat @?= Just Snippet
214- item ^. insertText @?= Just " Nothing"
213+ item ^. insertText @?= Just " Nothing "
215214
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
218216 doc <- openDoc " Completion.hs" " haskell"
219217 _ <- waitForDiagnosticsFrom doc
220218
@@ -229,8 +227,7 @@ snippetTests = testGroup "snippets" [
229227 item ^. insertTextFormat @?= Just Snippet
230228 item ^. insertText @?= Just " foldl ${1:b -> a -> b} ${2:b} ${3:t a}"
231229
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
234231 doc <- openDoc " Completion.hs" " haskell"
235232 _ <- waitForDiagnosticsFrom doc
236233
@@ -245,8 +242,7 @@ snippetTests = testGroup "snippets" [
245242 item ^. insertTextFormat @?= Just Snippet
246243 item ^. insertText @?= Just " mapM ${1:a -> m b} ${2:t a}"
247244
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
250246 doc <- openDoc " Completion.hs" " haskell"
251247 _ <- waitForDiagnosticsFrom doc
252248
@@ -259,10 +255,9 @@ snippetTests = testGroup "snippets" [
259255 item ^. label @?= " filter"
260256 item ^. kind @?= Just CiFunction
261257 item ^. insertTextFormat @?= Just Snippet
262- item ^. insertText @?= Just " filter` "
258+ item ^. insertText @?= Just " filter ${1:a -> Bool} ${2:[a]} "
263259
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
266261 doc <- openDoc " Completion.hs" " haskell"
267262 _ <- waitForDiagnosticsFrom doc
268263
@@ -275,10 +270,9 @@ snippetTests = testGroup "snippets" [
275270 item ^. label @?= " filter"
276271 item ^. kind @?= Just CiFunction
277272 item ^. insertTextFormat @?= Just Snippet
278- item ^. insertText @?= Just " filter"
273+ item ^. insertText @?= Just " filter ${1:a -> Bool} ${2:[a]} "
279274
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
282276 doc <- openDoc " Completion.hs" " haskell"
283277 _ <- waitForDiagnosticsFrom doc
284278
@@ -291,10 +285,9 @@ snippetTests = testGroup "snippets" [
291285 item ^. label @?= " intersperse"
292286 item ^. kind @?= Just CiFunction
293287 item ^. insertTextFormat @?= Just Snippet
294- item ^. insertText @?= Just " intersperse` "
288+ item ^. insertText @?= Just " intersperse ${1:a} ${2:[a]} "
295289
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
298291 doc <- openDoc " Completion.hs" " haskell"
299292 _ <- waitForDiagnosticsFrom doc
300293
@@ -307,7 +300,7 @@ snippetTests = testGroup "snippets" [
307300 item ^. label @?= " intersperse"
308301 item ^. kind @?= Just CiFunction
309302 item ^. insertTextFormat @?= Just Snippet
310- item ^. insertText @?= Just " intersperse"
303+ item ^. insertText @?= Just " intersperse ${1:a} ${2:[a]} "
311304
312305 , testCase " respects lsp configuration" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
313306 doc <- openDoc " Completion.hs" " haskell"
0 commit comments