mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-2439 fix test to work with short Asian language names
X-SVN-Rev: 11863
This commit is contained in:
parent
efc59e36a9
commit
46f091ab0d
2 changed files with 3 additions and 3 deletions
|
@ -443,7 +443,7 @@ static void TestDisplayNames()
|
|||
/* test that the default locale has a display name for its own language */
|
||||
errorCode=U_ZERO_ERROR;
|
||||
length=uloc_getDisplayLanguage(NULL, NULL, buffer, LENGTHOF(buffer), &errorCode);
|
||||
if(U_FAILURE(errorCode) || length<=3) {
|
||||
if(U_FAILURE(errorCode) || (length<=3 && buffer[0]<=0x7f)) {
|
||||
/* check <=3 to reject getting the language code as a display name */
|
||||
log_err("unable to get a display string for the language of the default locale - %s\n", u_errorName(errorCode));
|
||||
}
|
||||
|
|
|
@ -396,8 +396,8 @@ LocaleTest::TestDisplayNames()
|
|||
|
||||
/* test that the default locale has a display name for its own language */
|
||||
UnicodeString s;
|
||||
Locale().getDisplayName(Locale(), s);
|
||||
if(s.length()<=3) {
|
||||
Locale().getDisplayLanguage(Locale(), s);
|
||||
if(s.length()<=3 && s.charAt(0)<=0x7f) {
|
||||
/* check <=3 to reject getting the language code as a display name */
|
||||
errln("unable to get a display string for the language of the default locale\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue