Improve online docs for `includes:` field
[cabal.git] / cabal-testsuite / PackageTests / Init / init-backup.test.hs
blobe9e5c1293581e558fc749e7a49b828396e9f9810
1 import Test.Cabal.Prelude
3 main = cabalTest $ do
4 cwd <- fmap testCurrentDir getTestEnv
6 (initOut, buildOut) <- do
7 initOut <- cabalWithStdin "init" ["-i", "-p", "app"]
8 "2\ny\n5\n\n\n2\n\n\n\n\n\n\n\n\n\n"
9 setup "configure" []
10 buildOut <- setup' "build" ["app"]
11 return (initOut, buildOut)
13 assertFileDoesContain (cwd </> "app.cabal") "3.0"
14 assertFileDoesContain (cwd </> "app.cabal") "BSD-3-Clause"
15 assertFileDoesContain (cwd </> "app.cabal") "Simple"
16 shouldDirectoryExist (cwd </> "app.save0")
17 assertOutputContains "Backing up old version in app.save0" initOut
18 assertOutputContains "Overwriting directory ./app" initOut
19 assertOutputContains "Linking" buildOut