@@ -710,7 +710,7 @@ cancellationTemplate (edit, undoEdit) mbKey = testCase (maybe "-" fst mbKey) $ r
710
710
expectNoMoreDiagnostics 0.5
711
711
where
712
712
-- similar to run except it disables kick
713
- runTestNoKick s = withTempDir $ \ dir -> runInDir' argsNoKick dir " ." " . " s
713
+ runTestNoKick s = withTempDir $ \ dir -> runInDir' argsNoKick dir " ." s
714
714
argsNoKick = def { IDE. argsRules = mainRule }
715
715
716
716
typeCheck doc = do
@@ -4936,16 +4936,16 @@ benchmarkTests =
4936
4936
4937
4937
-- | checks if we use InitializeParams.rootUri for loading session
4938
4938
rootUriTests :: TestTree
4939
- rootUriTests = testCase " use rootUri" . runTest " dirA " " dirB" $ \ dir -> do
4939
+ rootUriTests = testCase " use rootUri" . runTest " dirB" $ \ dir -> do
4940
4940
let bPath = dir </> " dirB/Foo.hs"
4941
4941
liftIO $ copyTestDataFiles dir " rootUri"
4942
4942
bSource <- liftIO $ readFileUtf8 bPath
4943
4943
_ <- createDoc " Foo.hs" " haskell" bSource
4944
4944
expectNoMoreDiagnostics 0.5
4945
4945
where
4946
4946
-- similar to run' except we can configure where to start ghcide and session
4947
- runTest :: FilePath -> FilePath -> (FilePath -> Session () ) -> IO ()
4948
- runTest dir1 dir2 s = withTempDir $ \ dir -> runInDir' def dir dir1 dir2 (s dir)
4947
+ runTest :: FilePath -> (FilePath -> Session () ) -> IO ()
4948
+ runTest dir2 s = withTempDir $ \ dir -> runInDir' def dir dir2 (s dir)
4949
4949
4950
4950
-- | Test if ghcide asynchronously handles Commands and user Requests
4951
4951
asyncTests :: TestTree
@@ -5229,27 +5229,22 @@ run' :: (FilePath -> Session a) -> IO a
5229
5229
run' s = withTempDir $ \ dir -> runInDir dir (s dir)
5230
5230
5231
5231
runInDir :: FilePath -> Session a -> IO a
5232
- runInDir dir = runInDir' def dir " ." " . "
5232
+ runInDir dir = runInDir' def dir " ."
5233
5233
5234
5234
withLongTimeout :: IO a -> IO a
5235
5235
withLongTimeout = bracket_ (setEnv " LSP_TIMEOUT" " 120" True ) (unsetEnv " LSP_TIMEOUT" )
5236
5236
5237
5237
-- | Takes a directory as well as relative paths to where we should launch the executable as well as the session root.
5238
- runInDir' :: IDE. Arguments -> FilePath -> FilePath -> FilePath -> Session a -> IO a
5239
- runInDir' args dir startExeIn startSessionIn s = do
5240
- let startDir = dir </> startExeIn
5238
+ runInDir' :: IDE. Arguments -> FilePath -> FilePath -> Session a -> IO a
5239
+ runInDir' args dir startSessionIn s = do
5241
5240
let projDir = dir </> startSessionIn
5242
5241
5243
- createDirectoryIfMissing True startDir
5244
5242
createDirectoryIfMissing True projDir
5245
- -- Temporarily hack around https://github.com/mpickering/hie-bios/pull/56
5246
- -- since the package import test creates "Data/List.hs", which otherwise has no physical home
5247
- createDirectoryIfMissing True $ projDir ++ " /Data"
5248
5243
-- HIE calls getXgdDirectory which assumes that HOME is set.
5249
5244
-- Only sets HOME if it wasn't already set.
5250
5245
setEnv " HOME" " /homeless-shelter" False
5251
5246
5252
- testIde dir args s
5247
+ testIde projDir args s
5253
5248
5254
5249
getConfigFromEnv :: IO SessionConfig
5255
5250
getConfigFromEnv = do
@@ -5386,7 +5381,7 @@ testIde rootDir arguments session = do
5386
5381
sleep 1
5387
5382
runIt
5388
5383
5389
- hClose hInWrite
5384
+ -- hClose hInWrite
5390
5385
timeout 3 (wait server) >>= \ case
5391
5386
Just () -> pure ()
5392
5387
Nothing -> do
0 commit comments