@@ -5277,25 +5277,28 @@ ifaceTests = testGroup "Interface loading tests"
52775277 ]
52785278
52795279bootTests :: TestTree
5280- bootTests = testCase " boot-def-test" $ runWithExtraFiles " boot" $ \ dir -> do
5281- let cPath = dir </> " C.hs"
5282- cSource <- liftIO $ readFileUtf8 cPath
5283-
5284- -- Dirty the cache
5285- liftIO $ runInDir dir $ do
5286- cDoc <- createDoc cPath " haskell" cSource
5287- _ <- getHover cDoc $ Position 4 3
5288- ~ () <- skipManyTill anyMessage $ satisfyMaybe $ \ case
5289- FromServerMess (SCustomMethod " ghcide/reference/ready" ) (NotMess NotificationMessage {_params = fp}) -> do
5290- A. Success fp' <- pure $ fromJSON fp
5291- if equalFilePath fp' cPath then pure () else Nothing
5292- _ -> Nothing
5293- closeDoc cDoc
5294-
5295- cdoc <- createDoc cPath " haskell" cSource
5296- locs <- getDefinitions cdoc (Position 7 4 )
5297- let floc = mkR 9 0 9 1
5298- checkDefs locs (pure [floc])
5280+ bootTests = testGroup " boot"
5281+ [ testCase " boot-def-test" $ runWithExtraFiles " boot" $ \ dir -> do
5282+ let cPath = dir </> " C.hs"
5283+ cSource <- liftIO $ readFileUtf8 cPath
5284+ -- Dirty the cache
5285+ liftIO $ runInDir dir $ do
5286+ cDoc <- createDoc cPath " haskell" cSource
5287+ _ <- getHover cDoc $ Position 4 3
5288+ ~ () <- skipManyTill anyMessage $ satisfyMaybe $ \ case
5289+ FromServerMess (SCustomMethod " ghcide/reference/ready" ) (NotMess NotificationMessage {_params = fp}) -> do
5290+ A. Success fp' <- pure $ fromJSON fp
5291+ if equalFilePath fp' cPath then pure () else Nothing
5292+ _ -> Nothing
5293+ closeDoc cDoc
5294+ cdoc <- createDoc cPath " haskell" cSource
5295+ locs <- getDefinitions cdoc (Position 7 4 )
5296+ let floc = mkR 9 0 9 1
5297+ checkDefs locs (pure [floc])
5298+ , testCase " graph with boot modules" $ runWithExtraFiles " boot2" $ \ dir -> do
5299+ _ <- openDoc (dir </> " A.hs" ) " haskell"
5300+ expectNoMoreDiagnostics 2
5301+ ]
52995302
53005303-- | test that TH reevaluates across interfaces
53015304ifaceTHTest :: TestTree
0 commit comments