Skip to content

Commit

Permalink
Merge branch 'i1178' of github.com:fsprojects/Paket
Browse files Browse the repository at this point in the history
  • Loading branch information
mavnn committed Oct 30, 2015
2 parents 7624ee4 + 40ecd39 commit 5777aab
Show file tree
Hide file tree
Showing 14 changed files with 155 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module Paket.IntegrationTests.FrameworkRestrictionsSpecs

open Fake
open Paket
open System
open NUnit.Framework
open FsUnit
open System
open System.IO
open Paket.Domain
open Paket.Requirements

[<Test>]
let ``#140 windsor should resolve framework dependent dependencies``() =
let lockFile = update "i000140-resolve-framework-restrictions"
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "TaskParallelLibrary"].Settings.FrameworkRestrictions
|> shouldEqual [FrameworkRestriction.Exactly(DotNetFramework(FrameworkVersion.V3_5))]
2 changes: 1 addition & 1 deletion integrationtests/Paket.IntegrationTests/GroupSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open System.Diagnostics

[<Test>]
let ``#1018 should resolve Newtonsoft.Json from two groups``() =
update "i001018-legacy-groups"
update "i001018-legacy-groups" |> ignore
let path = scenarioTempPath "i001018-legacy-groups"

File.Exists(Path.Combine(path,"packages","Newtonsoft.Json","Newtonsoft.Json.7.0.1.nupkg"))
Expand Down
2 changes: 1 addition & 1 deletion integrationtests/Paket.IntegrationTests/InitSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open System.Diagnostics

[<Test>]
let ``#1040 init should download release version of bootstrapper``() =
paket "init" "i001040-init-downloads-bootstrapper"
paket "init" "i001040-init-downloads-bootstrapper" |> ignore
let bootstrapperPath = Path.Combine(scenarioTempPath "i001040-init-downloads-bootstrapper",".paket","paket.bootstrapper.exe")

let productVersion = FileVersionInfo.GetVersionInfo(bootstrapperPath).ProductVersion
Expand Down
27 changes: 27 additions & 0 deletions integrationtests/Paket.IntegrationTests/OutdatedSpecs.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module Paket.IntegrationTests.OutdatedSpecs

open Fake
open System
open NUnit.Framework
open FsUnit
open System
open System.IO
open System.Diagnostics

[<Test>]
let ``#183 outdated without params``() =
let msg = paket "outdated" "i000183-outdated-with-special-parameters"
msg |> shouldContainText "Newtonsoft.Json 6.0.7 -> 6.0.8"
msg |> shouldContainText "FSharp.Formatting 2.4 ->"

[<Test>]
let ``#183 outdated --ignore-constraint``() =
let msg = paket "outdated --ignore-constraints" "i000183-outdated-with-special-parameters"
msg.Contains("Newtonsoft.Json 6.0.7 -> 6.0.8") |> shouldEqual false


[<Test>]
let ``#183 outdated --include-prereleases``() =
let msg = paket "outdated --include-prereleases" "i000183-outdated-with-special-parameters"
msg |> shouldContainText "Newtonsoft.Json 6.0.7 ->"
msg.Contains("Newtonsoft.Json 6.0.7 -> 6.0.8") |> shouldEqual false
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@
<Compile Include="AssemblyInfo.fs" />
<Compile Include="TestHelper.fs" />
<Compile Include="InitSpecs.fs" />
<Compile Include="OutdatedSpecs.fs" />
<Compile Include="GroupSpecs.fs" />
<Compile Include="FrameworkRestrictionsSpecs.fs" />
<Compile Include="UpdatePackageSpecs.fs" />
<Compile Include="BasicResolverSpecs.fs" />
<Compile Include="SemVerUpdateSpecs.fs" />
<Compile Include="ResolverSkipsConflictsFastSpecs.fs" />
Expand All @@ -102,6 +105,13 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="Paket.Tests.paket.targets" Condition="Exists('Paket.Tests.paket.targets')" />
<ItemGroup>
<ProjectReference Include="..\..\src\Paket.Core\Paket.Core.fsproj">
<Name>Paket.Core</Name>
<Project>{7bab0ae2-089f-4761-b138-a717aa2f86c5}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v2.0' Or $(TargetFrameworkVersion) == 'v3.0' Or $(TargetFrameworkVersion) == 'v3.5')">
<ItemGroup>
Expand Down Expand Up @@ -174,11 +184,4 @@
<Paket>True</Paket>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Paket.Core\Paket.Core.fsproj">
<Name>Paket.Core</Name>
<Project>{7bab0ae2-089f-4761-b138-a717aa2f86c5}</Project>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions integrationtests/Paket.IntegrationTests/SemVerUpdateSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open Paket.Domain

[<Test>]
let ``#1125 Should keep minor versions``() =
paket "update --keep-minor" "i001125-update-and-keep-minor"
paket "update --keep-minor" "i001125-update-and-keep-minor" |> ignore
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001125-update-and-keep-minor","paket.lock"))
let v = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version
v.Major |> shouldEqual 2u
Expand All @@ -20,15 +20,15 @@ let ``#1125 Should keep minor versions``() =

[<Test>]
let ``#1125 Should keep major versions``() =
paket "update --keep-major" "i001125-update-and-keep-minor"
paket "update --keep-major" "i001125-update-and-keep-minor" |> ignore
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001125-update-and-keep-minor","paket.lock"))
let v = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version
v.Major |> shouldEqual 2u
v.Minor |> shouldBeGreaterThan 4u

[<Test>]
let ``#1125 Should keep patch versions``() =
paket "update --keep-patch" "i001125-update-and-keep-minor"
paket "update --keep-patch" "i001125-update-and-keep-minor" |> ignore
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001125-update-and-keep-minor","paket.lock"))
let v = lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version
v.Major |> shouldEqual 2u
Expand Down
3 changes: 2 additions & 1 deletion integrationtests/Paket.IntegrationTests/TestHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ let paket command scenario =
if result.ExitCode <> 0 then
let errors = String.Join(Environment.NewLine,result.Errors)
failwith errors
String.Join(Environment.NewLine,result.Messages)

let update scenario =
paket "update" scenario
paket "update" scenario |> ignore
LockFile.LoadFrom(Path.Combine(scenarioTempPath scenario,"paket.lock"))

let updateShouldFindPackageConflict packageName scenario =
Expand Down
33 changes: 33 additions & 0 deletions integrationtests/Paket.IntegrationTests/UpdatePackageSpecs.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module Paket.IntegrationTests.UpdatePackageSpecs

open Fake
open System
open NUnit.Framework
open FsUnit
open System
open System.IO
open System.Diagnostics
open Paket
open Paket.Domain

[<Test>]
let ``#1178 update with Mircosoft.* filter``() =
paket "update nuget Microsoft.* --filter" "i001178-update-with-regex" |> ignore
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001178-update-with-regex","paket.lock"))
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Castle.Windsor"].Version
|> shouldEqual (SemVer.Parse "2.5.1")
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "NUnit"].Version
|> shouldEqual (SemVer.Parse "2.6.1")
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.AspNet.WebApi.SelfHost"].Version
|> shouldBeGreaterThan (SemVer.Parse "5.0.1")

[<Test>]
let ``#1178 update with [MN].* --filter``() =
paket "update nuget [MN].* --filter" "i001178-update-with-regex" |> ignore
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001178-update-with-regex","paket.lock"))
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Castle.Windsor"].Version
|> shouldEqual (SemVer.Parse "2.5.1")
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "NUnit"].Version
|> shouldBeGreaterThan (SemVer.Parse "2.6.1")
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.AspNet.WebApi.SelfHost"].Version
|> shouldBeGreaterThan (SemVer.Parse "5.0.1")
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
source http://nuget.org/api/v2

# Core Dependencies
nuget FParsec ~> 1.0.1
nuget FSharp.Core.Microsoft.Signed ~> 3.1.1
nuget MathNet.Numerics.FSharp ~> 3.2.1

# Development Dependencies
nuget FsUnit ~> 1.3

# Tools
nuget FAKE ~> 3.5
nuget NUnit.Runners ~> 2.6
nuget FSharp.Formatting !~> 2.4
nuget NuGet.CommandLine
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source http://nuget.org/api/v2

nuget FSharp.Formatting ~> 2.4
nuget Newtonsoft.Json ~> 6.0.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
NUGET
remote: http://nuget.org/api/v2
specs:
FSharp.Compiler.Service (1.4.2.1)
FSharp.Formatting (2.4)
FSharp.Compiler.Service (>= 0.0.20)
Microsoft.AspNet.Razor (>= 2.0.30506.0)
RazorEngine (>= 3.3.0)
Microsoft.AspNet.Razor (3.2.3)
Newtonsoft.Json (6.0.7)
RazorEngine (3.7.3)
Microsoft.AspNet.Razor (>= 3.0.0) - framework: >= net45
Microsoft.AspNet.Razor (2.0.30506.0) - framework: net40
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source https://nuget.org/api/v2

nuget Castle.Windsor
nuget NUnit
nuget Microsoft.AspNet.WebApi.SelfHost
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
NUGET
remote: https://nuget.org/api/v2
specs:
Castle.Core (3.3.3)
Castle.Windsor (2.5.1)
Castle.Core (>= 2.5.1)
Microsoft.AspNet.WebApi.Client (5.2.3)
Microsoft.Net.Http (>= 2.2.22) - framework: portable-wp80+win+net45+wp81+wpa81
Newtonsoft.Json (>= 6.0.4) - framework: portable-wp80+win+net45+wp81+wpa81, >= net45
Microsoft.AspNet.WebApi.Core (5.0.0)
Microsoft.AspNet.WebApi.Client (>= 5.0.0)
Microsoft.AspNet.WebApi.SelfHost (5.0.1)
Microsoft.AspNet.WebApi.Core (>= 5.0.0 < 5.1)
Microsoft.Bcl (1.1.10) - framework: portable-wp80+win+net45+wp81+wpa81
Microsoft.Bcl.Build (>= 1.0.14)
Microsoft.Bcl.Build (1.0.21) - import_targets: false, framework: portable-wp80+win+net45+wp81+wpa81
Microsoft.Net.Http (2.2.29) - framework: portable-wp80+win+net45+wp81+wpa81
Microsoft.Bcl (>= 1.1.10)
Microsoft.Bcl.Build (>= 1.0.14)
Newtonsoft.Json (7.0.1) - framework: portable-wp80+win+net45+wp81+wpa81, >= net45
NUnit (2.6.1)
6 changes: 3 additions & 3 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NUGET
GITHUB
remote: fsharp/FAKE
specs:
src/app/FakeLib/Globbing/Globbing.fs (0cedad490fa06bd072823b2215f3f05cf917a7ba)
src/app/FakeLib/Globbing/Globbing.fs (494c549c61dc15ab798b7b92cb4ac6e981267f49)
remote: fsprojects/Chessie
specs:
src/Chessie/ErrorHandling.fs (1f23b1caeb1f87e750abc96a25109376771dd090)
Expand All @@ -34,7 +34,7 @@ NUGET
GITHUB
remote: fsharp/FAKE
specs:
modules/Octokit/Octokit.fsx (0cedad490fa06bd072823b2215f3f05cf917a7ba)
modules/Octokit/Octokit.fsx (494c549c61dc15ab798b7b92cb4ac6e981267f49)
Octokit
GROUP Test
NUGET
Expand All @@ -45,4 +45,4 @@ NUGET
GITHUB
remote: forki/FsUnit
specs:
FsUnit.fs (81d27fd09575a32c4ed52eadb2eeac5f365b8348)
FsUnit.fs (2b809d33e4a06da78babd838abc817dd559c9c41)

0 comments on commit 5777aab

Please sign in to comment.