test(Zip): test optional consistency check

This commit is contained in:
nyashbox 2024-12-13 00:15:11 +02:00
parent 39f193c077
commit 0c34097d89
No known key found for this signature in database
GPG Key ID: B40E74A291D1DFA4

View File

@ -318,6 +318,26 @@ void ZipTest::testDecompressConsistency()
}
}
//
// test decompressing all files (ignore consistency check)
//
{
Poco::FileInputStream inputStream(getTestFile("data", archive));
assertTrue (inputStream.good());
Decompress dec(inputStream, Poco::Path::temp());
// should not throw since consistency checks are ignored
try {
dec.decompressAllFiles(false);
}
catch (const ZipException &e)
{
assertTrue (false);
}
}
//
// test decompressing single file