From 753042c0f4a3d220238db7d7ae08d1cf18fb5aa9 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Thu, 18 Aug 2022 23:25:36 +0200 Subject: [PATCH] fix another test that relies on plugin ordering --- test/functional/Format.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/functional/Format.hs b/test/functional/Format.hs index af90fc7a9..9b853d527 100644 --- a/test/functional/Format.hs +++ b/test/functional/Format.hs @@ -47,7 +47,10 @@ providerTests = testGroup "formatting provider" [ testCase "respects none" $ runSessionWithConfig (formatConfig "none") hlsCommand fullCaps "test/testdata/format" $ do doc <- openDoc "Format.hs" "haskell" resp <- request STextDocumentFormatting $ DocumentFormattingParams Nothing doc (FormattingOptions 2 True Nothing Nothing Nothing) - liftIO $ resp ^. LSP.result @?= Left (ResponseError InvalidRequest "No plugin enabled for STextDocumentFormatting, available:\nPluginId \"floskell\"\nPluginId \"fourmolu\"\nPluginId \"ormolu\"\nPluginId \"stylish-haskell\"\nPluginId \"brittany\"\n" Nothing) + liftIO $ resp ^. LSP.result @?= Left (ResponseError InvalidRequest + ("No plugin enabled for STextDocumentFormatting, available:\n" + <> "PluginId \"floskell\"\nPluginId \"fourmolu\"\nPluginId \"stylish-haskell\"\nPluginId \"brittany\"\nPluginId \"ormolu\"\n") + Nothing) , requiresOrmoluPlugin . requiresFloskellPlugin $ testCase "can change on the fly" $ runSession hlsCommand fullCaps "test/testdata/format" $ do formattedOrmolu <- liftIO $ T.readFile "test/testdata/format/Format.ormolu.formatted.hs"