Skip to content
Snippets Groups Projects
Commit e9231077 authored by Francesco Gazzetta's avatar Francesco Gazzetta
Browse files

Add basic test for new-exec

parent 33a8b51e
No related branches found
No related tags found
No related merge requests found
import InplaceDep
main = f
# cabal new-build
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- inplace-dep-1.0 (lib) (first run)
Configuring library for inplace-dep-1.0..
Preprocessing library for inplace-dep-1.0..
Building library for inplace-dep-1.0..
# cabal new-exec
packages:
inplace-dep
import Test.Cabal.Prelude
import Control.Monad.Trans (liftIO)
import System.Directory-- (getDirectoryContents, removeFile)
main = cabalTest $ do
cabal "new-build" ["inplace-dep"]
env <- getTestEnv
liftIO $ removeEnvFiles $ testSourceDir env -- we don't want existing env files to interfere
cabal "new-exec" ["ghc", "Main.hs"]
-- TODO external (store) deps, once new-install is working
removeEnvFiles :: FilePath -> IO ()
removeEnvFiles dir = (mapM_ (removeFile . (dir </>))
. filter
((".ghc.environment" ==)
. take 16))
=<< getDirectoryContents dir
module InplaceDep ( f ) where
f :: IO ()
f = putStrLn "Hello world"
name: inplace-dep
version: 1.0
build-type: Simple
cabal-version: >= 1.10
library
exposed-modules: InplaceDep
build-depends: base
default-language: Haskell2010
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment