Merge branch 'master' of https://github.com/Bubba/haskell-lsp-test
[lsp-test.git] / src / Language / Haskell / LSP / Test / Replay.hs
index 2d5e4e612284ab6c3329a5aa7c36c548f45a1ef2..dfa364b44c3600b4682eca2f94699f2fea16fad3 100644 (file)
@@ -29,9 +29,10 @@ import           Language.Haskell.LSP.Test.Messages
 -- makes sure it matches up with an expected response.
 -- The session directory should have a captured session file in it
 -- named "session.log".
-replaySession :: FilePath -- ^ The recorded session directory.
+replaySession :: FilePath -- ^ The filepath to the server executable.
+              -> FilePath -- ^ The recorded session directory.
               -> IO Bool
-replaySession sessionDir = do
+replaySession serverExe sessionDir = do
 
   entries <- B.lines <$> B.readFile (sessionDir </> "session.log")
 
@@ -52,6 +53,7 @@ replaySession sessionDir = do
 
   threadId <- forkIO $
     runSessionWithHandler (listenServer serverMsgs requestMap reqSema rspSema passVar)
+                          serverExe
                           sessionDir
                           (sendMessages clientMsgs reqSema rspSema)