(cabal check) Add "No internal name clash" test
[cabal.git] / cabal-testsuite / PackageTests / Init / init-backup.test.hs
blobf1c4ab0fc74f79bd050a55608a43d3ebf91eda79
1 import Test.Cabal.Prelude
3 main = cabalTest $
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"
10 setup "configure" []
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