mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 17:10:48 +00:00
41 lines
2.2 KiB
Diff
41 lines
2.2 KiB
Diff
diff --git a/test/HaRePluginSpec.hs b/test/HaRePluginSpec.hs
|
|
index 039c094..d0d1fa4 100644
|
|
--- a/test/HaRePluginSpec.hs
|
|
+++ b/test/HaRePluginSpec.hs
|
|
@@ -326,35 +326,6 @@ hareSpec = do
|
|
$ List [TextEdit (Range (Position 4 0) (Position 8 12))
|
|
"parseStr = char '\"' *> (many1 (noneOf \"\\\"\")) <* char '\"'"])
|
|
Nothing)
|
|
- it "finds definition across components" $ do
|
|
- let u = filePathToUri "./app/Main.hs"
|
|
- let lreq = setTypecheckedModule u
|
|
- let req = findDef u (toPos (7,8))
|
|
- r <- dispatchRequestPGoto $ lreq >> req
|
|
- r `shouldBe` IdeResponseOk [Location (filePathToUri $ cwd </> "test/testdata/gototest/src/Lib.hs")
|
|
- (Range (toPos (6,1)) (toPos (6,9)))]
|
|
- let req2 = findDef u (toPos (7,20))
|
|
- r2 <- dispatchRequestPGoto $ lreq >> req2
|
|
- r2 `shouldBe` IdeResponseOk [Location (filePathToUri $ cwd </> "test/testdata/gototest/src/Lib2.hs")
|
|
- (Range (toPos (5,1)) (toPos (5,2)))]
|
|
- it "finds definition in the same component" $ do
|
|
- let u = filePathToUri "./src/Lib2.hs"
|
|
- let lreq = setTypecheckedModule u
|
|
- let req = findDef u (toPos (6,5))
|
|
- r <- dispatchRequestPGoto $ lreq >> req
|
|
- r `shouldBe` IdeResponseOk [Location (filePathToUri $ cwd </> "test/testdata/gototest/src/Lib.hs")
|
|
- (Range (toPos (6,1)) (toPos (6,9)))]
|
|
- it "finds local definitions" $ do
|
|
- let u = filePathToUri "./src/Lib2.hs"
|
|
- let lreq = setTypecheckedModule u
|
|
- let req = findDef u (toPos (7,11))
|
|
- r <- dispatchRequestPGoto $ lreq >> req
|
|
- r `shouldBe` IdeResponseOk [Location (filePathToUri $ cwd </> "test/testdata/gototest/src/Lib2.hs")
|
|
- (Range (toPos (10,9)) (toPos (10,10)))]
|
|
- let req2 = findDef u (toPos (10,13))
|
|
- r2 <- dispatchRequestPGoto $ lreq >> req2
|
|
- r2 `shouldBe` IdeResponseOk [Location (filePathToUri $ cwd </> "test/testdata/gototest/src/Lib2.hs")
|
|
- (Range (toPos (9,9)) (toPos (9,10)))]
|
|
|
|
|
|
-- ---------------------------------
|