Refactor the way packages databases are handled
- cradle now stores a list of active package databases instead of only the user store (if present). - rename `cradlePackageDb` -> `cradlePkgDbStack` as that`s what the ghc documentaion calls this kind of thing - `getPackageDbPackages` now returns names of all visible packages in the given directory. Also the implementation now uses `ghc-pkg` instead of manually looking at the package database
This commit is contained in:
12
test/Main.hs
Normal file
12
test/Main.hs
Normal file
@@ -0,0 +1,12 @@
|
||||
import Spec
|
||||
import Dir
|
||||
|
||||
import Test.Hspec
|
||||
import System.Process
|
||||
|
||||
main = do
|
||||
let sandboxes = [ "test/data", "test/data/check-packageid" ]
|
||||
genSandboxCfg dir = withDirectory dir $ \cwd -> do
|
||||
system ("sed 's|@CWD@|" ++ cwd ++ "|g' cabal.sandbox.config.in > cabal.sandbox.config")
|
||||
genSandboxCfg `mapM` sandboxes
|
||||
hspec spec
|
||||
Reference in New Issue
Block a user