swink-agent 0.13.2

Core scaffolding for running LLM-powered agentic loops
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Tests for `util`.
#![cfg(test)]

use super::{prefix_chars, suffix_chars};

#[test]
fn prefix_chars_respects_utf8_boundaries() {
    assert_eq!(prefix_chars("abc🙂def", 4), "abc🙂");
}

#[test]
fn suffix_chars_respects_utf8_boundaries() {
    assert_eq!(suffix_chars("abc🙂def", 4), "🙂def");
}