From: Luke Lau Date: Sun, 17 Nov 2019 14:09:17 +0000 (+0000) Subject: Update haskell-lsp and bump to 0.8.1.0 X-Git-Tag: 0.8.1.0 X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=e7bb595cd3d2d00291a976dec7810e371eb5cd9d Update haskell-lsp and bump to 0.8.1.0 Also update tests for hie-bios --- diff --git a/ChangeLog.md b/ChangeLog.md index f01ba4f..6cd51b6 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,10 @@ # Revision history for lsp-test +## 0.8.1.0 -- 2019-11-17 + +* Update to haskell-lsp-0.18.0.0 (@mpickering, @alanz) +* Tests now require hie-bios based hie + ## 0.8.0.0 -- 2019-10-18 * Make `Session` a newtype diff --git a/lsp-test.cabal b/lsp-test.cabal index 8f0a454..f306aec 100644 --- a/lsp-test.cabal +++ b/lsp-test.cabal @@ -1,5 +1,5 @@ name: lsp-test -version: 0.8.0.0 +version: 0.8.1.0 synopsis: Functional test framework for LSP servers. description: A test framework for writing tests against @@ -36,7 +36,7 @@ library , parser-combinators:Control.Applicative.Combinators default-language: Haskell2010 build-depends: base >= 4.10 && < 5 - , haskell-lsp == 0.17.* + , haskell-lsp == 0.18.* , aeson , aeson-pretty , ansi-terminal @@ -79,7 +79,7 @@ test-suite tests build-depends: base >= 4.10 && < 5 , hspec , lens - , haskell-lsp == 0.17.* + , haskell-lsp == 0.18.* , lsp-test , data-default , aeson diff --git a/test/Test.hs b/test/Test.hs index d689bff..342d889 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -238,7 +238,8 @@ main = hspec $ do noDiagnostics noDiagnostics - item:_ <- getCompletions doc (Position 5 5) + 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 @@ -273,10 +274,10 @@ main = hspec $ do describe "waitForDiagnosticsSource" $ it "works" $ runSession "hie" fullCaps "test/data" $ do openDoc "Error.hs" "haskell" - [diag] <- waitForDiagnosticsSource "ghcmod" + [diag] <- waitForDiagnosticsSource "bios" liftIO $ do diag ^. severity `shouldBe` Just DsError - diag ^. source `shouldBe` Just "ghcmod" + diag ^. source `shouldBe` Just "bios" describe "rename" $ it "works" $ runSession "hie" fullCaps "test/data" $ do diff --git a/test/data/hie.yaml b/test/data/hie.yaml new file mode 100644 index 0000000..4b7e849 --- /dev/null +++ b/test/data/hie.yaml @@ -0,0 +1,3 @@ +cradle: + direct: + arguments: []