Add migration guide for #9718 (#10578)
[cabal.git] / cabal-testsuite / PackageTests / NewBuild / CmdClean / Keep / cabal.test.hs
blob8063d229034d5146b810af011b8bde4c953a6396
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" []
14 cacheDir <- getScriptCacheDirectory (td </> "script.hs")
15 cacheDir2 <- getScriptCacheDirectory (td </> "script2.hs")
17 shouldDirectoryExist cacheDir
18 shouldDirectoryNotExist cacheDir2