16 lines
486 B
Go
16 lines
486 B
Go
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)
|
||
}
|
||
}
|