Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add failing test
  • Loading branch information
enricosada committed May 24, 2019
commit 9e572da94ba88d6e4f54db31c5fadaae8d7ebe0a
30 changes: 30 additions & 0 deletions integrationtests/Paket.IntegrationTests/PackSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,36 @@ let ``#4003 dotnet pack of a global tool with p2p``() =
nuspec.Dependencies.Value.Length
|> shouldEqual 0


[<Test>]
let ``#4004 dotnet pack using different versions``() =
let project = "lib1"
let scenario = "i004004-pack-version"
prepareSdk scenario

let rootPath = scenarioTempPath scenario

directPaket ("restore") scenario

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the parentheses.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

|> ignore

let pack outDir additionalArgs expectedVersion =
let outPath = Path.Combine(rootPath, outDir)

directDotnet true (sprintf "pack -o \"%s\" %s" outPath additionalArgs) rootPath
|> ignore

let nupkgPath = Path.Combine(outPath, sprintf "%s.%s.nupkg" project expectedVersion)
if File.Exists nupkgPath |> not then Assert.Fail(sprintf "Expected '%s' to exist" nupkgPath)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could have used Assert.True here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


pack "out1" "" "1.0.0"
pack "out1" "/p:Version=1.2.3" "1.2.3"
pack "out2" "/p:Version=2.3.4" "2.3.4"


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines seem a bit off.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done





[<Test>]
let ``#4010-pack-template-only``() =
let scenario = "i004010-pack-template-only"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

namespace n1
{
public class Class1
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<Import Project=".paket\Paket.Restore.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source https://api.nuget.org/v3/index.json

framework: netstandard2.0

nuget Argu == 5.1.0
24 changes: 24 additions & 0 deletions integrationtests/scenarios/i004004-pack-version/before/paket.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
RESTRICTION: == netstandard2.0
NUGET
remote: https://api.nuget.org/v3/index.json
Argu (5.1)
FSharp.Core (>= 4.3.2)
System.Configuration.ConfigurationManager (>= 4.4)
FSharp.Core (4.6.2)
System.Buffers (4.5)
System.Configuration.ConfigurationManager (4.5)
System.Security.Cryptography.ProtectedData (>= 4.5)
System.Security.Permissions (>= 4.5)
System.Memory (4.5.3)
System.Buffers (>= 4.4)
System.Numerics.Vectors (>= 4.4)
System.Runtime.CompilerServices.Unsafe (>= 4.5.2)
System.Numerics.Vectors (4.5)
System.Runtime.CompilerServices.Unsafe (4.5.2)
System.Security.AccessControl (4.5)
System.Security.Principal.Windows (>= 4.5)
System.Security.Cryptography.ProtectedData (4.5)
System.Memory (>= 4.5)
System.Security.Permissions (4.5)
System.Security.AccessControl (>= 4.5)
System.Security.Principal.Windows (4.5.1)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Argu