How the crate is verified.
eck/test/mod.rs— declares the singleeck_testsharness (unit + integration).- Unit tests live next to the code (
#[cfg(test)]modules everywhere). - Integration tests cover end-to-end encrypt/decrypt of files and folders.
eck/test/also holds mocks and the messageseck_testsasserts on.
cargo xtask testruns cargo test --test=eck_tests (all of them).
- Tests never touch the real user config:
ECK_CONFIG_PATH(env var) redirects the parameters file to a temp dir, andtempfilecrates throwaway directories. - The OS-keyring integration test is an
#[ignore]d test:encrypt_decrypt_os_keytype_roundtrip(eck/test/integration/encryption_flow.rs:153). It is run manually and by CI on macOS only (see CI).
- Key resolution — password / key-file / OS-keyring roundtrips.
- Chunk flow —
encrypt_stream/decrypt_streamon overlapping-size inputs. - Folder archives — full directory roundtrip, preserving files, structure and permissions.
- Compression —
zstd,lz4,xz,noneover byte ranges. - CLI —
assert_cmd-style invocations of the builteckbinary. - TUI flows — dialogs simulated through the mockable
TuiInput. - Errors — wrong keys, truncated files, nonexistent paths surface the expected codes.
Contributions should add both a fast unit test in the owning module and an integration test
in eck/test/integration when the behavior crosses module boundaries. Fuzz targets live in
fuzzing.md.