Skip to content

Commit

Permalink
Merge branch 'master' 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 5777aab + d8e7167 commit 27f7f2f
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 1 deletion.
1 change: 1 addition & 0 deletions .paket/paket.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath)</PaketBootStrapperCommand>
<!-- Commands -->
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="!Exists('$(PaketReferences)')">$(MSBuildStartupDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences>
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand>
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand>
Expand Down
19 changes: 19 additions & 0 deletions integrationtests/Paket.IntegrationTests/AddSpecs.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Paket.IntegrationTests.AddSpecs

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

[<Test>]
let ``#310 paket add nuget should not resolve inconsistent dependency graph``() =
try
paket "add nuget Castle.Windsor version 3.3.0" "i000310-add-should-not-create-invalid-resolution" |> ignore
failwith "resolver error expected"
with
| exn when exn.Message.Contains("There was a version conflict during package resolution") -> ()
30 changes: 30 additions & 0 deletions integrationtests/Paket.IntegrationTests/BasicResolverSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,36 @@ let ``#173 should resolve primary dependency optimistic``() =
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FSharp.Formatting"].Version
|> shouldEqual (SemVer.Parse "2.12.0")

[<Test>]
let ``#220 should respect the == operator``() =
let lockFile = update "i000220-use-exactly-this-constraint"
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Microsoft.AspNet.Razor"].Version
|> shouldEqual (SemVer.Parse "2.0.30506.0")

[<Test>]
let ``#263 should respect SemVer prereleases``() =
let lockFile = update "i000263-semver-prereleases"
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Ninject"].Version
|> shouldEqual (SemVer.Parse "3.2.3-unstable-001")

[<Test>]
let ``#299 should restore package ending in lib``() =
let lockFile = update "i000299-restore-package-that-ends-in-lib"
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "FunScript.TypeScript.Binding.lib"].Version
|> shouldBeGreaterThan (SemVer.Parse "0")

Directory.Exists(Path.Combine(scenarioTempPath "i000299-restore-package-that-ends-in-lib","packages","FunScript.TypeScript.Binding.lib"))
|> shouldEqual true

[<Test>]
let ``#359 should restore package with nuget in name``() =
let lockFile = update "i000359-packagename-contains-nuget"
lockFile.Groups.[Constants.MainDependencyGroup].Resolution.[PackageName "Nuget.CommandLine"].Version
|> shouldBeGreaterThan (SemVer.Parse "0")

Directory.Exists(Path.Combine(scenarioTempPath "i000359-packagename-contains-nuget","packages","NuGet.CommandLine"))
|> shouldEqual true

[<Test>]
let ``#1177 should resolve with pessimistic strategy correctly``() =
let lockFile = update "i001177-resolve-with-pessimistic-strategy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
<Compile Include="GroupSpecs.fs" />
<Compile Include="FrameworkRestrictionsSpecs.fs" />
<Compile Include="UpdatePackageSpecs.fs" />
<Compile Include="AddSpecs.fs" />
<Compile Include="OutdatedSpecs.fs" />
<Compile Include="GroupSpecs.fs" />
<Compile Include="FrameworkRestrictionsSpecs.fs" />
<Compile Include="BasicResolverSpecs.fs" />
<Compile Include="SemVerUpdateSpecs.fs" />
<Compile Include="ResolverSkipsConflictsFastSpecs.fs" />
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions integrationtests/Paket.IntegrationTests/TestHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ let paket command scenario =
info.Arguments <- command) (System.TimeSpan.FromMinutes 5.)
if result.ExitCode <> 0 then
let errors = String.Join(Environment.NewLine,result.Errors)
printfn "%s" <| String.Join(Environment.NewLine,result.Messages)
failwith errors
String.Join(Environment.NewLine,result.Messages)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source http://nuget.org/api/v2

nuget FAKE
nuget FSharp.Compiler.Service
nuget CommandLineParser 1.9.71
nuget Microsoft.AspNet.Razor == 2.0.30506.0
nuget RazorEngine.N 3.5.0
nuget NUnit
nuget NUnit.Runners
nuget NuGet.CommandLine
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source http://nuget.org/api/v2

nuget Ninject == 3.2.3-unstable-001
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source http://nuget.org/api/v2

nuget FunScript.TypeScript.Binding.lib
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source http://nuget.org/api/v2

nuget Castle.Core >= 3.2 < 3.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NUGET
remote: http://nuget.org/api/v2
specs:
Castle.Core (3.2.2)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source http://nuget.org/api/v2

nuget nuget.CommandLine
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<Compile Include="EnvWebProxyShould.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.paket\paket.targets" />
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
Expand All @@ -57,4 +58,4 @@
<Paket>True</Paket>
</Reference>
</ItemGroup>
</Project>
</Project>

0 comments on commit 27f7f2f

Please sign in to comment.