From 1dccd7472e9f2db4830293b9d33500ea4b4ce082 Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Tue, 10 Jul 2018 21:09:47 +0200 Subject: [PATCH] ICU-20016 Skip testing pseudolocale region codes for display names. At the moment, CLDR pseudolocale region codes don't have display names. As long as that is so, ICU must not require them to exist in order to not cause bogus test failures when building with pseudolocales. --- .../com/ibm/icu/dev/test/util/ICUResourceBundleTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ICUResourceBundleTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ICUResourceBundleTest.java index 28f77b7dc8e..ebf536b1232 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ICUResourceBundleTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ICUResourceBundleTest.java @@ -718,7 +718,13 @@ public final class ICUResourceBundleTest extends TestFmwk { } for (int i = 0; i < locales.length; ++i) { - if (!hasLocalizedCountryFor(ULocale.ENGLISH, locales[i])){ + // The region codes used for pseudolocales don't have display names. + // That might however change in the future, in which case skipping + // testing of these names here would become irrelevant: + // https://unicode.org/cldr/trac/ticket/10880 + String country = locales[i].getCountry(); + if (!"XA".equals(country) && !"XB".equals(country) + && !hasLocalizedCountryFor(ULocale.ENGLISH, locales[i])){ errln("Could not get English localized country for " + locales[i]); } if(!hasLocalizedLanguageFor(ULocale.ENGLISH, locales[i])){