7z encrypted filename exception with no password matches rar behaviour.

This commit is contained in:
Craig
2022-05-04 01:35:58 +01:00
parent 61c01ce9b0
commit e424094fdf
3 changed files with 23 additions and 1 deletions

View File

@@ -41,6 +41,11 @@ namespace SharpCompress.Test.SevenZip
ArchiveFileRead("7Zip.LZMA.Aes.7z", new ReaderOptions() { Password = "testpassword" });
}
[Fact]
public void SevenZipArchive_LZMAAES_NoPasswordExceptionTest()
{
Assert.Throws(typeof(CryptographicException), () => ArchiveFileRead("7Zip.LZMA.Aes.7z", new ReaderOptions() { Password = null })); //was failing with ArgumentNullException not CryptographicException like rar
}
[Fact]
public void SevenZipArchive_PPMd_StreamRead()
{
ArchiveStreamRead("7Zip.PPMd.7z");