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"
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"]
28 cabal cmd args
= P
.cabal cmd
("--dry-run" : args
)