diff --git a/paket.dependencies b/paket.dependencies index 89975d660a..ee15ce3b6c 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -24,4 +24,5 @@ group Test nuget NUnit.Runners.Net4 nuget NUnit + nuget FSCheck github forki/FsUnit FsUnit.fs \ No newline at end of file diff --git a/paket.lock b/paket.lock index a6a5eb338f..73e1bd22a6 100644 --- a/paket.lock +++ b/paket.lock @@ -8,7 +8,7 @@ NUGET GITHUB remote: fsharp/FAKE specs: - src/app/FakeLib/Globbing/Globbing.fs (80516864689fcf46ed484d6ba2fcd8a32cfd8ac5) + src/app/FakeLib/Globbing/Globbing.fs (d9b4f58aa76d4a0990fff2ac18840a3e527f48c9) remote: fsprojects/Chessie specs: src/Chessie/ErrorHandling.fs (1f23b1caeb1f87e750abc96a25109376771dd090) @@ -16,14 +16,14 @@ GROUP Build NUGET remote: https://nuget.org/api/v2 specs: - FAKE (4.4.4) + FAKE (4.6.2) FSharp.Compiler.Service (0.0.90) FSharp.Formatting (2.11.0) FSharp.Compiler.Service (>= 0.0.90 <= 1.3) FSharpVSPowerTools.Core (1.9.0) FSharpVSPowerTools.Core (1.9.0) FSharp.Compiler.Service (>= 0.0.90) - ILRepack (2.0.5) + ILRepack (2.0.8) Microsoft.Bcl (1.1.10) Microsoft.Bcl.Build (>= 1.0.14) Microsoft.Bcl.Build (1.0.21) - import_targets: false @@ -35,12 +35,15 @@ NUGET GITHUB remote: fsharp/FAKE specs: - modules/Octokit/Octokit.fsx (80516864689fcf46ed484d6ba2fcd8a32cfd8ac5) + modules/Octokit/Octokit.fsx (d9b4f58aa76d4a0990fff2ac18840a3e527f48c9) Octokit GROUP Test NUGET remote: https://nuget.org/api/v2 specs: + FsCheck (2.1.0) + FSharp.Core (>= 3.1.2.5) + FSharp.Core (4.0.0.1) NUnit (2.6.4) NUnit.Runners.Net4 (2.6.4) GITHUB diff --git a/src/Paket.Core/Domain.fs b/src/Paket.Core/Domain.fs index 820d2f88c5..067ed55872 100644 --- a/src/Paket.Core/Domain.fs +++ b/src/Paket.Core/Domain.fs @@ -10,18 +10,24 @@ type PackageName = member this.GetCompareString() = match this with - | PackageName id -> id.ToLowerInvariant().Trim() + | PackageName id -> + match id with + | null -> "" + | _ -> id.ToLowerInvariant().Trim() override this.ToString() = match this with - | PackageName id -> id + | PackageName id -> + match id with + | null -> "" + | _ -> id override this.Equals(that) = match that with | :? PackageName as that -> this.GetCompareString() = that.GetCompareString() | _ -> false - override this.GetHashCode() = hash (this.GetCompareString()) + override this.GetHashCode() = hash (this.GetCompareString()) interface System.IComparable with member this.CompareTo that = @@ -40,18 +46,24 @@ type GroupName = member this.GetCompareString() = match this with - | GroupName id -> id.ToLowerInvariant().Trim() + | GroupName id -> + match id with + | null -> "" + | _ -> id.ToLowerInvariant().Trim() override this.ToString() = match this with - | GroupName id -> id + | GroupName id -> + match id with + | null -> "" + | _ -> id override this.Equals(that) = match that with | :? GroupName as that -> this.GetCompareString() = that.GetCompareString() | _ -> false - override this.GetHashCode() = hash (this.GetCompareString()) + override this.GetHashCode() = hash (this.GetCompareString()) interface System.IComparable with member this.CompareTo that = diff --git a/src/Paket.Core/FrameworkHandling.fs b/src/Paket.Core/FrameworkHandling.fs index 471ae81232..c4b6dc601a 100644 --- a/src/Paket.Core/FrameworkHandling.fs +++ b/src/Paket.Core/FrameworkHandling.fs @@ -88,8 +88,8 @@ type FrameworkIdentifier = override x.ToString() = match x with | DotNetFramework v -> "net" + v.ShortString() - | DNX v -> "dnx" + v.ShortString() - | DNXCore v -> "dnxcore" + v.ShortString() + | DNX v -> "dnx" + v.ShortString() + | DNXCore v -> "dnxcore" + v.ShortString() | MonoAndroid -> "monoandroid" | MonoTouch -> "monotouch" | MonoMac -> "monomac" @@ -98,7 +98,7 @@ type FrameworkIdentifier = | Windows v -> "win" + v | WindowsPhoneApp v -> "wp" + v | WindowsPhoneSilverlight v -> "wp" + v - | Silverlight v -> "sl" + v.Replace("v","").Replace(".","") + | Silverlight v -> "sl" + if String.IsNullOrWhiteSpace v then "" else v.Replace("v","").Replace(".","") // returns a list of compatible platforms that this platform also supports diff --git a/src/Paket.Core/LockFile.fs b/src/Paket.Core/LockFile.fs index d28d79edd7..3882a46bd2 100644 --- a/src/Paket.Core/LockFile.fs +++ b/src/Paket.Core/LockFile.fs @@ -57,6 +57,10 @@ module LockFileSerializer = | [] -> () | _ -> yield "FRAMEWORK: " + (String.Join(", ",options.Settings.FrameworkRestrictions)).ToUpper() for (source, _), packages in sources do + + if String.IsNullOrEmpty source then + failwith "Can't serialize empty source" + if not !hasReported then yield "NUGET" hasReported := true @@ -66,6 +70,8 @@ module LockFileSerializer = yield " specs:" for _,_,package in packages |> Seq.sortBy (fun (_,_,p) -> p.Name) do let (PackageName packageName) = package.Name + if String.IsNullOrEmpty packageName then + failwith "Can't serialize empty package name" let versionStr = let s = package.Version.ToString() @@ -84,6 +90,9 @@ module LockFileSerializer = yield sprintf " %s %s - %s" packageName versionStr s for (PackageName name),v,restrictions in package.Dependencies do + if String.IsNullOrEmpty name then + failwith "Can't serialize empty package name" + let versionStr = let s = v.ToString() if s = "" then s else "(" + s + ")" @@ -100,6 +109,7 @@ module LockFileSerializer = let updateHasReported = new List() [ for (owner,project,origin), files in files |> List.groupBy (fun f -> f.Owner, f.Project, f.Origin) do + match origin with | GitHubLink -> if not (updateHasReported.Contains(GitHubLink)) then @@ -107,6 +117,13 @@ module LockFileSerializer = updateHasReported.Remove (HttpLink "") |> ignore updateHasReported.Remove GistLink |> ignore updateHasReported.Add GitHubLink + + if String.IsNullOrEmpty owner || owner.Contains "/" || owner.Contains "\r" || owner.Contains "\n" then + failwithf "Can't serialize owner %s" owner + + if String.IsNullOrEmpty project || project.Contains "/" || project.Contains "\r" || project.Contains "\n" then + failwithf "Can't serialize project %s" project + yield sprintf " remote: %s/%s" owner project yield " specs:" | GistLink -> @@ -115,6 +132,13 @@ module LockFileSerializer = updateHasReported.Remove GitHubLink |> ignore updateHasReported.Remove (HttpLink "") |> ignore updateHasReported.Add GistLink + + if String.IsNullOrEmpty owner || owner.Contains "/" || owner.Contains "\r" || owner.Contains "\n" then + failwithf "Can't serialize owner %s" owner + + if String.IsNullOrEmpty project || project.Contains "/" || project.Contains "\r" || project.Contains "\n" then + failwithf "Can't serialize project %s" project + yield sprintf " remote: %s/%s" owner project yield " specs:" | HttpLink url -> @@ -123,12 +147,19 @@ module LockFileSerializer = updateHasReported.Remove GitHubLink |> ignore updateHasReported.Remove GistLink |> ignore updateHasReported.Add (HttpLink "") + if String.IsNullOrEmpty url || System.Uri.IsWellFormedUriString(url,UriKind.RelativeOrAbsolute) |> not then + failwithf "Can't serialize url: %s" url + yield sprintf " remote: " + url yield " specs:" for file in files |> Seq.sortBy (fun f -> f.Owner.ToLower(),f.Project.ToLower(),f.Name.ToLower()) do - let path = file.Name.TrimStart '/' + let path = + match file.Name with + | null -> "" + | name -> name.TrimStart '/' + match String.IsNullOrEmpty(file.Commit) with | false -> match file.AuthKey with @@ -208,7 +239,9 @@ module LockFileParser = let Parse(lockFileLines) = let remove textToRemove (source:string) = source.Replace(textToRemove, "") let removeBrackets = remove "(" >> remove ")" - ([{ GroupName = Constants.MainDependencyGroup; RepositoryType = None; RemoteUrl = None; Packages = []; SourceFiles = []; Options = InstallOptions.Default; LastWasPackage = false }], lockFileLines) + let startGroup = { GroupName = Constants.MainDependencyGroup; RepositoryType = None; RemoteUrl = None; Packages = []; SourceFiles = []; Options = InstallOptions.Default; LastWasPackage = false } + + ([startGroup], lockFileLines) ||> Seq.fold(fun state line -> match state with | [] -> failwithf "error" @@ -236,7 +269,7 @@ module LockFileParser = | Some remote -> let parts = details.Split([|" - "|],StringSplitOptions.None) let parts' = parts.[0].Split ' ' - let version = parts'.[1] |> removeBrackets + let version = if parts'.Length < 2 then "" else parts'.[1] |> removeBrackets let optionsString = if parts.Length < 2 then "" else if parts.[1] <> "" && parts.[1].Contains(":") |> not then @@ -257,13 +290,13 @@ module LockFileParser = | NugetDependency (name, v) -> let parts = v.Split([|" - "|],StringSplitOptions.None) let version = parts.[0] - if currentGroup.LastWasPackage then + if currentGroup.LastWasPackage then match currentGroup.Packages with | currentPackage :: otherPackages -> { currentGroup with Packages = { currentPackage with Dependencies = Set.add (PackageName name, DependenciesFileParser.parseVersionRequirement version, []) currentPackage.Dependencies - } :: otherPackages } ::otherGroups + } :: otherPackages } ::otherGroups | [] -> failwithf "cannot set a dependency to %s %s - no package has been specified." name v else match currentGroup.SourceFiles with @@ -272,8 +305,8 @@ module LockFileParser = SourceFiles = { currentFile with Dependencies = Set.add (PackageName name, VersionRequirement.AllReleases) currentFile.Dependencies - } :: rest } ::otherGroups - | [] -> failwith "cannot set a dependency to %s %s- no remote file has been specified." name v + } :: rest } ::otherGroups + | [] -> failwithf "cannot set a dependency to %s %s - no remote file has been specified." name v | SourceFile(origin, details) -> match origin with | GitHubLink | GistLink -> @@ -281,10 +314,10 @@ module LockFileParser = | Some [| owner; project |] -> let path, commit, authKey = match details.Split ' ' with - | [| filePath; commit; authKey |] -> filePath, commit |> removeBrackets, (Some authKey) - | [| filePath; commit |] -> filePath, commit |> removeBrackets, None - | _ -> failwith "invalid file source details." - { currentGroup with + | [| filePath; commit; authKey |] -> filePath, commit |> removeBrackets, (Some authKey) + | [| filePath; commit |] -> filePath, commit |> removeBrackets, None + | _ -> failwithf "invalid file source details: %s" details + { currentGroup with LastWasPackage = false SourceFiles = { Commit = commit Owner = owner @@ -439,9 +472,12 @@ type LockFile(fileName:string,groups: Map) = override __.ToString() = String.Join (Environment.NewLine, - [|let mainGroup = groups.[Constants.MainDependencyGroup] - yield LockFileSerializer.serializePackages mainGroup.Options mainGroup.Resolution - yield LockFileSerializer.serializeSourceFiles mainGroup.RemoteFiles + [|match groups |> Map.tryFind Constants.MainDependencyGroup with + | Some mainGroup -> + yield LockFileSerializer.serializePackages mainGroup.Options mainGroup.Resolution + yield LockFileSerializer.serializeSourceFiles mainGroup.RemoteFiles + | None -> () + for g in groups do if g.Key <> Constants.MainDependencyGroup then yield "GROUP " + g.Value.Name.ToString() diff --git a/src/Paket.Core/Requirements.fs b/src/Paket.Core/Requirements.fs index fb1e5d3574..b60f023840 100644 --- a/src/Paket.Core/Requirements.fs +++ b/src/Paket.Core/Requirements.fs @@ -253,8 +253,8 @@ type InstallSettings = | Some x -> yield "version_in_path: " + x.ToString().ToLower() | None -> () match this.ReferenceCondition with - | Some x -> yield "condition: " + x.ToUpper() - | None -> () + | Some x when x <> null -> yield "condition: " + x.ToUpper() + | _ -> () match this.CreateBindingRedirects with | Some true -> yield "redirects: on" | Some false -> yield "redirects: off" diff --git a/src/Paket.Core/SemVer.fs b/src/Paket.Core/SemVer.fs index 5365de3aea..749ab10d74 100644 --- a/src/Paket.Core/SemVer.fs +++ b/src/Paket.Core/SemVer.fs @@ -86,11 +86,11 @@ type PreRelease = [] type SemVerInfo = { /// MAJOR version when you make incompatible API changes. - Major : int + Major : uint32 /// MINOR version when you add functionality in a backwards-compatible manner. - Minor : int + Minor : uint32 /// PATCH version when you make backwards-compatible bug fixes. - Patch : int + Patch : uint32 /// The optional PreRelease version PreRelease : PreRelease option /// The optional build no. @@ -103,7 +103,7 @@ type SemVerInfo = let build = if String.IsNullOrEmpty x.Build |> not && x.Build <> "0" then "." + x.Build else "" - + let pre = match x.PreRelease with | Some preRelease -> sprintf "-%s" preRelease.Origin @@ -113,8 +113,8 @@ type SemVerInfo = override x.ToString() = match x.Original with - | Some version -> version.Trim() - | None -> x.Normalize() + | Some version when version <> null -> version.Trim() + | _ -> x.Normalize() member x.AsString with get() = x.ToString() @@ -161,7 +161,7 @@ module SemVer = /// sanity check to make sure that all of the integers in the string are positive. /// because we use raw substrings with dashes this is very complex :( - version.Split([|'.'|]) |> Array.iter (fun s -> match Int32.TryParse s with | true, s when s < 0 -> failwith "no negatives!" | _ -> ignore ()) + version.Split([|'.'|]) |> Array.iter (fun s -> match Int32.TryParse s with | true, s when s < 0 -> failwithf "no negative versions allowed: %s" version | _ -> ignore ()) if version.Contains("!") then failwithf "Invalid character found in %s" version @@ -171,7 +171,7 @@ module SemVer = let firstDash = version.IndexOf("-") let plusIndex = version.IndexOf("+") - let majorMinorPatch = + let majorMinorPatch = let firstSigil = if firstDash > 0 then firstDash else plusIndex match firstSigil with | -1 -> version @@ -181,7 +181,7 @@ module SemVer = match firstDash, plusIndex with | -1, _ -> "" | d, p when p = -1 -> version.Substring(d+1) - | d, p -> version.Substring(d+1, (version.Length - 1 - p) ) + | d, p -> version.Substring(d+1, (version.Length - 1 - p) ) /// there can only be one piece of build metadata, and it is signified by a + and then any number of dot-separated alphanumeric groups. /// this just greedily takes the whole remaining string :( @@ -192,12 +192,15 @@ module SemVer = | n -> version.Substring(plusIndex + 1) let major, minor, patch, build = - match majorMinorPatch.Split([|'.'|]) with - | [|M; m; p; b|] -> int M, int m, int p, b - | [|M; m; p; |] -> int M, int m, int p, "0" - | [|M; m;|] -> int M, int m, 0, "0" - | [|M;|] -> int M, 0, 0, "0" - | _ -> 0, 0, 0, "0" + try + match majorMinorPatch.Split([|'.'|]) with + | [|M; m; p; b|] -> uint32 M, uint32 m, uint32 p, b + | [|M; m; p; |] -> uint32 M, uint32 m, uint32 p, "0" + | [|M; m;|] -> uint32 M, uint32 m, 0u, "0" + | [|M;|] -> uint32 M, 0u, 0u, "0" + | _ -> 0u, 0u, 0u, "0" + with + | _ -> 0u, 0u, 0u, "0" { Major = major Minor = minor diff --git a/src/Paket.Core/Utils.fs b/src/Paket.Core/Utils.fs index e816328691..3de33eae7c 100644 --- a/src/Paket.Core/Utils.fs +++ b/src/Paket.Core/Utils.fs @@ -356,7 +356,9 @@ module String = Some (input.Substring(prefix.Length)) else None - let quoted(text:string) = (if text.Contains(" ") then "\"" + text + "\"" else text) + let inline quoted(text:string) = + if String.IsNullOrEmpty text then "" else + if text.Contains(" ") then "\"" + text + "\"" else text // MonadPlus - "or else" let inline (++) x y = diff --git a/src/Paket.Core/VersionRange.fs b/src/Paket.Core/VersionRange.fs index 7cee6dd958..29316f062e 100644 --- a/src/Paket.Core/VersionRange.fs +++ b/src/Paket.Core/VersionRange.fs @@ -15,12 +15,12 @@ type PreReleaseStatus = | Concrete of string list /// Represents version information. -type VersionRange = +type VersionRange = | Minimum of SemVerInfo | GreaterThan of SemVerInfo | Maximum of SemVerInfo | LessThan of SemVerInfo - | Specific of SemVerInfo + | Specific of SemVerInfo | OverrideAll of SemVerInfo | Range of fromB : VersionRangeBound * from : SemVerInfo * _to : SemVerInfo * _toB : VersionRangeBound diff --git a/tests/Paket.Tests/Lockfile/PropertyTests.fs b/tests/Paket.Tests/Lockfile/PropertyTests.fs new file mode 100644 index 0000000000..47aee88d28 --- /dev/null +++ b/tests/Paket.Tests/Lockfile/PropertyTests.fs @@ -0,0 +1,34 @@ +module Paket.LockFile.PropertyTests + +open System +open System.Collections.Generic +open NUnit.Framework +open FsCheck +open Paket + +type Generators = + static member BigInt() = + { new Arbitrary() with + override x.Generator = Arb.generate |> Gen.map (fun x -> bigint x) } + +let removeLineBreaks (text:string) = text.Replace("\r","").Replace("\n","") + +let serializeAndParseLockFile (lockfile : LockFile) = + let serialized, text1 = + try + true, lockfile.ToString() + with _ -> false, "" + if not serialized then true + else + let parsed = LockFile.Parse(lockfile.FileName, text1.Replace("\r\n", "\n").Replace("\r", "\n").Split('\n')) + let text2 = parsed.ToString() + if removeLineBreaks text2 <> removeLineBreaks text1 then + printfn "%s" text1 + printfn "%s" text2 + false + else true + +[][] +let ``serializing and parsing lockfile should give same lockfile`` () = + Arb.register() |> ignore + Check.QuickThrowOnFailure serializeAndParseLockFile \ No newline at end of file diff --git a/tests/Paket.Tests/Paket.Tests.fsproj b/tests/Paket.Tests/Paket.Tests.fsproj index a9721aafc3..36ff2a619a 100644 --- a/tests/Paket.Tests/Paket.Tests.fsproj +++ b/tests/Paket.Tests/Paket.Tests.fsproj @@ -222,6 +222,7 @@ + @@ -309,6 +310,7 @@ + @@ -324,11 +326,49 @@ + + + + + ..\..\packages\test\FsCheck\lib\net45\FsCheck.dll + True + True + + + + + + + ..\..\packages\test\FsCheck\lib\portable-net45+netcore45\FsCheck.dll + True + True + + + + + + + ..\..\packages\test\FsCheck\lib\portable-net45+netcore45+wp8\FsCheck.dll + True + True + + + + + + + ..\..\packages\test\FsCheck\lib\portable-net45+netcore45+wpa81+wp8\FsCheck.dll + True + True + + + + - ..\..\packages\FSharp.Core\lib\net20\FSharp.Core.dll + ..\..\packages\test\FSharp.Core\lib\net20\FSharp.Core.dll True True @@ -337,7 +377,7 @@ - ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll + ..\..\packages\test\FSharp.Core\lib\net40\FSharp.Core.dll True True @@ -346,7 +386,7 @@ - ..\..\packages\FSharp.Core\lib\portable-net45+netcore45\FSharp.Core.dll + ..\..\packages\test\FSharp.Core\lib\portable-net45+netcore45\FSharp.Core.dll True True @@ -355,7 +395,7 @@ - ..\..\packages\FSharp.Core\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll + ..\..\packages\test\FSharp.Core\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll True True @@ -364,7 +404,7 @@ - ..\..\packages\FSharp.Core\lib\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\packages\test\FSharp.Core\lib\portable-net45+sl5+netcore45\FSharp.Core.dll True True @@ -373,7 +413,7 @@ - ..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wp8\FSharp.Core.dll + ..\..\packages\test\FSharp.Core\lib\portable-net45+netcore45+wp8\FSharp.Core.dll True True @@ -382,7 +422,7 @@ - ..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll + ..\..\packages\test\FSharp.Core\lib\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll True True diff --git a/tests/Paket.Tests/SemVerSpecs.fs b/tests/Paket.Tests/SemVerSpecs.fs index 70491ea685..5d373e6c72 100644 --- a/tests/Paket.Tests/SemVerSpecs.fs +++ b/tests/Paket.Tests/SemVerSpecs.fs @@ -17,8 +17,8 @@ let ``can parse semver strings and print the result``() = (SemVer.Parse "6.0.1302.0-Preview").PreRelease |> shouldEqual (PreRelease.TryParse "Preview") (SemVer.Parse "1.2.3").ToString() |> shouldEqual "1.2.3" (SemVer.Parse "1.2.3.0").ToString() |> shouldEqual "1.2.3.0" - (SemVer.Parse "1.2.3.0").Patch |> shouldEqual 3 - (SemVer.Parse "1.2.3").Patch |> shouldEqual 3 + (SemVer.Parse "1.2.3.0").Patch |> shouldEqual 3u + (SemVer.Parse "1.2.3").Patch |> shouldEqual 3u (SemVer.Parse "1.2.3.0").Build |> shouldEqual "0" (SemVer.Parse "1.2.3").Build |> shouldEqual "0" (SemVer.Parse "3.1.1.1").Build |> shouldEqual "1" @@ -28,9 +28,9 @@ let ``can parse semver strings and print the result``() = [] let ``can parse semver strings``() = let semVer = SemVer.Parse("1.2.3-alpha.beta") - semVer.Major |> shouldEqual 1 - semVer.Minor |> shouldEqual 2 - semVer.Patch |> shouldEqual 3 + semVer.Major |> shouldEqual 1u + semVer.Minor |> shouldEqual 2u + semVer.Patch |> shouldEqual 3u semVer.PreRelease |> shouldEqual (Some { Origin = "alpha.beta" Name = "alpha" Values = [ PreReleaseSegment.AlphaNumeric "alpha"; PreReleaseSegment.AlphaNumeric "beta" ] }) @@ -38,9 +38,9 @@ let ``can parse semver strings``() = [] let ``can parse MBrace semver strings``() = let semVer = SemVer.Parse("0.9.8-alpha") - semVer.Major |> shouldEqual 0 - semVer.Minor |> shouldEqual 9 - semVer.Patch |> shouldEqual 8 + semVer.Major |> shouldEqual 0u + semVer.Minor |> shouldEqual 9u + semVer.Patch |> shouldEqual 8u semVer.PreRelease |> shouldEqual (Some { Origin = "alpha" Name = "alpha" Values = [ PreReleaseSegment.AlphaNumeric "alpha" ] }) @@ -175,9 +175,9 @@ let ``numeric pre-release identifiers exhibit correct (numeric) precedence (SemV [] let ``should accept SemVer2 prereleases`` () = let semVer = SemVer.Parse("1.0.0+foobar") - semVer.Major |> shouldEqual 1 - semVer.Minor |> shouldEqual 0 - semVer.Patch |> shouldEqual 0 + semVer.Major |> shouldEqual 1u + semVer.Minor |> shouldEqual 0u + semVer.Patch |> shouldEqual 0u semVer.BuildMetaData |> shouldEqual "foobar" semVer.PreRelease |> shouldEqual None diff --git a/tests/Paket.Tests/app.config b/tests/Paket.Tests/app.config new file mode 100644 index 0000000000..bacaa4adb1 --- /dev/null +++ b/tests/Paket.Tests/app.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tests/Paket.Tests/paket.references b/tests/Paket.Tests/paket.references index 700180e5d7..28b6df9308 100644 --- a/tests/Paket.Tests/paket.references +++ b/tests/Paket.Tests/paket.references @@ -1,6 +1,5 @@ -FSharp.Core - group Test NUnit NUnit.Runners.Net4 + FSCheck File:FsUnit.fs .