Skip to content

Commit

Permalink
test(nuget): add test to reproduce the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
werwolfby committed Mar 25, 2024
1 parent 884d927 commit 079cb9b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions source/Nuke.Tooling.Tests/NuGetPackageResolverTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ public void TestGetGlobalInstalledPackage()
result.Version.OriginalVersion.Should().Be(XunitConsolePackageVersion);
}

[Fact]
public void TestGetGlobalInstalledPackageWithDuplicateNupkg()
{
var result = NuGetPackageResolver.GetGlobalInstalledPackage("coverlet.console", version: null, packagesConfigFile: null);
// Null is the result as well, but it is inconclusive :(
if (result != null)
{
result.Should().NotBeNull();
result.Id.Should().Be("coverlet.console");
result.File.Name.Should().EndWith("nupkg");
// Do not check version as it is not deterministic
}
}

[Fact]
public void TestGetLocalInstalledPackageViaProjectFile()
{
Expand Down

0 comments on commit 079cb9b

Please sign in to comment.