Skip to content

Commit

Permalink
Create regression tests for #1178
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 30, 2015
1 parent d53e112 commit 40ecd39
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<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 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,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)

0 comments on commit 40ecd39

Please sign in to comment.