1 import Test
.Cabal
.Prelude
2 import System
.Directory
(copyFile
, removeFile)
4 main
= cabalTest
. void
$ do
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")
14 cacheDir
<- getScriptCacheDirectory
(td
</> "script.hs")
15 cacheDir2
<- getScriptCacheDirectory
(td
</> "script2.hs")
17 shouldDirectoryExist cacheDir
18 shouldDirectoryNotExist cacheDir2