@@ -2,16 +2,20 @@ import Test.Cabal.Prelude
2
2
3
3
-- Test that unqualified command line constraints do not constrain setup
4
4
-- 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
+
8
11
cabal " new-build" [" time" , " --constraint=time==99999" , " --dry-run" ]
9
12
10
13
-- Temporarily disabled recording here because output is not stable
11
14
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
0 commit comments