Add comprehensive unit tests for output formatting and user experience features#2
Add comprehensive unit tests for output formatting and user experience features#2moabualruz merged 1 commit intomainfrom
Conversation
…e features - Introduced unit tests for output formatting in `unit_output_formatting.rs`, covering success, error, warning, info, code, and prompt formatting. - Added comprehensive tests in `unit_output_formatting_comprehensive.rs` to validate various output styles, including color handling, error formatting with context, and idempotence. - Implemented user experience tests in `unit_ux_features.rs` to verify verbosity levels, dry-run mode, and version command behavior. - Enhanced property-based tests for global resource storage in `property_global_resource_storage.rs` and added regression seeds in `property_global_resource_storage.proptest-regressions`. - Updated resource name strategy to use a hash set for uniqueness in tests.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| format!( | ||
| "RiceCoder v{}\n\nBuild Information:\n Edition: 2021\n Profile: {}\n Rust: {}", | ||
| env!("CARGO_PKG_VERSION"), | ||
| if cfg!(debug_assertions) { "debug" } else { "release" }, | ||
| env!("CARGO_PKG_RUST_VERSION") |
There was a problem hiding this comment.
Build fails due to missing CARGO_PKG_RUST_VERSION
The version command builds its banner with env!("CARGO_PKG_RUST_VERSION"), but env! requires the variable to be set at compile time. The CLI manifest does not declare package.rust-version, so Cargo will not provide CARGO_PKG_RUST_VERSION and compilation halts with “environment variable not defined.” This breaks building the CLI and its tests; derive the Rust toolchain version another way or remove this expansion.
Useful? React with 👍 / 👎.
unit_output_formatting.rs, covering success, error, warning, info, code, and prompt formatting.unit_output_formatting_comprehensive.rsto validate various output styles, including color handling, error formatting with context, and idempotence.unit_ux_features.rsto verify verbosity levels, dry-run mode, and version command behavior.property_global_resource_storage.rsand added regression seeds inproperty_global_resource_storage.proptest-regressions.