Files
dobotai-platform/internal/reasoningmode/locale_test.go
T

16 lines
486 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package reasoningmode
import "testing"
func TestResolveGuideLocaleUsesQuestionWhenPreferenceIsAuto(t *testing.T) {
if got := ResolveGuideLocale("auto", "How do I configure CRA?"); got != "en" {
t.Fatalf("English auto locale=%q", got)
}
if got := ResolveGuideLocale("auto", "如何配置CRA?"); got != "zh-CN" {
t.Fatalf("Chinese auto locale=%q", got)
}
if got := ResolveGuideLocale("ja", "English text"); got != "ja" {
t.Fatalf("explicit locale changed to %q", got)
}
}