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-older"]
7 fails
$ cabal
"v2-build" ["--allow-older=baz,quux"]
8 cabal
"v2-build" ["--allow-older=base", "--allow-older=baz,quux"]
9 cabal
"v2-build" ["--allow-older=bar", "--allow-older=base,baz"
10 ,"--allow-older=quux"]
11 fails
$ cabal
"v2-build" ["--enable-tests"]
12 cabal
"v2-build" ["--enable-tests", "--allow-older"]
13 fails
$ cabal
"v2-build" ["--enable-benchmarks"]
14 cabal
"v2-build" ["--enable-benchmarks", "--allow-older"]
15 fails
$ cabal
"v2-build" ["--enable-benchmarks", "--enable-tests"]
16 cabal
"v2-build" ["--enable-benchmarks", "--enable-tests"
18 fails
$ cabal
"v2-build" ["--allow-older=Foo:base"]
19 fails
$ cabal
"v2-build" ["--allow-older=Foo:base"
20 ,"--enable-tests", "--enable-benchmarks"]
21 cabal
"v2-build" ["--allow-older=AllowOlder:base"]
22 cabal
"v2-build" ["--allow-older=AllowOlder:base"
23 ,"--allow-older=Foo:base"]
24 cabal
"v2-build" ["--allow-older=AllowOlder:base"
25 ,"--allow-older=Foo:base"
26 ,"--enable-tests", "--enable-benchmarks"]
28 cabal cmd args
= P
.cabal cmd
("--dry-run" : args
)