ICU-2439 fix test to work with short Asian language names

X-SVN-Rev: 11863
This commit is contained in:
Markus Scherer 2003-05-09 18:22:40 +00:00
parent efc59e36a9
commit 46f091ab0d
2 changed files with 3 additions and 3 deletions

View file

@ -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));
}

View file

@ -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");
}