X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=test%2FTest.hs;h=22f8e21996df80c4b9e9a81b95d07edbab5e72d3;hb=803c622b2a390a310584d9f8170c9ec1c8ea67db;hp=40c4aab19b0fd8790d3523891af3062d99cd826f;hpb=a3cd5371e2fe29acd8b9653d0eacebf3087d9715;p=lsp-test.git diff --git a/test/Test.hs b/test/Test.hs index 40c4aab..22f8e21 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -27,7 +27,7 @@ import System.Timeout {-# ANN module ("HLint: ignore Reduce duplication" :: String) #-} {-# ANN module ("HLint: ignore Unnecessary hiding" :: String) #-} -runSession = runSessionWithConfig (defaultConfig { logStdErr = True, logMessages = True }) +runSession = runSessionWithConfig (defaultConfig { logStdErr = True }) main = hspec $ do describe "Session" $ do @@ -46,7 +46,7 @@ main = hspec $ do describe "withTimeout" $ do it "times out" $ - let sesh = runSession "hie" fullCaps "test/data/renamePass" $ do + let sesh = runSession "hie -d --bios-verbose" fullCaps "test/data/renamePass" $ do openDoc "Desktop/simple.hs" "haskell" -- won't receive a request - will timeout -- incoming logging requests shouldn't increase the @@ -240,7 +240,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 @@ -275,10 +276,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