From 4167a6b3cbc2b7e645219cfb612071ff0f2d5ac7 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Tue, 5 Sep 2023 09:47:10 -0500 Subject: [PATCH] Fix BCP47MAtcher test --- i18n/locale_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i18n/locale_test.go b/i18n/locale_test.go index 8b02fde..1e8dca4 100644 --- a/i18n/locale_test.go +++ b/i18n/locale_test.go @@ -37,13 +37,14 @@ func TestLocale(t *testing.T) { assert.Equal(t, i18n.NilLocale, lc) } -func TesBCP47Matcher(t *testing.T) { +func TestBCP47Matcher(t *testing.T) { tests := []struct { preferred []i18n.Locale available []string best string }{ {preferred: []i18n.Locale{"eng-US"}, available: []string{"es_EC", "en-US"}, best: "en-US"}, + {preferred: []i18n.Locale{"spa-US", "eng-US"}, available: []string{"en-GB", "en-US", "es-US"}, best: "es-US"}, {preferred: []i18n.Locale{"eng-US"}, available: []string{"es", "en"}, best: "en"}, {preferred: []i18n.Locale{"eng"}, available: []string{"es-US", "en-UK"}, best: "en-UK"}, {preferred: []i18n.Locale{"eng", "fra"}, available: []string{"fr-CA", "en-RW"}, best: "en-RW"},