From 2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 16 Jan 2018 12:03:31 -0500 Subject: Updated dependencies and added avct/uasurfer (#8089) * Updated dependencies and added avct/uasurfer * Added uasurfer to NOTICE.txt --- .../x/text/language/display/display_test.go | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'vendor/golang.org/x/text/language/display/display_test.go') diff --git a/vendor/golang.org/x/text/language/display/display_test.go b/vendor/golang.org/x/text/language/display/display_test.go index 35f0878eb..4f5b48e00 100644 --- a/vendor/golang.org/x/text/language/display/display_test.go +++ b/vendor/golang.org/x/text/language/display/display_test.go @@ -371,9 +371,6 @@ func TestTag(t *testing.T) { {"sr-Latn", "sr-Latn-ME", "srpskohrvatski (Crna Gora)"}, // Double script and region {"nl", "en-Cyrl-BE", "Engels (Cyrillisch, België)"}, - // Canonical equivalents. - {"ro", "ro-MD", "moldovenească"}, - {"ro", "mo", "moldovenească"}, } for _, tt := range tests { t.Run(tt.dict+"/"+tt.tag, func(t *testing.T) { @@ -445,9 +442,6 @@ func TestLanguage(t *testing.T) { {"en", "af-NA", "Afrikaans"}, {"en", "zu-BR", "Zulu"}, {"agq", "zh-Hant", "|[language: zh-Hant]"}, - // Canonical equivalents. - {"ro", "ro-MD", "moldovenească"}, - {"ro", "mo", "moldovenească"}, {"en", "sh", "Serbo-Croatian"}, {"en", "sr-Latn", "Serbo-Croatian"}, {"en", "sr", "Serbian"}, @@ -540,8 +534,6 @@ func TestRegion(t *testing.T) { {"nl", "NL", "Nederland"}, {"en", "US", "United States"}, {"en", "ZZ", "Unknown Region"}, - {"en", "UM", "U.S. Outlying Islands"}, - {"en-GB", "UM", "U.S. Outlying Islands"}, {"en-GB", "NL", "Netherlands"}, // Canonical equivalents {"en", "UK", "United Kingdom"}, @@ -628,9 +620,6 @@ func TestSelf(t *testing.T) { {"sr-Latn-ME", "srpskohrvatski"}, {"sr-Cyrl-ME", "српски"}, {"sr-NL", "српски"}, - // Canonical equivalents. - {"ro-MD", "moldovenească"}, - {"mo", "moldovenească"}, // NOTE: kk is defined, but in Cyrillic script. For China, Arab is the // dominant script. We do not have data for kk-Arab and we chose to not // fall back in such cases. @@ -644,6 +633,27 @@ func TestSelf(t *testing.T) { } } +func TestEquivalence(t *testing.T) { + testCases := []struct { + desc string + namer Namer + }{ + {"Self", Self}, + {"Tags", Tags(language.Romanian)}, + {"Languages", Languages(language.Romanian)}, + {"Scripts", Scripts(language.Romanian)}, + } + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + ro := tc.namer.Name(language.Raw.MustParse("ro-MD")) + mo := tc.namer.Name(language.Raw.MustParse("mo")) + if ro != mo { + t.Errorf("%q != %q", ro, mo) + } + }) + } +} + func TestDictionaryLang(t *testing.T) { tests := []struct { d *Dictionary @@ -693,7 +703,6 @@ func TestDictionaryScript(t *testing.T) { name string }{ {English, "Cyrl", "Cyrillic"}, - {Portuguese, "Gujr", "gujerati"}, {EuropeanPortuguese, "Gujr", "guzerate"}, } for i, test := range tests { -- cgit v1.2.3-1-g7c22