test: increase formats/zip.rs and formats/traits.rs coverage to >=85%#103
Merged
test: increase formats/zip.rs and formats/traits.rs coverage to >=85%#103
Conversation
Adds tests across four modules to meet the 85%+ line coverage target: - formats/traits.rs: call TestFormat::extract() in existing test (100%) - formats/zip.rs: unsupported compression rejection, per-entry encrypted check at index 125 (outside middle sampling range), raw-ZIP builder for CRC32-correct archives; 3 #[ignore] symlink tests preserved with upstream blocker comment (87.49%) - inspection/report.rs: from_error unit tests for all uncovered ExtractionError variants (96.91%) - inspection/list.rs: by_index encrypted error path, tar.bz2/xz/zst listing, 7z unsupported error, special file rejection (97.14%) Closes #86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #86
Summary
formats/traits.rs: 76.92% → 100% — callTestFormat::extract()in existing testformats/zip.rs: 81.85% → 87.49% — unsupported compression rejection, per-entry encrypted check (index 125, outside middle sampling range), raw-ZIP binary builder with correct CRC32 for symlink target tests; 3#[ignore]symlink tests preserved with upstream blocker commentinspection/report.rs: 82.64% → 96.91% —from_errorunit tests for all uncoveredExtractionErrorvariantsinspection/list.rs: 89.65% → 97.14% — encryptedby_indexerror path, tar.bz2/xz/zst listing, 7z unsupported error, special file rejectionTest plan
formats/zip.rs>= 85% (cargo llvm-cov nextest)formats/traits.rs>= 85%inspection/list.rs>= 85%inspection/report.rs>= 85%#[ignore]symlink tests skipped (upstream zip crate blocker)