mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-17 02:37:25 +00:00
ICU-1268 add a test for ures_getLocale()
X-SVN-Rev: 6183
This commit is contained in:
parent
5213f42c2f
commit
3d9604221b
1 changed files with 12 additions and 0 deletions
|
@ -688,6 +688,18 @@ static void TestAPI() {
|
|||
}
|
||||
ures_close(teRes);
|
||||
}
|
||||
|
||||
/* same test, but with an aliased locale resource bundle */
|
||||
status=U_ZERO_ERROR;
|
||||
teRes=ures_open(NULL, "iW_Il_depRecaTed_HebreW", &status);
|
||||
if(U_FAILURE(status)) {
|
||||
log_err("unable to open a locale resource bundle from \"iW_Il_depRecaTed_HebreW\"(%s)\n", u_errorName(status));
|
||||
} else {
|
||||
if(0!=strcmp("he_IL", ures_getLocale(teRes, &status))) {
|
||||
log_err("ures_getLocale(\"iW_Il_depRecaTed_HebreW\")=%s but must be he_IL\n", ures_getLocale(teRes, &status));
|
||||
}
|
||||
ures_close(teRes);
|
||||
}
|
||||
}
|
||||
|
||||
static void TestErrorConditions(){
|
||||
|
|
Loading…
Add table
Reference in a new issue