diff --git a/plugins/hls-refactor-plugin/test/Main.hs b/plugins/hls-refactor-plugin/test/Main.hs index e7975e21fa..e9520804e9 100644 --- a/plugins/hls-refactor-plugin/test/Main.hs +++ b/plugins/hls-refactor-plugin/test/Main.hs @@ -325,9 +325,7 @@ codeActionTests = testGroup "code actions" , exportUnusedTests , addImplicitParamsConstraintTests , removeExportTests -#if MIN_VERSION_ghc(9,2,1) , Test.AddArgument.tests -#endif ] insertImportTests :: TestTree @@ -2222,9 +2220,6 @@ insertNewDefinitionTests = testGroup "insert new definition actions" ++ txtB') ] -#if MIN_VERSION_ghc(9,2,1) -#endif - deleteUnusedDefinitionTests :: TestTree deleteUnusedDefinitionTests = testGroup "delete unused definition action" [ testSession "delete unused top level binding" $ diff --git a/plugins/hls-refactor-plugin/test/Test/AddArgument.hs b/plugins/hls-refactor-plugin/test/Test/AddArgument.hs index 0d16e5be19..1198cea038 100644 --- a/plugins/hls-refactor-plugin/test/Test/AddArgument.hs +++ b/plugins/hls-refactor-plugin/test/Test/AddArgument.hs @@ -22,8 +22,10 @@ import Test.Tasty.HUnit import Test.Hls +import qualified Test.Hls.FileSystem as FS import qualified Development.IDE.Plugin.CodeAction as Refactor +import System.FilePath ((<.>)) tests :: TestTree tests = @@ -63,11 +65,11 @@ mkGoldenAddArgTest' testFileName range varName = do <$> getCodeActions docB range liftIO $ actionTitle @?= ("Add argument ‘" <> varName <> "’ to function") executeCodeAction action - goldenWithHaskellDoc + goldenWithHaskellDocInTmpDir def (mkPluginTestDescriptor Refactor.bindingsPluginDescriptor "ghcide-code-actions-bindings") (testFileName <> " (golden)") - "test/data/golden/add-arg" + (FS.mkVirtualFileTree "test/data/golden/add-arg" (FS.directProject $ testFileName <.> "hs")) testFileName "expected" "hs"