Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 742c7be

Browse files
committed
Fix tests
1 parent 203846a commit 742c7be

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/functional/CompletionSpec.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,13 @@ spec = describe "completions" $ do
257257
let te = TextEdit (Range (Position 5 7) (Position 5 24)) "even `filte"
258258
_ <- applyEdit doc te
259259

260-
compls <- getCompletions doc (Position 5 17)
260+
compls <- getCompletions doc (Position 5 18)
261261
let item = head $ filter ((== "filter") . (^. label)) compls
262262
liftIO $ do
263263
item ^. label `shouldBe` "filter"
264264
item ^. kind `shouldBe` Just CiFunction
265265
item ^. insertTextFormat `shouldBe` Just Snippet
266-
item ^. insertText `shouldBe` Just "`filter`"
266+
item ^. insertText `shouldBe` Just "filter`"
267267

268268
it "work for infix functions in backticks" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
269269
doc <- openDoc "Completion.hs" "haskell"
@@ -272,13 +272,13 @@ spec = describe "completions" $ do
272272
let te = TextEdit (Range (Position 5 7) (Position 5 24)) "even `filte`"
273273
_ <- applyEdit doc te
274274

275-
compls <- getCompletions doc (Position 5 17)
275+
compls <- getCompletions doc (Position 5 18)
276276
let item = head $ filter ((== "filter") . (^. label)) compls
277277
liftIO $ do
278278
item ^. label `shouldBe` "filter"
279279
item ^. kind `shouldBe` Just CiFunction
280280
item ^. insertTextFormat `shouldBe` Just Snippet
281-
item ^. insertText `shouldBe` Just "`filter`"
281+
item ^. insertText `shouldBe` Just "filter"
282282

283283
it "work for qualified infix functions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
284284
doc <- openDoc "Completion.hs" "haskell"
@@ -287,13 +287,13 @@ spec = describe "completions" $ do
287287
let te = TextEdit (Range (Position 5 7) (Position 5 24)) "\"\" `Data.List.interspe"
288288
_ <- applyEdit doc te
289289

290-
compls <- getCompletions doc (Position 5 34)
290+
compls <- getCompletions doc (Position 5 29)
291291
let item = head $ filter ((== "intersperse") . (^. label)) compls
292292
liftIO $ do
293293
item ^. label `shouldBe` "intersperse"
294294
item ^. kind `shouldBe` Just CiFunction
295295
item ^. insertTextFormat `shouldBe` Just Snippet
296-
item ^. insertText `shouldBe` Just "`Data.List.intersperse`"
296+
item ^. insertText `shouldBe` Just "intersperse`"
297297

298298
it "work for qualified infix functions in backticks" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
299299
doc <- openDoc "Completion.hs" "haskell"
@@ -303,13 +303,13 @@ spec = describe "completions" $ do
303303
_ <- applyEdit doc te
304304

305305

306-
compls <- getCompletions doc (Position 5 34)
306+
compls <- getCompletions doc (Position 5 29)
307307
let item = head $ filter ((== "intersperse") . (^. label)) compls
308308
liftIO $ do
309309
item ^. label `shouldBe` "intersperse"
310310
item ^. kind `shouldBe` Just CiFunction
311311
item ^. insertTextFormat `shouldBe` Just Snippet
312-
item ^. insertText `shouldBe` Just "`Data.List.intersperse`"
312+
item ^. insertText `shouldBe` Just "intersperse"
313313

314314
it "respects lsp configuration" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
315315
doc <- openDoc "Completion.hs" "haskell"

0 commit comments

Comments
 (0)