Files
gronod d8b642436b feat: Home Assistant add-on with in-process Go REST bridge
Bake the former Python bridge.py into emby-mcp as internal/bridge.
/mcp and /call/{tool} share one process. Session init errors are
returned instead of swallowed, and 401/400/404 trigger a fresh
initialize plus retry with the caller's Authorization header.
2026-09-21 16:31:34 +00:00

26 lines
520 B
Go

package textutil
import "testing"
func TestFold(t *testing.T) {
cases := map[string]string{
"Café MÜLLER": "cafe muller",
"Hello": "hello",
"naïve": "naive",
}
for in, want := range cases {
if got := Fold(in); got != want {
t.Errorf("Fold(%q) = %q, want %q", in, got, want)
}
}
}
func TestContainsFold(t *testing.T) {
if !ContainsFold("The über cast of café", "uber") {
t.Error("expected fold match")
}
if ContainsFold("hello world", "bye") {
t.Error("unexpected match")
}
}