Skip to content

Add comprehensive unit tests for output formatting and user experience features#2

Merged
moabualruz merged 1 commit intomainfrom
ricecoder-cli
Dec 1, 2025
Merged

Add comprehensive unit tests for output formatting and user experience features#2
moabualruz merged 1 commit intomainfrom
ricecoder-cli

Conversation

@moabualruz
Copy link
Copy Markdown
Owner

  • 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.

…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.
@moabualruz moabualruz merged commit 03c2391 into main Dec 1, 2025
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +17 to +21
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")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant