Skip to content

test: increase formats/zip.rs and formats/traits.rs coverage to >=85%#103

Merged
bug-ops merged 2 commits intomainfrom
test-increase-formats-zip-rs-a
Mar 15, 2026
Merged

test: increase formats/zip.rs and formats/traits.rs coverage to >=85%#103
bug-ops merged 2 commits intomainfrom
test-increase-formats-zip-rs-a

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 15, 2026

Closes #86

Summary

  • formats/traits.rs: 76.92% → 100% — call TestFormat::extract() in existing test
  • formats/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 comment
  • inspection/report.rs: 82.64% → 96.91% — from_error unit tests for all uncovered ExtractionError variants
  • inspection/list.rs: 89.65% → 97.14% — encrypted by_index error path, tar.bz2/xz/zst listing, 7z unsupported error, special file rejection

Test plan

  • formats/zip.rs >= 85% (cargo llvm-cov nextest)
  • formats/traits.rs >= 85%
  • inspection/list.rs >= 85%
  • inspection/report.rs >= 85%
  • 570 tests pass, 3 #[ignore] symlink tests skipped (upstream zip crate blocker)
  • fmt, clippy, doc, deny all clean

bug-ops added 2 commits March 15, 2026 02:48
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
@github-actions github-actions bot added the core Changes to exarch-core label Mar 15, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 01:50
@bug-ops bug-ops merged commit 0c091e9 into main Mar 15, 2026
20 checks passed
@bug-ops bug-ops deleted the test-increase-formats-zip-rs-a branch March 15, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to exarch-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: increase formats/zip.rs and formats/traits.rs coverage to meet 85% target

1 participant