Merge pull request #9898 from haskell/mergify/bp/3.12/pr-9865
[cabal.git] / cabal-testsuite / PackageTests / NewBuild / CmdClean / Orphan / cabal.test.hs
blob39ba5185e94a6b395cc34b22c852b91e6053b396
1 import Test.Cabal.Prelude
2 import System.Directory (copyFile, removeFile)
4 main = cabalTest . void $ do
5 env <- getTestEnv
6 let td = testCurrentDir env
8 cabal' "v2-build" ["script.hs"]
9 liftIO $ copyFile (td </> "script.hs") (td </> "script2.hs")
10 cabal' "v2-build" ["script2.hs"]
11 liftIO $ removeFile (td </> "script2.hs")
12 cabal' "v2-clean" ["script.hs"]
14 cacheDir <- getScriptCacheDirectory (td </> "script.hs")
15 cacheDir2 <- getScriptCacheDirectory (td </> "script2.hs")
17 shouldDirectoryNotExist cacheDir
18 shouldDirectoryNotExist cacheDir2