Skip to content
Snippets Groups Projects
Commit 2b197f8e authored by kristenk's avatar kristenk
Browse files

Update regression test for issue #4154 after the fix for issue #415.

This commit addresses the comments in PR #5183.
parent 87c05e60
No related branches found
No related tags found
No related merge requests found
# cabal update
Downloading the latest package list from test-local-repo
# cabal new-build # cabal new-build
Resolving dependencies... Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1 Build profile: -w ghc-<GHCVER> -O1
......
...@@ -2,16 +2,20 @@ import Test.Cabal.Prelude ...@@ -2,16 +2,20 @@ import Test.Cabal.Prelude
-- Test that unqualified command line constraints do not constrain setup -- Test that unqualified command line constraints do not constrain setup
-- dependencies. cabal should be able to install the local time-99999 by -- dependencies. cabal should be able to install the local time-99999 by
-- building its setup script with the installed time, even though the installed -- building its setup script with the installed Cabal, which depends on the
-- time doesn't fit the constraint. -- installed time, even though the installed time doesn't fit the constraint.
main = cabalTest $ withRepo "repo" $ do main = cabalTest $ do
-- TODO: Run this test on Windows once #5187 is resolved.
skipIf =<< isWindows
cabal "new-build" ["time", "--constraint=time==99999", "--dry-run"] cabal "new-build" ["time", "--constraint=time==99999", "--dry-run"]
-- Temporarily disabled recording here because output is not stable -- Temporarily disabled recording here because output is not stable
recordMode DoNotRecord $ do recordMode DoNotRecord $ do
r <- fails $ cabal' "new-build" ["time", "--constraint=any.time==99999", "--constraint=setup.Cabal installed", "--dry-run"] -- Constraining all uses of 'time' fails because the installed 'time'
-- Constraining all uses of 'time' originally resulted in a cyclic dependency -- doesn't fit the constraint.
-- between 'Cabal' and the new 'time': r <- fails $ cabal' "new-build" ["time", "--constraint=any.time==99999", "--dry-run"]
-- assertOutputContains "cyclic dependencies; conflict set: time:setup.Cabal, time:setup.time" r assertRegex "Expected cabal to reject the setup dependency on the installed time"
-- However, this doesn't work anymore, so instead we more directly look for: ("rejecting: time:setup.time-[0-9.]*/installed-[^[:space:]]* "
assertOutputContains "time:setup.time~>time-99999 (conflict: time:setup.Cabal" r ++ "\\(constraint from command line flag requires ==99999\\)")
r
name: Cabal
version: 99999
cabal-version: >=1.8
build-type: Simple
library
build-depends: base, time
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment