@@ -144,23 +144,17 @@ brittanyTests = testGroup "brittany" [
144144
145145ormoluTests :: TestTree
146146ormoluTests = testGroup " ormolu"
147- [ goldenVsStringDiff " formats correctly" goldenGitDiff ( " test/testdata/Format.ormolu." ++ ormoluGoldenSuffix ++ " .hs" ) $ runSession hieCommand fullCaps " test/testdata" $ do
148- sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " ormolu" ))
149- doc <- openDoc " Format.hs" " haskell"
150- formatDoc doc (FormattingOptions 2 True )
151- BS. fromStrict . T. encodeUtf8 <$> documentContents doc
152- , goldenVsStringDiff " sorts imports correctly" goldenGitDiff ( " test/testdata/Format2.ormolu." ++ ormoluGoldenSuffix ++ " .hs" ) $ runSession hieCommand fullCaps " test/testdata" $ do
153- sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " ormolu" ))
154- doc <- openDoc " Format2.hs" " haskell"
155- formatDoc doc (FormattingOptions 2 True )
156- BS. fromStrict . T. encodeUtf8 <$> documentContents doc
147+ [ goldenVsStringDiff " formats correctly" goldenGitDiff " test/testdata/Format.ormolu.formatted .hs" $ runSession hieCommand fullCaps " test/testdata" $ do
148+ sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " ormolu" ))
149+ doc <- openDoc " Format.hs" " haskell"
150+ formatDoc doc (FormattingOptions 2 True )
151+ BS. fromStrict . T. encodeUtf8 <$> documentContents doc
152+ , goldenVsStringDiff " formats imports correctly" goldenGitDiff " test/testdata/Format2.ormolu.formatted .hs" $ runSession hieCommand fullCaps " test/testdata" $ do
153+ sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " ormolu" ))
154+ doc <- openDoc " Format2.hs" " haskell"
155+ formatDoc doc (FormattingOptions 2 True )
156+ BS. fromStrict . T. encodeUtf8 <$> documentContents doc
157157 ]
158- where
159- ormoluGoldenSuffix = case ghcVersion of
160- GHC88 -> " formatted"
161- GHC86 -> " formatted"
162- _ -> " unchanged"
163-
164158
165159formatLspConfig :: Value -> Value
166160formatLspConfig provider = object [ " haskell" .= object [" formattingProvider" .= (provider :: Value )] ]
0 commit comments