From ac40c1703b3c35bcdb1d615132125234819cc1fa Mon Sep 17 00:00:00 2001 From: voiceofwisdom Date: Wed, 11 Nov 2015 09:40:10 -0600 Subject: [PATCH] Added handling for [2.2,) version ranges. --- src/Paket.Core/VersionRange.fs | 1 + tests/Paket.Tests/NugetVersionRangeParserSpecs.fs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Paket.Core/VersionRange.fs b/src/Paket.Core/VersionRange.fs index 9530c952df..a8239d4175 100644 --- a/src/Paket.Core/VersionRange.fs +++ b/src/Paket.Core/VersionRange.fs @@ -174,6 +174,7 @@ type VersionRequirement = match fromB, toB with | VersionRangeBound.Excluding, VersionRangeBound.Excluding -> GreaterThan(versions.[0]) | VersionRangeBound.Including, VersionRangeBound.Including -> Minimum(versions.[0]) + | VersionRangeBound.Including, VersionRangeBound.Excluding -> Minimum(versions.[0]) | _ -> failParse() | _ -> failParse() diff --git a/tests/Paket.Tests/NugetVersionRangeParserSpecs.fs b/tests/Paket.Tests/NugetVersionRangeParserSpecs.fs index 8b853378e3..9fceee31c0 100644 --- a/tests/Paket.Tests/NugetVersionRangeParserSpecs.fs +++ b/tests/Paket.Tests/NugetVersionRangeParserSpecs.fs @@ -53,13 +53,15 @@ let ``can detect range version``() = [] let ``can detect open range version``() = + parseRange "[2.2,)" + |> shouldEqual (VersionRange.Minimum (SemVer.Parse "2.2")) parseRange "[2.2,]" |> shouldEqual (VersionRange.Minimum (SemVer.Parse "2.2")) parseRange "[2.2, ]" |> shouldEqual (VersionRange.Minimum (SemVer.Parse "2.2")) parseRange "[,2.2]" |> shouldEqual (VersionRange.Maximum (SemVer.Parse "2.2")) - + [] let ``can detect "null" version``() = VersionRequirement.Parse "null"