From: Luke Lau Date: Tue, 4 Jun 2019 22:04:06 +0000 (+0100) Subject: Merge pull request #32 from fendor/tdr-test-impls X-Git-Tag: 0.5.3.0~5 X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=0033204f40889a5ed1736777ffe71d26b7a0d307;hp=-c Merge pull request #32 from fendor/tdr-test-impls Execute getTypeDefinition test --- 0033204f40889a5ed1736777ffe71d26b7a0d307 diff --combined test/Test.hs index 377bb6d,2372cbe..380c98b --- a/test/Test.hs +++ b/test/Test.hs @@@ -259,12 -259,12 +259,12 @@@ main = hspec $ d 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 "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 0 14 19)] -- Type definition describe "waitForDiagnosticsSource" $ it "works" $ runSession "hie" fullCaps "test/data" $ do @@@ -319,13 -319,6 +319,13 @@@ 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