X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=test%2FTest.hs;h=377bb6d1f15fdedc36c3669e13263d2909322ab9;hb=ae9d99b56df5468816e476059f59537da18fab9c;hp=f73c18606bee24d24d86c70347d3bfc81c61c5dd;hpb=08610aa7c21ec8166db8fdec20a785f543f155b3;p=lsp-test.git diff --git a/test/Test.hs b/test/Test.hs index f73c186..377bb6d 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -259,6 +259,13 @@ main = hspec $ do defs <- getDefinitions doc pos liftIO $ defs `shouldBe` [Location (doc ^. uri) (mkRange 28 0 28 7)] + -- describe "getTypeDefinitions" $ + -- it "works" $ runSession "hie" fullCaps "test/data/renamePass" $ do + -- doc <- openDoc "Desktop/simple.hs" "haskell" + -- let pos = Position 20 23 -- Quit value + -- defs <- getTypeDefinitions doc pos + -- liftIO $ defs `shouldBe` [Location (doc ^. uri) (mkRange 10 5 10 12)] -- Type definition + describe "waitForDiagnosticsSource" $ it "works" $ runSession "hie" fullCaps "test/data" $ do openDoc "Error.hs" "haskell" @@ -312,6 +319,13 @@ main = hspec $ do documentContents doc >>= liftIO . print in sesh `shouldThrow` anyException + describe "satisfy" $ + it "works" $ runSession "hie" fullCaps "test/data" $ do + openDoc "Format.hs" "haskell" + let pred (NotLogMessage _) = True + pred _ = False + void $ satisfy pred + mkRange sl sc el ec = Range (Position sl sc) (Position el ec) didChangeCaps :: ClientCapabilities