Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Added unit test to verify fixes in #154.
Browse files Browse the repository at this point in the history
  • Loading branch information
squid-box committed Mar 22, 2023
1 parent d4cd869 commit fccecd6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions SevenZip.Tests/SevenZipCompressorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,5 +357,25 @@ public void CompressDifferentFormatsTest(CompressionMethod method)

Assert.IsTrue(File.Exists(TemporaryFile));
}

[Test]
public void AppendToArchiveWithEncryptedHeadersTest()
{
var compressor = new SevenZipCompressor()
{
ArchiveFormat = OutArchiveFormat.SevenZip,
CompressionMethod = CompressionMethod.Lzma2,
CompressionLevel = CompressionLevel.Normal,
EncryptHeaders = true,
};
compressor.CompressDirectory(@"TestData", TemporaryFile, "password");

compressor = new SevenZipCompressor
{
CompressionMode = CompressionMode.Append
};

compressor.CompressFilesEncrypted(TemporaryFile, "password", @"TestData\zip.zip");
}
}
}

0 comments on commit fccecd6

Please sign in to comment.