Files
llmx/llmx-rs/tui/tests/suite/status_indicator.rs
Sebastian Krüger cb8d941adf Phase 2: Rust Workspace Transformation (Part 1)
- Renamed directory: codex-backend-openapi-models -> llmx-backend-openapi-models
- Updated all Cargo.toml files:
  - Package names: codex-* -> llmx-*
  - Library names: codex_* -> llmx_*
  - Workspace dependencies updated
- Renamed Rust source files:
  - codex*.rs -> llmx*.rs (all modules)
  - codex_conversation -> llmx_conversation
  - codex_delegate -> llmx_delegate
  - codex_message_processor -> llmx_message_processor
  - codex_tool_* -> llmx_tool_*
- Updated all Rust imports:
  - use codex_* -> use llmx_*
  - mod codex* -> mod llmx*
- Updated environment variables in code:
  - CODEX_HOME -> LLMX_HOME
  - .codex -> .llmx paths
- Updated protocol crate lib name for proper linking

Note: Some compilation errors remain (type inference issues) but all
renaming is complete. Will fix compilation in next phase.

🤖 Generated with Claude Code
2025-11-11 14:29:57 +01:00

25 lines
788 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! Regression test: ensure that `StatusIndicatorWidget` sanitises ANSI escape
//! sequences so that no raw `\x1b` bytes are written into the backing
//! buffer. Rendering logic is tricky to unittest endtoend, therefore we
//! verify the *public* contract of `ansi_escape_line()` which the widget now
//! relies on.
use llmx_ansi_escape::ansi_escape_line;
#[test]
fn ansi_escape_line_strips_escape_sequences() {
let text_in_ansi_red = "\x1b[31mRED\x1b[0m";
// The returned line must contain three printable glyphs and **no** raw
// escape bytes.
let line = ansi_escape_line(text_in_ansi_red);
let combined: String = line
.spans
.iter()
.map(|span| span.content.to_string())
.collect();
assert_eq!(combined, "RED");
}