Add migration guide for #9718 (#10578)
[cabal.git] / cabal-testsuite / PackageTests / Regression / T4154 / install-time-with-constraint.test.hs
blobc0621e5551c8c972d8887f56adf03868923b1ac3
1 import Test.Cabal.Prelude
3 -- Test that unqualified command line constraints do not constrain setup
4 -- dependencies. cabal should be able to install the local time-99999 by
5 -- building its setup script with the installed Cabal, which depends on the
6 -- installed time, even though the installed time doesn't fit the constraint.
7 main = cabalTest $ do
8 cabal "v2-build" ["time", "--constraint=time==99999", "--dry-run"]
10 -- Temporarily disabled recording here because output is not stable
11 recordMode DoNotRecord $ do
12 -- Constraining all uses of 'time' fails because the installed 'time'
13 -- doesn't fit the constraint.
14 r <- fails $ cabal' "v2-build" ["time", "--constraint=any.time==99999", "--dry-run"]
15 assertRegex "Expected cabal to reject the setup dependency on the installed time"
16 ("rejecting: time:setup.time-[0-9.]*/installed-[^[:space:]]* "
17 ++ "\\(constraint from command line flag requires ==99999\\)")