modify now-broken test

This test tested that skipping over entries using the reader interface for an encrypted multi-volume rar archive worked.
However reading those entries doesn't work and the skipping was also not working properly so I believe it's fine to "break" this functionality.
This commit is contained in:
Morilli
2025-05-14 11:18:41 +02:00
parent a3570a568d
commit 7989ab2e28

View File

@@ -330,43 +330,18 @@ public class RarReaderTests : ReaderTests
}
[Fact]
public void Rar_NullReference()
public void Rar_SkipEncryptedFilesWithoutPassword()
{
using var stream = File.OpenRead(
Path.Combine(TEST_ARCHIVES_PATH, "Rar.encrypted_filesOnly.rar")
);
using var reader = ReaderFactory.Open(
stream,
new ReaderOptions { LookForHeader = true }
);
while (reader.MoveToNextEntry())
{
var archives = new[]
{
"Rar.EncryptedParts.part01.rar",
"Rar.EncryptedParts.part02.rar",
"Rar.EncryptedParts.part03.rar",
"Rar.EncryptedParts.part04.rar",
"Rar.EncryptedParts.part05.rar",
"Rar.EncryptedParts.part06.rar",
};
using var reader = RarReader.Open(
archives
.Select(s => Path.Combine(TEST_ARCHIVES_PATH, s))
.Select(p => File.OpenRead(p)),
new ReaderOptions { Password = "test" }
);
while (reader.MoveToNextEntry())
{
//
}
}
{
using var stream = File.OpenRead(
Path.Combine(TEST_ARCHIVES_PATH, "Rar.encrypted_filesOnly.rar")
);
using var reader = ReaderFactory.Open(
stream,
new ReaderOptions { LookForHeader = true }
);
while (reader.MoveToNextEntry())
{
//
}
//
}
}