projects
/
lsp-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Integrate Parsec transformer into Session monad
[lsp-test.git]
/
test
/
Test.hs
diff --git
a/test/Test.hs
b/test/Test.hs
index 95e3d5e9eeb1dce39add9f5c89a104d7c54a9d17..401fd9815fd09e81db4f3af8dafeff13ebc2f2ad 100644
(file)
--- a/
test/Test.hs
+++ b/
test/Test.hs
@@
-6,7
+6,8
@@
import Control.Monad.IO.Class
import Control.Lens hiding (List)
import Language.Haskell.LSP.Test
import Language.Haskell.LSP.Test.Replay
import Control.Lens hiding (List)
import Language.Haskell.LSP.Test
import Language.Haskell.LSP.Test.Replay
-import Language.Haskell.LSP.TH.DataTypesJSON
+import Language.Haskell.LSP.Types
+import Language.Haskell.LSP.Messages
main = hspec $ do
describe "manual session validation" $
main = hspec $ do
describe "manual session validation" $
@@
-17,8
+18,9
@@
main = hspec $ do
sendNotification TextDocumentDidOpen (DidOpenTextDocumentParams docItem)
sendNotification TextDocumentDidOpen (DidOpenTextDocumentParams docItem)
- (NotificationMessage _ TextDocumentPublishDiagnostics (PublishDiagnosticsParams _ (List diags))) <-
- getMessage :: Session PublishDiagnosticsNotification
+ skipMany loggingNotification
+
+ (NotPublishDiagnostics (NotificationMessage _ TextDocumentPublishDiagnostics (PublishDiagnosticsParams _ (List diags)))) <- notification
liftIO $ diags `shouldBe` []
liftIO $ diags `shouldBe` []
@@
-26,7
+28,8
@@
main = hspec $ do
TextDocumentDocumentSymbol
(DocumentSymbolParams docId)
TextDocumentDocumentSymbol
(DocumentSymbolParams docId)
- (ResponseMessage _ _ (Just (List symbols)) Nothing) <- getMessage :: Session DocumentSymbolsResponse
+ (RspDocumentSymbols (ResponseMessage _ _ (Just (List symbols)) Nothing)) <- response
+
liftIO $ do
let mainSymbol = head symbols
mainSymbol ^. name `shouldBe` "main"
liftIO $ do
let mainSymbol = head symbols
mainSymbol ^. name `shouldBe` "main"