Commit b58b3158 authored by quasicomputational's avatar quasicomputational
Browse files

Avoid leaving leftover files in the source tree in tests.

This test was leaving a 'Main' executable behind. Since we don't ever
actually run it, just check that the compilation succeeds, we can drop
it anywhere and avoid that.
parent afbc0a1c
......@@ -5,7 +5,10 @@ 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"]
-- Drop the compiled executable into the temporary directory, to avoid cluttering the tree. If compilation succeeds, we've tested what we need to!
tmpdir <- fmap testTmpDir getTestEnv
let dest = tmpdir </> "a.out"
cabal "new-exec" ["ghc", "--", "Main.hs", "-o", dest]
-- TODO external (store) deps, once new-install is working
removeEnvFiles :: FilePath -> IO ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment