Skip to content

Commit

Permalink
Merge pull request #7793 from ptkato/init-dependency-test-fix
Browse files Browse the repository at this point in the history
Make the deps' test for `cabal init` ignore unspecified versions
  • Loading branch information
Mikolaj authored Nov 27, 2021
2 parents 68c2c75 + 067997b commit 6492a46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,8 @@ nonInteractiveTests pkgIx srcDb comp = testGroup "Check top level getter functio
[ testSimple "base version bounds is correct"
(fmap
(flip foldl' anyVersion $ \a (Dependency n v _) ->
if unPackageName n == "base" then v else a)
if unPackageName n == "base" && baseVersion comp /= anyVersion
then v else a)
. (\x -> dependenciesHeuristics x "" pkgIx))
(baseVersion comp)
[ "True"
Expand Down
30 changes: 0 additions & 30 deletions cabal-install/tests/UnitTests/Distribution/Client/Init/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,44 +62,14 @@ baseVersion _ = anyVersion
baseVersion' :: String -> [Int]
baseVersion' "9.0.1" = [4,15,0,0]
baseVersion' "8.10.4" = [4,14,1,0]
baseVersion' "8.10.3" = [4,14,1,0]
baseVersion' "8.10.2" = [4,14,1,0]
baseVersion' "8.10.1" = [4,14,0,0]
baseVersion' "8.8.4" = [4,13,0,0]
baseVersion' "8.8.3" = [4,13,0,0]
baseVersion' "8.8.2" = [4,13,0,0]
baseVersion' "8.8.1" = [4,13,0,0]
baseVersion' "8.6.5" = [4,12,0,0]
baseVersion' "8.6.4" = [4,12,0,0]
baseVersion' "8.6.3" = [4,12,0,0]
baseVersion' "8.6.2" = [4,12,0,0]
baseVersion' "8.6.1" = [4,12,0,0]
baseVersion' "8.4.4" = [4,11,1,0]
baseVersion' "8.4.3" = [4,11,1,0]
baseVersion' "8.4.2" = [4,11,1,0]
baseVersion' "8.4.1" = [4,11,0,0]
baseVersion' "8.2.2" = [4,10,1,0]
baseVersion' "8.2.1" = [4,10,0,0]
baseVersion' "8.0.2" = [4,10,0,0]
baseVersion' "8.0.1" = [4,9,1,0]
baseVersion' "7.10.3" = [4,9,0,0]
baseVersion' "7.10.2" = [4,8,2,0]
baseVersion' "7.10.1" = [4,8,1,0]
baseVersion' "7.8.4" = [4,8,0,0]
baseVersion' "7.8.3" = [4,7,0,2]
baseVersion' "7.8.2" = [4,7,0,1]
baseVersion' "7.8.1" = [4,7,0,0]
baseVersion' "7.6.3" = [4,7,0,0]
baseVersion' "7.6.2" = [4,6,0,1]
baseVersion' "7.6.1" = [4,6,0,0]
baseVersion' "7.4.2" = [4,5,1,0]
baseVersion' "7.4.1" = [4,5,0,0]
baseVersion' "7.2.2" = [4,4,1,0]
baseVersion' "7.2.1" = [4,4,0,0]
baseVersion' "7.0.4" = [4,3,1,0]
baseVersion' "7.0.3" = [4,3,1,0]
baseVersion' "7.0.2" = [4,3,1,0]
baseVersion' "7.0.1" = [4,3,0,0]
baseVersion' _ = []

-- -------------------------------------------------------------------- --
Expand Down

0 comments on commit 6492a46

Please sign in to comment.