summaryrefslogtreecommitdiffstats
path: root/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java')
-rw-r--r--android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java
index 00ad5a108..7332a7f03 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java
@@ -56,6 +56,40 @@ public class ListFormatterTest extends TestFmwk {
}
}
+ // Tests resource loading and inheritance when region sublocale
+ // has only partial data for the listPattern element (overriding
+ // some of the parent data). #12994
+ String[] EnglishGBTestData = {
+ "",
+ "A",
+ "A and B",
+ "A, B and C",
+ "A, B, C and D",
+ "A, B, C, D and E"
+ };
+
+ @Test
+ public void TestEnglishGB() {
+ checkData(ListFormatter.getInstance(new ULocale("en_GB")), EnglishGBTestData);
+ }
+
+ // Tests resource loading and inheritance when region sublocale
+ // has only partial data for the listPattern element (overriding
+ // some of the parent data). #12994
+ String[] ChineseTradHKTestData = {
+ "",
+ "A",
+ "A\u53CAB",
+ "A\u3001B\u53CAC",
+ "A\u3001B\u3001C\u53CAD",
+ "A\u3001B\u3001C\u3001D\u53CAE"
+ };
+
+ @Test
+ public void TestChineseTradHK() {
+ checkData(ListFormatter.getInstance(new ULocale("zh_Hant_HK")), ChineseTradHKTestData);
+ }
+
String[] JapaneseTestData = {
"",
"A",