X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=test%2FTest.hs;h=c5b02e8f91842c85d07b07cd1198dcffc7ee530e;hp=f73c18606bee24d24d86c70347d3bfc81c61c5dd;hb=12f6e7e7c1d2603712de134477a470bfa72ecf4b;hpb=2fd7fcef1f09f4abf8c0ab5a65f6ad5c36968198 diff --git a/test/Test.hs b/test/Test.hs index f73c186..c5b02e8 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 15 10 19)] -- First constructor + describe "waitForDiagnosticsSource" $ it "works" $ runSession "hie" fullCaps "test/data" $ do openDoc "Error.hs" "haskell"