Skip to content

Commit d69114b

Browse files
committed
gate test by ghc version
1 parent 7c987fd commit d69114b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/functional/Completion.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ tests = testGroup "completions" [
8484
compls <- getCompletions doc (Position 5 7)
8585
liftIO $ assertBool "Expected completions" $ not $ null compls
8686

87-
, testGroup "recorddotsyntax"
87+
, expectFailIfBeforeGhc92 "record dot syntax is introduced in GHC 9.2"
88+
$ testGroup "recorddotsyntax"
8889
[ testCase "shows field selectors" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do
8990
doc <- openDoc "RecordDotSyntax.hs" "haskell"
9091

@@ -364,3 +365,6 @@ shouldNotContainCompl :: [CompletionItem] -> T.Text -> Assertion
364365
compls `shouldNotContainCompl` lbl =
365366
all ((/= lbl) . (^. label)) compls
366367
@? "Should not contain completion: " ++ show lbl
368+
369+
expectFailIfBeforeGhc92 :: String -> TestTree -> TestTree
370+
expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC86]

0 commit comments

Comments
 (0)