Merge pull request #10525 from 9999years/field-stanza-names
[cabal.git] / cabal-testsuite / PackageTests / AllowNewer / cabal.test.hs
blob5cb00a21505d9b7c4d8ba03d089765b44e9f76da
1 import Test.Cabal.Prelude hiding (cabal)
2 import qualified Test.Cabal.Prelude as P
3 -- See #4332, dep solving output is not deterministic
4 main = cabalTest . recordMode DoNotRecord $ do
5 fails $ cabal "v2-build" []
6 cabal "v2-build" ["--allow-newer"]
7 fails $ cabal "v2-build" ["--allow-newer=baz,quux"]
8 cabal "v2-build" ["--allow-newer=base", "--allow-newer=baz,quux"]
9 cabal "v2-build" ["--allow-newer=bar", "--allow-newer=base,baz"
10 ,"--allow-newer=quux"]
11 fails $ cabal "v2-build" ["--enable-tests"]
12 cabal "v2-build" ["--enable-tests", "--allow-newer"]
13 fails $ cabal "v2-build" ["--enable-benchmarks"]
14 cabal "v2-build" ["--enable-benchmarks", "--allow-newer"]
15 fails $ cabal "v2-build" ["--enable-benchmarks", "--enable-tests"]
16 cabal "v2-build" ["--enable-benchmarks", "--enable-tests"
17 ,"--allow-newer"]
18 fails $ cabal "v2-build" ["--allow-newer=Foo:base"]
19 fails $ cabal "v2-build" ["--allow-newer=Foo:base"
20 ,"--enable-tests", "--enable-benchmarks"]
21 cabal "v2-build" ["--allow-newer=AllowNewer:base"]
22 cabal "v2-build" ["--allow-newer=AllowNewer:base"
23 ,"--allow-newer=Foo:base"]
24 cabal "v2-build" ["--allow-newer=AllowNewer:base"
25 ,"--allow-newer=Foo:base"
26 ,"--enable-tests", "--enable-benchmarks"]
27 where
28 cabal cmd args = P.cabal cmd ("--dry-run" : args)