if(URES_IS_TABLE(type)) {
*key = pathP;
t2 = res_getTableItemByKey(pResData, t1, &indexR, key);
- if(t2 == RES_BOGUS) {
- /* if we fail to get the resource by key, maybe we got an index */
- indexR = uprv_strtol(pathP, &closeIndex, 10);
- if(indexR >= 0 && *closeIndex == 0 && (*pathP != '0' || closeIndex - pathP == 1)) {
- /* if we indeed have an index, try to get the item by index */
- t2 = res_getTableItemByIndex(pResData, t1, indexR, key);
- } // else t2 is already RES_BOGUS
- }
} else if(URES_IS_ARRAY(type)) {
indexR = uprv_strtol(pathP, &closeIndex, 10);
if(indexR >= 0 && *closeIndex == 0) {
/* test indexed aliasing */
- tb = ures_getByKey(aliasB, "zoneTests", tb, &status);
- tb = ures_getByKey(tb, "zoneAlias2", tb, &status);
- string = tres_getString(tb, -1, NULL, &strLen, &status);
-
en = ures_findResource("/ICUDATA-zone/en/zoneStrings/3/0", en, &status);
- sequence = tres_getString(en, -1, NULL, &seqLen, &status);
- if(U_FAILURE(status) || seqLen != strLen || u_strncmp(sequence, string, seqLen) != 0) {
- log_err("Referencing alias didn't get the right string (5)\n");
+ if(status != U_MISSING_RESOURCE_ERROR) {
+ log_err("Index lookup in a table resource didn't get U_MISSING_RESOURCE_ERROR!\n");
}
+ status = U_ZERO_ERROR;
}
/* test getting aliased string by index */
{