@@ -50,7 +50,7 @@ import Development.IDE.Test (Cursor,
5050 expectNoMoreDiagnostics ,
5151 flushMessages ,
5252 standardizeQuotes ,
53- waitForAction )
53+ waitForAction , getInterfaceFilesDir )
5454import Development.IDE.Test.Runfiles
5555import qualified Development.IDE.Types.Diagnostics as Diagnostics
5656import Development.IDE.Types.Location
@@ -95,7 +95,7 @@ import Data.Tuple.Extra
9595import Development.IDE.Core.FileStore (getModTime )
9696import Development.IDE.Plugin.CodeAction (matchRegExMultipleImports )
9797import qualified Development.IDE.Plugin.HLS.GhcIde as Ghcide
98- import Development.IDE.Plugin.Test (TestRequest (BlockSeconds , GetInterfaceFilesDir ),
98+ import Development.IDE.Plugin.Test (TestRequest (BlockSeconds ),
9999 WaitForIdeRuleResult (.. ),
100100 blockCommandId )
101101import Ide.PluginUtils (pluginDescToIdePlugins )
@@ -5249,14 +5249,9 @@ ifaceErrorTest = testCase "iface-error-test-1" $ runWithExtraFiles "recomp" $ \d
52495249
52505250
52515251 -- Check that we wrote the interfaces for B when we saved
5252- let m = SCustomMethod " test"
5253- lid <- sendRequest m $ toJSON $ GetInterfaceFilesDir bPath
5254- res <- skipManyTill anyMessage $ responseForId m lid
5255- liftIO $ case res of
5256- ResponseMessage {_result= Right (A. fromJSON -> A. Success hidir)} -> do
5257- hi_exists <- doesFileExist $ hidir </> " B.hi"
5258- assertBool (" Couldn't find B.hi in " ++ hidir) hi_exists
5259- _ -> assertFailure $ " Got malformed response for CustomMessage hidir: " ++ show res
5252+ Right hidir <- getInterfaceFilesDir bdoc
5253+ hi_exists <- liftIO $ doesFileExist $ hidir </> " B.hi"
5254+ liftIO $ assertBool (" Couldn't find B.hi in " ++ hidir) hi_exists
52605255
52615256 pdoc <- createDoc pPath " haskell" pSource
52625257 changeDoc pdoc [TextDocumentContentChangeEvent Nothing Nothing $ pSource <> " \n foo = y :: Bool" ]
0 commit comments