test(channels): neutralize UTF-8 truncation regression fixture (#289)

* test(channels): neutralize UTF-8 truncation regression fixture

* fix(ci): resolve fmt drift and discord test config init
This commit is contained in:
Chummy 2026-02-16 18:58:35 +08:00 committed by GitHub
parent 3231a61323
commit b5d9f72023
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1449,7 +1449,7 @@ mod tests {
#[test] #[test]
fn channel_log_truncation_is_utf8_safe_for_multibyte_text() { fn channel_log_truncation_is_utf8_safe_for_multibyte_text() {
let msg = "你好!我是监察,武威节点的 AI 助手。目前节点运行正常,有什么需要我帮助的吗?"; let msg = "Hello from ZeroClaw 🌍. Current status is healthy, and café-style UTF-8 text stays safe in logs.";
// Reproduces the production crash path where channel logs truncate at 80 chars. // Reproduces the production crash path where channel logs truncate at 80 chars.
let result = std::panic::catch_unwind(|| crate::util::truncate_with_ellipsis(msg, 80)); let result = std::panic::catch_unwind(|| crate::util::truncate_with_ellipsis(msg, 80));