Skip to content

Commit

Permalink
ICU-22575 Ported the fix to Java, added the new unit test in Java, up…
Browse files Browse the repository at this point in the history
…dated the existing unit tests in Java.
  • Loading branch information
richgillam committed Dec 1, 2023
1 parent 7ac503c commit 716906f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public void put(UResource.Key key, UResource.Value value, boolean isRoot) {
// Add pattern with its associated skeleton. Override any duplicate derived from std patterns,
// but not a previous availableFormats entry:
String formatValue = value.toString();
addPatternWithSkeleton(formatValue, formatKey, !isRoot, returnInfo);
addPatternWithSkeleton(formatValue, formatKey, true, returnInfo);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ public void TestFormat() {

"th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "d", "10/10 \\u2013 10/11",

"th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "y", "2550",
"th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "y", "\\u0e1e.\\u0e28. 2550",


"th", "BE 2550 10 10 10:10:10", "BE 2550 11 10 10:10:10", "MMM", "\u0E15.\u0E04.\u2013\u0E1E.\u0E22.",
Expand Down Expand Up @@ -2265,7 +2265,7 @@ public void testTicket20707() {
{"0\u202FAM", "00", "00", "0\u202FAM", "0\u202FAM", "0 (hour: 00)", "0\u202FAM"},
{"12\u202FAM", "00", "00", "12\u202FAM", "12\u202FAM", "0 (hour: 12)", "12\u202FAM"},
{"12\u202FAM", "00", "00", "12\u202FAM", "12\u202FAM", "0 (hour: 12)", "12\u202FAM"},
{"0 am", "0", "0", "0 am", "0 am", "0 (\u0918\u0902\u091F\u093E: 0)", "\u0930\u093E\u0924 0"}
{"0 am", "00", "00", "0 am", "0 am", "0 (\u0918\u0902\u091F\u093E: 00)", "\u0930\u093E\u0924 0"}
};

int i = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public void TestC() {
{"zh-TW", "CCCCm", "BBBBhh:mm"},
{"zh-TW", "CCCCCm", "BBBBBh:mm"},
{"zh-TW", "CCCCCCm", "BBBBBhh:mm"},
{"de", "Cm", "H:mm"},
{"de", "Cm", "HH:mm"},
{"de", "CCm", "HH:mm"},
{"de", "CCCm", "H:mm"},
{"de", "CCCm", "HH:mm"},
{"de", "CCCCm", "HH:mm"},
{"en", "Cm", "h:mm\u202Fa"},
{"en", "CCm", "hh:mm\u202Fa"},
Expand Down Expand Up @@ -1832,6 +1832,9 @@ public void testBestPattern() {

// ICU-21873: Missing aliased values
"en_001@calendar=islamic", "Ehm", "EEE h:mm\u202Fa",

// ICU-22575: AvailableFormats not inheriting from root
"sv_SE", "yMd", "y-MM-dd",
};

for (int i = 0; i < testCases.length; i += 3) {
Expand Down Expand Up @@ -1921,7 +1924,7 @@ public void testDateTimePatterns() {
"EEEE d MMMM, y 'da' HH:mm",
"d MMMM, y 'da' HH:mm",
"d MMM, y, HH:mm",
"d/M/y, HH:mm" } ),
"y-MM-dd, HH:mm" } ),
};

String[] enDTPatterns = {
Expand Down

0 comments on commit 716906f

Please sign in to comment.