(cabal check) Add "Autogen include" test for ts
[cabal.git] / cabal-testsuite / PackageTests / UserConfig / cabal.test.hs
blob85d67212d4ced80f618208784cdaaab3df23dc1f
1 import Test.Cabal.Prelude
2 main = cabalTest $ do
3 workdir <- fmap testWorkDir getTestEnv
4 let conf = workdir </> "cabal-config"
5 cabalG ["--config-file", conf] "user-config" ["init"]
6 shouldExist conf
7 fails $ cabalG ["--config-file", workdir </> "cabal-config"] "user-config" ["init"]
8 cabalG ["--config-file", conf] "user-config" ["-f", "init"]
9 shouldExist conf
10 let conf2 = workdir </> "cabal-config2"
11 withEnv [("CABAL_CONFIG", Just conf2)] $ do
12 cabal "user-config" ["init"]
13 shouldExist conf2
14 cabalG ["--config-file", conf] "user-config" ["update", "-f", "-a", "extra-prog-path: foo", "-a", "extra-prog-path: bar"]
15 assertFileDoesContain conf "foo,bar"
16 cabalG ["--config-file", conf] "user-config" ["update", "-f", "-a", "extra-prog-path: foo, bar"]
17 assertFileDoesContain conf "foo,bar"