1 import Test
.Cabal
.Prelude
4 withSourceCopyDir
"app" $ do
5 cwd
<- fmap testSourceCopyDir getTestEnv
7 (initOut
, buildOut
) <- withDirectory cwd
$ do
8 initOut
<- cabalWithStdin
"init" ["-i"]
9 "2\ny\n5\n\n\n2\n\n\n\n\n\n\n\n\n\n"
11 buildOut
<- setup
' "build" ["app"]
12 return (initOut
, buildOut
)
14 assertFileDoesContain
(cwd
</> "app.cabal") "3.0"
15 assertFileDoesContain
(cwd
</> "app.cabal") "BSD-3-Clause"
16 assertFileDoesContain
(cwd
</> "app.cabal") "Simple"
17 shouldDirectoryExist
(cwd
</> "app.save0")
18 assertOutputContains
"Backing up old version in app.save0" initOut
19 assertOutputContains
"Overwriting directory ./app" initOut
20 assertOutputContains
"Linking" buildOut