Skip to content

Commit

Permalink
Add a test to make sure BSDiff and PE diffs both work
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Sep 4, 2015
1 parent f91175f commit 39adfcb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/DeltaPackageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ public void ApplyDeltaPackageSmokeTest()
}
}

[Fact]
public void ApplyDeltaWithBothBsdiffAndNormalDiffDoesntFail()
{
var basePackage = new ReleasePackage(IntegrationTestHelper.GetPath("fixtures", "slack-1.1.8-full.nupkg"));
var deltaPackage = new ReleasePackage(IntegrationTestHelper.GetPath("fixtures", "slack-1.2.0-delta.nupkg"));
var outFile = Path.GetTempFileName() + ".nupkg";

try {
var deltaBuilder = new DeltaPackageBuilder();
deltaBuilder.ApplyDeltaPackage(basePackage, deltaPackage, outFile);

var result = new ZipPackage(outFile);

result.Id.ShouldEqual("slack");
result.Version.ShouldEqual(new SemanticVersion("1.2.0"));
} finally {
if (File.Exists(outFile)) {
File.Delete(outFile);
}
}
}

[Fact]
public void ApplyMultipleDeltaPackagesGeneratesCorrectHash()
{
Expand Down
Binary file added test/fixtures/slack-1.1.8-full.nupkg
Binary file not shown.
Binary file added test/fixtures/slack-1.2.0-delta.nupkg
Binary file not shown.

0 comments on commit 39adfcb

Please sign in to comment.