X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=test%2FTest.hs;h=a4a41732e395e36c9581525f398f985f32527af0;hp=56bd01dd0a1a5ec4d2ae65418706acf19620f0e0;hb=776b8e1a475e2150797d432f0c13ccf685b1cd4b;hpb=35ce787a5458ffdce71923e40464448d6ea71801 diff --git a/test/Test.hs b/test/Test.hs index 56bd01d..a4a4173 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -289,6 +289,16 @@ main = hspec $ do formatRange doc (FormattingOptions 4 True) (Range (Position 1 10) (Position 2 10)) documentContents doc >>= liftIO . (`shouldNotBe` oldContents) + describe "closeDoc" $ + it "works" $ + let sesh = + runSession "hie --lsp" "test/data" $ do + doc <- openDoc "Format.hs" "haskell" + closeDoc doc + -- need to evaluate to throw + documentContents doc >>= liftIO . print + in sesh `shouldThrow` anyException + mkRange sl sc el ec = Range (Position sl sc) (Position el ec) didChangeCaps :: ClientCapabilities