Skip to content

Commit

Permalink
fix identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra committed Feb 20, 2021
1 parent 37636b8 commit 72f303a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/functional/Format.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,32 @@ providerTests = testGroup "formatting provider" [
documentContents doc >>= liftIO . (@?= formattedFloskell)

, testCase "can change on the fly" $ runSession hlsCommand fullCaps "test/testdata/format" $ do
formattedBrittany <- liftIO $ T.readFile "test/testdata/format/Format.ormolu.formatted.hs"
formattedOrmolu <- liftIO $ T.readFile "test/testdata/format/Format.ormolu.formatted.hs"
formattedFloskell <- liftIO $ T.readFile "test/testdata/format/Format.floskell.formatted.hs"
formattedBrittanyPostFloskell <- liftIO $ T.readFile "test/testdata/format/Format.ormolu_post_floskell.formatted.hs"
formattedOrmoluPostFloskell <- liftIO $ T.readFile "test/testdata/format/Format.ormolu_post_floskell.formatted.hs"

doc <- openDoc "Format.hs" "haskell"

sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu"))
formatDoc doc (FormattingOptions 2 True Nothing Nothing Nothing)
documentContents doc >>= liftIO . (@?= formattedBrittany)
documentContents doc >>= liftIO . (@?= formattedOrmolu)

sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "floskell"))
formatDoc doc (FormattingOptions 2 True Nothing Nothing Nothing)
documentContents doc >>= liftIO . (@?= formattedFloskell)

sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu"))
formatDoc doc (FormattingOptions 2 True Nothing Nothing Nothing)
documentContents doc >>= liftIO . (@?= formattedBrittanyPostFloskell)
documentContents doc >>= liftIO . (@?= formattedOrmoluPostFloskell)
, testCase "supports both new and old configuration sections" $ runSession hlsCommand fullCaps "test/testdata/format" $ do
formattedBrittany <- liftIO $ T.readFile "test/testdata/format/Format.ormolu.formatted.hs"
formattedOrmolu <- liftIO $ T.readFile "test/testdata/format/Format.ormolu.formatted.hs"
formattedFloskell <- liftIO $ T.readFile "test/testdata/format/Format.floskell.formatted.hs"

doc <- openDoc "Format.hs" "haskell"

sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfigOld "ormolu"))
formatDoc doc (FormattingOptions 2 True Nothing Nothing Nothing)
documentContents doc >>= liftIO . (@?= formattedBrittany)
documentContents doc >>= liftIO . (@?= formattedOrmolu)

sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfigOld "floskell"))
formatDoc doc (FormattingOptions 2 True Nothing Nothing Nothing)
Expand Down

0 comments on commit 72f303a

Please sign in to comment.