X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=example%2FRecorded.hs;h=5d7cac1b946e0264a51e8aa27e1c4ad060fd888d;hb=1f4a12c49be0cb8640d60c21f6499c5567646fba;hp=ce61cb1acfad9afd9a1ea8b65e3d00c1c946062e;hpb=bd554ce2292b667f7870e9643a1107a81063a596;p=lsp-test.git diff --git a/example/Recorded.hs b/example/Recorded.hs index ce61cb1..5d7cac1 100644 --- a/example/Recorded.hs +++ b/example/Recorded.hs @@ -1,8 +1,12 @@ import Language.Haskell.LSP.Test.Recorded import System.Directory import System.Environment +import Control.Monad.IO.Class main = do - [session, dir] <- (take 2 <$> getArgs) >>= mapM canonicalizePath - passed <- replay session dir - putStrLn $ if passed then "Passed" else "Failed" + sessionFile <- (head <$> getArgs) >>= canonicalizePath + replay sessionFile $ do + x <- sendNextRequest + liftIO $ print x + y <- sendNextRequest + liftIO $ print y \ No newline at end of file