X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=test%2FTest.hs;h=344bbd587c2390b460e9212b715203fccfb2dd21;hb=cc180dcaf2f72684a42b73d1cb76c31037c8c81a;hp=b87d2f617220745e0a6a996ffd869d205c5a8440;hpb=d1ecbc5e8f324895701293429976a6c2f74d82a2;p=lsp-test.git diff --git a/test/Test.hs b/test/Test.hs index b87d2f6..344bbd5 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -118,7 +118,7 @@ main = findServer >>= \serverExe -> hspec $ do selector _ = False in runSession serverExe fullCaps "test/data/renamePass" publishDiagnosticsNotification `shouldThrow` selector it "provides the correct types that were expected and received" $ - let selector (UnexpectedMessage "STextDocumentRename" (FromServerRsp STextDocumentDocumentSymbol _)) = True + let selector (UnexpectedMessage "Response for: STextDocumentRename" (FromServerRsp STextDocumentDocumentSymbol _)) = True selector _ = False sesh = do doc <- openDoc "Desktop/simple.hs" "haskell" @@ -161,8 +161,10 @@ main = findServer >>= \serverExe -> hspec $ do it "works" $ runSession serverExe fullCaps "test/data/refactor" $ do doc <- openDoc "Main.hs" "haskell" waitForDiagnostics - [InR action] <- getCodeActions doc (Range (Position 1 14) (Position 1 18)) + [InR action] <- getCodeActions doc (Range (Position 0 0) (Position 0 2)) + actions <- getCodeActions doc (Range (Position 1 14) (Position 1 18)) liftIO $ action ^. title `shouldBe` "Delete this" + liftIO $ actions `shouldSatisfy` null describe "getAllCodeActions" $ it "works" $ runSession serverExe fullCaps "test/data/refactor" $ do