Skip to content

Commit 8a34e19

Browse files
committed
fixup! Support hls-hlint-plugin and hls-stylish-plugin for ghc9.0 and ghc9.2 (haskell#2854)
1 parent 04cc40d commit 8a34e19

File tree

1 file changed

+5
-15
lines changed
  • plugins/hls-hlint-plugin/test

1 file changed

+5
-15
lines changed

plugins/hls-hlint-plugin/test/Main.hs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,9 @@ suggestionsTests =
181181
doc <- openDoc "IgnoreAnnHlint.hs" "haskell"
182182
expectNoMoreDiagnostics 3 doc "hlint"
183183

184-
, knownBrokenForGhcVersions [GHC92] "apply-refact has different behavior on v0.10" $
185-
testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
184+
, testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
186185
testRefactor "Comments.hs" "Redundant bracket" expectedComments
187186

188-
, onlyRunForGhcVersions [GHC92] "only run test for apply-refact-0.10" $
189-
testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
190-
testRefactor "Comments.hs" "Redundant bracket" expectedComments'
191-
192187
, testCase "[#2290] apply all hints works with a trailing comment" $ runHlintSession "" $ do
193188
testRefactor "TwoHintsAndComment.hs" "Apply all hints" expectedComments2
194189

@@ -262,14 +257,6 @@ suggestionsTests =
262257
, "f = {- inline comment -}{- inline comment inside refactored code -} 1 -- ending comment", ""
263258
, "-- final comment"
264259
]
265-
expectedComments' = [ "-- comment before header"
266-
, "module Comments where", ""
267-
, "{-# standalone annotation #-}", ""
268-
, "-- standalone comment", ""
269-
, "-- | haddock comment"
270-
, "f = {- inline comment -} {- inline comment inside refactored code -}1 -- ending comment", ""
271-
, "-- final comment"
272-
]
273260
expectedComments2 = [ "module TwoHintsAndComment where"
274261
, "biggest = foldr1 max -- the line above will show two hlint hints, \"eta reduce\" and \"use maximum\""
275262
]
@@ -371,7 +358,10 @@ disableHlint = sendConfigurationChanged $ toJSON $ def { Plugin.plugins = Map.fr
371358
-- Although a given hlint version supports one direct ghc, we could use several versions of hlint
372359
-- each one supporting a different ghc version. It should be a temporary situation though.
373360
knownBrokenForHlintOnGhcLib :: String -> TestTree -> TestTree
374-
knownBrokenForHlintOnGhcLib = expectFailBecause
361+
knownBrokenForHlintOnGhcLib = knownBrokenForGhcVersions [GHC88, GHC86]
362+
363+
knownBrokenForHlintOnRawGhc :: String -> TestTree -> TestTree
364+
knownBrokenForHlintOnRawGhc = knownBrokenForGhcVersions [GHC810, GHC90]
375365

376366
-- 1's based
377367
data Point = Point {

0 commit comments

Comments
 (0)