diff --git a/cabal-testsuite/PackageTests/Regression/T4154/cabal.project b/cabal-testsuite/PackageTests/Regression/T4154/cabal.project new file mode 100644 index 00000000000..e6fdbadb439 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4154/cabal.project @@ -0,0 +1 @@ +packages: . diff --git a/cabal-testsuite/PackageTests/Regression/T4154/install-time-with-constraint.test.hs b/cabal-testsuite/PackageTests/Regression/T4154/install-time-with-constraint.test.hs new file mode 100644 index 00000000000..11074178310 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4154/install-time-with-constraint.test.hs @@ -0,0 +1,8 @@ +import Test.Cabal.Prelude + +-- Test that unqualified command line constraints do not constrain setup +-- dependencies. cabal should be able to install the local time-99999 by +-- building its setup script with the installed time, even though the installed +-- time doesn't fit the constraint. +main = cabalTest $ withRepo "repo" $ + cabal "new-build" ["time", "--constraint=time==99999", "--dry-run"] diff --git a/cabal-testsuite/PackageTests/Regression/T4154/repo/Cabal-99999/Cabal.cabal b/cabal-testsuite/PackageTests/Regression/T4154/repo/Cabal-99999/Cabal.cabal new file mode 100644 index 00000000000..2742fc2fc55 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4154/repo/Cabal-99999/Cabal.cabal @@ -0,0 +1,7 @@ +name: Cabal +version: 99999 +cabal-version: >=1.8 +build-type: Simple + +library + build-depends: base, time diff --git a/cabal-testsuite/PackageTests/Regression/T4154/time.cabal b/cabal-testsuite/PackageTests/Regression/T4154/time.cabal new file mode 100644 index 00000000000..ad72efcdae9 --- /dev/null +++ b/cabal-testsuite/PackageTests/Regression/T4154/time.cabal @@ -0,0 +1,10 @@ +name: time +version: 99999 +cabal-version: >=1.8 +build-type: Custom + +custom-setup + setup-depends: base, Cabal == 99999 + +library + build-depends: base