botserver/src/basic/keywords/last.test.rs
Rodrigo Rodriguez (Pragmatismo) 415448088b 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

21 lines
610 B
Rust

#[cfg(test)]
mod tests {
use super::*;
use crate::tests::test_util;
#[test]
fn test_last_keyword_mixed_whitespace() {
test_util::setup();
let result = std::panic::catch_unwind(|| {
parse_input("hello\tworld\n");
});
assert!(result.is_err(), "Should fail on mixed whitespace");
}
#[test]
fn test_last_keyword_tabs_and_newlines() {
test_util::setup();
let result = std::panic::catch_unwind(|| {
parse_input("hello\n\tworld");
});
assert!(result.is_err(), "Should fail on tabs/newlines");
}
}