Skip to content

Split plugin tests into two cabal projects #1479

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

Merged
merged 3 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 9 additions & 0 deletions ghcide/test/data/plugin-knownnat/plugin.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cabal-version: 1.18
name: plugin
version: 1.0.0
build-type: Simple

library
build-depends: base, ghc-typelits-knownnat
exposed-modules: KnownNat
hs-source-dirs: .
1 change: 1 addition & 0 deletions ghcide/test/data/plugin-recorddot/cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages: .
9 changes: 9 additions & 0 deletions ghcide/test/data/plugin-recorddot/plugin.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cabal-version: 1.18
name: plugin
version: 1.0.0
build-type: Simple

library
build-depends: base, record-dot-preprocessor, record-hasfield
exposed-modules: RecordDot
hs-source-dirs: .
10 changes: 0 additions & 10 deletions ghcide/test/data/plugin/plugin.cabal

This file was deleted.

4 changes: 2 additions & 2 deletions ghcide/test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3405,7 +3405,7 @@ checkFileCompiles fp diag =
pluginSimpleTests :: TestTree
pluginSimpleTests =
ignoreInWindowsForGHC88And810 $
testSessionWithExtraFiles "plugin" "simple plugin" $ \dir -> do
testSessionWithExtraFiles "plugin-knownnat" "simple plugin" $ \dir -> do
_ <- openDoc (dir </> "KnownNat.hs") "haskell"
liftIO $ writeFile (dir</>"hie.yaml")
"cradle: {cabal: [{path: '.', component: 'lib:plugin'}]}"
Expand All @@ -3419,7 +3419,7 @@ pluginSimpleTests =
pluginParsedResultTests :: TestTree
pluginParsedResultTests =
ignoreInWindowsForGHC88And810 $
testSessionWithExtraFiles "plugin" "parsedResultAction plugin" $ \dir -> do
testSessionWithExtraFiles "plugin-recorddot" "parsedResultAction plugin" $ \dir -> do
_ <- openDoc (dir</> "RecordDot.hs") "haskell"
expectNoMoreDiagnostics 2

Expand Down