-
Notifications
You must be signed in to change notification settings - Fork 282
Open
Description
github.com/nicksnyder/go-i18n
The following test fails:
func TestPseudoLanguages(t *testing.T) {
bundle := NewBundle(language.English)
bundle.RegisterUnmarshalFunc("toml", toml.Unmarshal)
expected := "a3"
bundle.MustParseMessageFileBytes([]byte(`
hello = "a1"
`), "art-x-a1.toml")
bundle.MustParseMessageFileBytes([]byte(`
hello = "a2"
`), "art-x-a2.toml")
bundle.MustParseMessageFileBytes([]byte(`
hello = "a3"
`), "art-x-a3.toml")
{
localized, err := NewLocalizer(bundle, "art-x-a3").Localize(&LocalizeConfig{MessageID: "hello"})
if err != nil {
t.Fatal(err)
}
if localized != expected {
t.Fatalf("expected %q\ngot %q", expected, localized)
}
}
}
I tried to debug this -- looks like it's some odd bug in the upstream x/text
Matcher.
Metadata
Metadata
Assignees
Labels
No labels