@@ -371,9 +371,6 @@ func TestTag(t *testing.T) {
371
371
{"sr-Latn" , "sr-Latn-ME" , "srpskohrvatski (Crna Gora)" },
372
372
// Double script and region
373
373
{"nl" , "en-Cyrl-BE" , "Engels (Cyrillisch, België)" },
374
- // Canonical equivalents.
375
- {"ro" , "ro-MD" , "moldovenească" },
376
- {"ro" , "mo" , "moldovenească" },
377
374
}
378
375
for _ , tt := range tests {
379
376
t .Run (tt .dict + "/" + tt .tag , func (t * testing.T ) {
@@ -445,9 +442,6 @@ func TestLanguage(t *testing.T) {
445
442
{"en" , "af-NA" , "Afrikaans" },
446
443
{"en" , "zu-BR" , "Zulu" },
447
444
{"agq" , "zh-Hant" , "|[language: zh-Hant]" },
448
- // Canonical equivalents.
449
- {"ro" , "ro-MD" , "moldovenească" },
450
- {"ro" , "mo" , "moldovenească" },
451
445
{"en" , "sh" , "Serbo-Croatian" },
452
446
{"en" , "sr-Latn" , "Serbo-Croatian" },
453
447
{"en" , "sr" , "Serbian" },
@@ -540,8 +534,6 @@ func TestRegion(t *testing.T) {
540
534
{"nl" , "NL" , "Nederland" },
541
535
{"en" , "US" , "United States" },
542
536
{"en" , "ZZ" , "Unknown Region" },
543
- {"en" , "UM" , "U.S. Outlying Islands" },
544
- {"en-GB" , "UM" , "U.S. Outlying Islands" },
545
537
{"en-GB" , "NL" , "Netherlands" },
546
538
// Canonical equivalents
547
539
{"en" , "UK" , "United Kingdom" },
@@ -628,9 +620,6 @@ func TestSelf(t *testing.T) {
628
620
{"sr-Latn-ME" , "srpskohrvatski" },
629
621
{"sr-Cyrl-ME" , "српски" },
630
622
{"sr-NL" , "српски" },
631
- // Canonical equivalents.
632
- {"ro-MD" , "moldovenească" },
633
- {"mo" , "moldovenească" },
634
623
// NOTE: kk is defined, but in Cyrillic script. For China, Arab is the
635
624
// dominant script. We do not have data for kk-Arab and we chose to not
636
625
// fall back in such cases.
@@ -644,6 +633,27 @@ func TestSelf(t *testing.T) {
644
633
}
645
634
}
646
635
636
+ func TestEquivalence (t * testing.T ) {
637
+ testCases := []struct {
638
+ desc string
639
+ namer Namer
640
+ }{
641
+ {"Self" , Self },
642
+ {"Tags" , Tags (language .Romanian )},
643
+ {"Languages" , Languages (language .Romanian )},
644
+ {"Scripts" , Scripts (language .Romanian )},
645
+ }
646
+ for _ , tc := range testCases {
647
+ t .Run (tc .desc , func (t * testing.T ) {
648
+ ro := tc .namer .Name (language .Raw .MustParse ("ro-MD" ))
649
+ mo := tc .namer .Name (language .Raw .MustParse ("mo" ))
650
+ if ro != mo {
651
+ t .Errorf ("%q != %q" , ro , mo )
652
+ }
653
+ })
654
+ }
655
+ }
656
+
647
657
func TestDictionaryLang (t * testing.T ) {
648
658
tests := []struct {
649
659
d * Dictionary
@@ -693,7 +703,6 @@ func TestDictionaryScript(t *testing.T) {
693
703
name string
694
704
}{
695
705
{English , "Cyrl" , "Cyrillic" },
696
- {Portuguese , "Gujr" , "gujerati" },
697
706
{EuropeanPortuguese , "Gujr" , "guzerate" },
698
707
}
699
708
for i , test := range tests {
0 commit comments