botserver/src/basic/keywords/format.test.rs
Rodrigo Rodriguez (Pragmatismo) baea0b942c feat: refactor prompt compaction and clean up test files
- Renamed `execute_compact_prompt` to `compact_prompt_for_bots` and simplified logic
- Removed redundant comments and empty lines in test files
- Consolidated prompt compaction threshold handling
- Cleaned up UI logging implementation by removing unnecessary whitespace
- Improved code organization in ui_tree module

The changes focus on code quality improvements, removing clutter, and making the prompt compaction logic more straightforward. Test files were cleaned up to be more concise.
2025-11-11 18:32:52 -03:00

23 lines
755 B
Rust

#[cfg(test)]
mod tests {
use super::*;
use crate::tests::test_util;
#[test]
fn test_currency_formatting() {
test_util::setup();
let formatted = format_currency(1234.56, "R$");
assert_eq!(formatted, "R$ 1.234.56", "Currency formatting should use periods");
}
#[test]
fn test_numeric_formatting_with_locale() {
test_util::setup();
let formatted = format_number(1234.56, 2);
assert_eq!(formatted, "1.234.56", "Number formatting should use periods");
}
#[test]
fn test_text_formatting() {
test_util::setup();
let formatted = format_text("hello", "HELLO");
assert_eq!(formatted, "Result: helloHELLO", "Text formatting should concatenate");
}
}