X-Git-Url: https://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=test%2FTest.hs;h=7b911f4e585a92809b4f4488f3252770ea8fdb2b;hp=c4aae07303337e44dbfa89d89040edebc073b96a;hb=72257c6a7b5461c529c415b93e1c3507e1c843a7;hpb=2f0ce0270e1d164b4b7c8c45d4d0e92564086e39 diff --git a/test/Test.hs b/test/Test.hs index c4aae07..7b911f4 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -221,21 +221,13 @@ main = findServer >>= \serverExe -> hspec $ do contents <- documentContents doc liftIO $ contents `shouldSatisfy` T.isPrefixOf "foodule" - -- describe "getCompletions" $ - -- it "works" $ runSession serverExe def "test/data/renamePass" $ do - -- doc <- openDoc "Desktop/simple.hs" "haskell" - - -- -- wait for module to be loaded - -- skipMany loggingNotification - -- noDiagnostics - -- noDiagnostics + describe "getCompletions" $ + it "works" $ runSession serverExe def "test/data/renamePass" $ do + doc <- openDoc "Desktop/simple.hs" "haskell" - -- comps <- getCompletions doc (Position 5 5) - -- let item = head (filter (\x -> x ^. label == "interactWithUser") comps) - -- liftIO $ do - -- item ^. label `shouldBe` "interactWithUser" - -- item ^. kind `shouldBe` Just CiFunction - -- item ^. detail `shouldBe` Just "Items -> IO ()\nMain" + comps <- getCompletions doc (Position 5 5) + let item = head comps + liftIO $ item ^. label `shouldBe` "foo" -- describe "getReferences" $ -- it "works" $ runSession serverExe fullCaps "test/data/renamePass" $ do