Skip to content

Commit b7ec219

Browse files
authored
Adjust TWTagTest expected display names for JDK 24 and above (#6627)
Signed-off-by: Darshan N <[email protected]>
1 parent 2988ca0 commit b7ec219

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

functional/MBCS_Tests/language_tag/src/TWTagTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,14 @@ public void currencyWithRegion2Test(){
122122
}
123123

124124
// TIMEZONE
125+
private static final String tzPart = (JavaVersion.getFeature() >= 24L) ? "Time Zone: Taiwan Time" : "Time Zone: Taipei Time";
126+
125127
@Test
126128
public void timezoneTest(){
127129
String tag = "zh-TW-u-tz-twtpe"; //Defined in common/bcp47/teimezone.xml
128130
Locale l = Locale.forLanguageTag(tag);
129131
assertEquals("中文 (台灣,時區:台北時間)", l.getDisplayName(l));
130-
assertEquals("Chinese (Taiwan, Time Zone: Taiwan Time)", l.getDisplayName(Locale.ENGLISH));
132+
assertEquals("Chinese (Taiwan, " + tzPart + ")", l.getDisplayName(Locale.ENGLISH));
131133
assertEquals(tag, l.toLanguageTag());
132134
assertEquals("tz-twtpe", l.getExtension('u'));
133135
assertEquals("twtpe", l.getUnicodeLocaleType("tz"));
@@ -149,7 +151,7 @@ public void timezoneTWCalendarTest(){
149151
} else {
150152
assertEquals("中文 (台灣,民國曆,時區:台北時間)", l.getDisplayName(l));
151153
}
152-
assertEquals("Chinese (Taiwan, Minguo Calendar, Time Zone: Taiwan Time)",
154+
assertEquals("Chinese (Taiwan, Minguo Calendar, " + tzPart + ")",
153155
l.getDisplayName(Locale.ENGLISH));
154156
assertEquals(tag, l.toLanguageTag());
155157
assertEquals("ca-roc-tz-twtpe", l.getExtension('u'));
@@ -175,7 +177,7 @@ public void timezoneTWCalendarNumberTest(){
175177
assertEquals("中文 (台灣,民國曆,全形數字,時區:台北時間)",
176178
l.getDisplayName(l));
177179
}
178-
assertEquals("Chinese (Taiwan, Minguo Calendar, Full-Width Digits, Time Zone: Taiwan Time)",
180+
assertEquals("Chinese (Taiwan, Minguo Calendar, Full-Width Digits, " + tzPart + ")",
179181
l.getDisplayName(Locale.ENGLISH));
180182
assertEquals(tag, l.toLanguageTag());
181183
assertEquals("ca-roc-nu-fullwide-tz-twtpe", l.getExtension('u'));

0 commit comments

Comments
 (0)