Commit graph

1 commit

Author SHA1 Message Date
jedarden
c43b9c49a4 test(bf-2np8r): add common encryption test fixtures and helpers
Add comprehensive shared utilities for encryption testing across the pdftract
workspace. Provides path resolution, test execution helpers, assertion functions,
fixture validation, mock data builders, and test constants.

Features:
- Path resolution: workspace_root(), pdftract_bin(), encrypted_fixture()
- Test execution: run_pdftract_extract(), stdin password support
- Assertions: encryption_exit_code, diagnostics, success/failure checks
- Fixture validation: PDF structure checks, fixture existence
- Mock builders: RC4, AES-128, AES-256 encryption dictionaries (decrypt feature)
- Constants: exit codes, fixture list, test passwords

Files:
- tests/encryption_fixtures.rs - Main fixtures module (461 lines)
- tests/lib.rs - Test support library
- tests/ENCRYPTION_FIXTURES.md - Documentation (161 lines)
- tests/verify_encryption_fixtures.rs - Verification tests (137 lines)
- tests/encryption_fixtures_usage_example.rs - Usage examples (81 lines)
- tests/mod.rs - Module aggregation

Acceptance criteria:
 Common test fixtures added (5 encrypted PDFs)
 Helper functions added (20+ functions)
 Code compiles successfully
 Functions usable across multiple encryption tests

Closes bf-2np8r

Verification: notes/bf-2np8r.md
2026-07-05 19:16:45 -04:00