package handler import "testing" func TestTruncateAuditText(t *testing.T) { if got := truncateAuditText("中文审计记录", 3); got != "中文审" { t.Fatalf("unexpected truncation: %q", got) } if got := truncateAuditText("short", 10); got != "short" { t.Fatalf("unexpected unchanged value: %q", got) } }