packages feed

hackport-0.8.0.0: cabal/cabal-testsuite/PackageTests/NewBuild/CmdClean/Orphan/cabal.test.hs

import Test.Cabal.Prelude
import System.Directory (copyFile, removeFile)

main = cabalTest . void $ do
    env <- getTestEnv
    let td = testCurrentDir env

    cabal' "v2-build" ["script.hs"]
    liftIO $ copyFile (td </> "script.hs") (td </> "script2.hs")
    cabal' "v2-build" ["script2.hs"]
    liftIO $ removeFile (td </> "script2.hs")
    cabal' "v2-clean" ["script.hs"]

    cacheDir  <- getScriptCacheDirectory (td </> "script.hs")
    cacheDir2 <- getScriptCacheDirectory (td </> "script2.hs")

    shouldDirectoryNotExist cacheDir
    shouldDirectoryNotExist cacheDir2