- describe "getCompletions" $
- it "works" $ runSession "hie" def "test/data/renamePass" $ do
- doc <- openDoc "Desktop/simple.hs" "haskell"
-
- -- wait for module to be loaded
- skipMany loggingNotification
- noDiagnostics
- noDiagnostics
-
- 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"
-
- describe "getReferences" $
- it "works" $ runSession "hie" fullCaps "test/data/renamePass" $ do
- doc <- openDoc "Desktop/simple.hs" "haskell"
- let pos = Position 40 3 -- interactWithUser
- uri = doc ^. LSP.uri
- refs <- getReferences doc pos True
- liftIO $ refs `shouldContain` map (Location uri) [
- mkRange 41 0 41 16
- , mkRange 75 6 75 22
- , mkRange 71 6 71 22
- ]
-
- describe "getDefinitions" $
- it "works" $ runSession "hie" fullCaps "test/data/renamePass" $ do
- doc <- openDoc "Desktop/simple.hs" "haskell"
- let pos = Position 49 25 -- addItem
- 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 0 14 19)] -- Type definition
+ -- 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
+
+ -- 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"
+
+ -- describe "getReferences" $
+ -- it "works" $ runSession serverExe fullCaps "test/data/renamePass" $ do
+ -- doc <- openDoc "Desktop/simple.hs" "haskell"
+ -- let pos = Position 40 3 -- interactWithUser
+ -- uri = doc ^. LSP.uri
+ -- refs <- getReferences doc pos True
+ -- liftIO $ refs `shouldContain` map (Location uri) [
+ -- mkRange 41 0 41 16
+ -- , mkRange 75 6 75 22
+ -- , mkRange 71 6 71 22
+ -- ]
+
+ -- describe "getDefinitions" $
+ -- it "works" $ runSession serverExe fullCaps "test/data/renamePass" $ do
+ -- doc <- openDoc "Desktop/simple.hs" "haskell"
+ -- let pos = Position 49 25 -- addItem
+ -- defs <- getDefinitions doc pos
+ -- liftIO $ defs `shouldBe` [Location (doc ^. uri) (mkRange 28 0 28 7)]
+
+ -- describe "getTypeDefinitions" $
+ -- it "works" $ runSession serverExe 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