projects
/
lsp-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Limit diagnostics by range in getCodeActions
[lsp-test.git]
/
test
/
Test.hs
diff --git
a/test/Test.hs
b/test/Test.hs
index e5bf5ec1da48d40765b62c86369dd2e06f3fa07e..344bbd587c2390b460e9212b715203fccfb2dd21 100644
(file)
--- a/
test/Test.hs
+++ b/
test/Test.hs
@@
-161,8
+161,10
@@
main = findServer >>= \serverExe -> hspec $ do
it "works" $ runSession serverExe fullCaps "test/data/refactor" $ do
doc <- openDoc "Main.hs" "haskell"
waitForDiagnostics
it "works" $ runSession serverExe fullCaps "test/data/refactor" $ do
doc <- openDoc "Main.hs" "haskell"
waitForDiagnostics
- [InR action] <- getCodeActions doc (Range (Position 1 14) (Position 1 18))
+ [InR action] <- getCodeActions doc (Range (Position 0 0) (Position 0 2))
+ actions <- getCodeActions doc (Range (Position 1 14) (Position 1 18))
liftIO $ action ^. title `shouldBe` "Delete this"
liftIO $ action ^. title `shouldBe` "Delete this"
+ liftIO $ actions `shouldSatisfy` null
describe "getAllCodeActions" $
it "works" $ runSession serverExe fullCaps "test/data/refactor" $ do
describe "getAllCodeActions" $
it "works" $ runSession serverExe fullCaps "test/data/refactor" $ do