Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure running tests locally pick up the correct cradle type #3869

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions plugins/hls-refactor-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@ codeActionTests = testGroup "code actions"
, exportUnusedTests
, addImplicitParamsConstraintTests
, removeExportTests
#if MIN_VERSION_ghc(9,2,1)
, Test.AddArgument.tests
#endif
]

insertImportTests :: TestTree
Expand Down Expand Up @@ -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" $
Expand Down
6 changes: 4 additions & 2 deletions plugins/hls-refactor-plugin/test/Test/AddArgument.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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"
Expand Down
Loading