Skip to content

Commit 0d43277

Browse files
authored
Merge pull request #5186 from grayjay/update-T4154
Update regression test for issue #4154 after the fix for issue #415.
2 parents d19f0ed + 2b197f8 commit 0d43277

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

cabal-testsuite/PackageTests/Regression/T4154/install-time-with-constraint.out

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# cabal update
2-
Downloading the latest package list from test-local-repo
31
# cabal new-build
42
Resolving dependencies...
53
Build profile: -w ghc-<GHCVER> -O1

cabal-testsuite/PackageTests/Regression/T4154/install-time-with-constraint.test.hs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ import Test.Cabal.Prelude
22

33
-- Test that unqualified command line constraints do not constrain setup
44
-- dependencies. cabal should be able to install the local time-99999 by
5-
-- building its setup script with the installed time, even though the installed
6-
-- time doesn't fit the constraint.
7-
main = cabalTest $ withRepo "repo" $ do
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+
-- TODO: Run this test on Windows once #5187 is resolved.
9+
skipIf =<< isWindows
10+
811
cabal "new-build" ["time", "--constraint=time==99999", "--dry-run"]
912

1013
-- Temporarily disabled recording here because output is not stable
1114
recordMode DoNotRecord $ do
12-
r <- fails $ cabal' "new-build" ["time", "--constraint=any.time==99999", "--constraint=setup.Cabal installed", "--dry-run"]
13-
-- Constraining all uses of 'time' originally resulted in a cyclic dependency
14-
-- between 'Cabal' and the new 'time':
15-
-- assertOutputContains "cyclic dependencies; conflict set: time:setup.Cabal, time:setup.time" r
16-
-- However, this doesn't work anymore, so instead we more directly look for:
17-
assertOutputContains "time:setup.time~>time-99999 (conflict: time:setup.Cabal" r
15+
-- Constraining all uses of 'time' fails because the installed 'time'
16+
-- doesn't fit the constraint.
17+
r <- fails $ cabal' "new-build" ["time", "--constraint=any.time==99999", "--dry-run"]
18+
assertRegex "Expected cabal to reject the setup dependency on the installed time"
19+
("rejecting: time:setup.time-[0-9.]*/installed-[^[:space:]]* "
20+
++ "\\(constraint from command line flag requires ==99999\\)")
21+
r

cabal-testsuite/PackageTests/Regression/T4154/repo/Cabal-99999/Cabal.cabal

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)