| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2013, International Business Machines Corporation and | 3 * Copyright (c) 1997-2014, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ********************************************************************/ | 5 ********************************************************************/ |
| 6 /******************************************************************************* | 6 /******************************************************************************* |
| 7 * | 7 * |
| 8 * File CRESTST.C | 8 * File creststn.c |
| 9 * | 9 * |
| 10 * Modification History: | 10 * Modification History: |
| 11 * Name Date Description | 11 * Name Date Description |
| 12 * Madhu Katragadda 05/09/2000 Ported Tests for New ResourceBundle API | 12 * Madhu Katragadda 05/09/2000 Ported Tests for New ResourceBundle API |
| 13 * Madhu Katragadda 05/24/2000 Added new tests to test RES_BINARY for coll
ationElements | 13 * Madhu Katragadda 05/24/2000 Added new tests to test RES_BINARY for coll
ationElements |
| 14 ******************************************************************************** | 14 ******************************************************************************** |
| 15 */ | 15 */ |
| 16 | 16 |
| 17 | 17 |
| 18 #include <time.h> | 18 #include <time.h> |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 r = ures_open(U_ICUDATA_REGION, "ti", &status); | 281 r = ures_open(U_ICUDATA_REGION, "ti", &status); |
| 282 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); | 282 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); |
| 283 ures_close(r); | 283 ures_close(r); |
| 284 | 284 |
| 285 status = U_USING_FALLBACK_WARNING; | 285 status = U_USING_FALLBACK_WARNING; |
| 286 r = ures_open(NULL, "nolocale", &status); | 286 r = ures_open(NULL, "nolocale", &status); |
| 287 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); | 287 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); |
| 288 ures_close(r); | 288 ures_close(r); |
| 289 ures_close(r2); | 289 ures_close(r2); |
| 290 | 290 |
| 291 #if !UCONFIG_NO_COLLATION |
| 291 /** Now, with the collation bundle **/ | 292 /** Now, with the collation bundle **/ |
| 292 | 293 |
| 293 /* first bundle should return fallback warning */ | 294 /* first bundle should return fallback warning */ |
| 294 r = ures_open(U_ICUDATA_COLL, "sr_YU_VOJVODINA", &status); | 295 r = ures_open(U_ICUDATA_COLL, "sr_YU_VOJVODINA", &status); |
| 295 checkStatus(__LINE__, U_USING_FALLBACK_WARNING, status); | 296 checkStatus(__LINE__, U_USING_FALLBACK_WARNING, status); |
| 296 ures_close(r); | 297 ures_close(r); |
| 297 | 298 |
| 298 /* this bundle should return zero error, so it shouldn't change the status */ | 299 /* this bundle should return zero error, so it shouldn't change the status */ |
| 299 status = U_USING_FALLBACK_WARNING; | 300 status = U_USING_FALLBACK_WARNING; |
| 300 r = ures_open(U_ICUDATA_COLL, "sr", &status); | 301 r = ures_open(U_ICUDATA_COLL, "sr", &status); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 319 r2 = ures_getByKey(r, "collations", r2, &status); | 320 r2 = ures_getByKey(r, "collations", r2, &status); |
| 320 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); | 321 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); |
| 321 } | 322 } |
| 322 ures_close(r); | 323 ures_close(r); |
| 323 | 324 |
| 324 status = U_USING_FALLBACK_WARNING; | 325 status = U_USING_FALLBACK_WARNING; |
| 325 r = ures_open(U_ICUDATA_COLL, "nolocale", &status); | 326 r = ures_open(U_ICUDATA_COLL, "nolocale", &status); |
| 326 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); | 327 checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); |
| 327 ures_close(r); | 328 ures_close(r); |
| 328 ures_close(r2); | 329 ures_close(r2); |
| 330 #endif /* !UCONFIG_NO_COLLATION */ |
| 329 } | 331 } |
| 330 | 332 |
| 331 static void TestAliasConflict(void) { | 333 static void TestAliasConflict(void) { |
| 332 UErrorCode status = U_ZERO_ERROR; | 334 UErrorCode status = U_ZERO_ERROR; |
| 333 UResourceBundle *he = NULL; | 335 UResourceBundle *he = NULL; |
| 334 UResourceBundle *iw = NULL; | 336 UResourceBundle *iw = NULL; |
| 335 UResourceBundle *norway = NULL; | 337 UResourceBundle *norway = NULL; |
| 336 const UChar *result = NULL; | 338 const UChar *result = NULL; |
| 337 int32_t resultLen; | 339 int32_t resultLen; |
| 338 uint32_t size = 0; | 340 uint32_t size = 0; |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 if(status!= U_MISSING_RESOURCE_ERROR){ | 915 if(status!= U_MISSING_RESOURCE_ERROR){ |
| 914 log_err("Did not get the expected error from an empty resource bundl
e. Expected : %s Got: %s\n", | 916 log_err("Did not get the expected error from an empty resource bundl
e. Expected : %s Got: %s\n", |
| 915 u_errorName(U_MISSING_RESOURCE_ERROR),u_errorName(status)); | 917 u_errorName(U_MISSING_RESOURCE_ERROR),u_errorName(status)); |
| 916 } | 918 } |
| 917 } | 919 } |
| 918 ures_close(dResB); | 920 ures_close(dResB); |
| 919 ures_close(resb); | 921 ures_close(resb); |
| 920 } | 922 } |
| 921 | 923 |
| 922 static void TestBinaryCollationData(){ | 924 static void TestBinaryCollationData(){ |
| 925 #if !UCONFIG_NO_COLLATION |
| 923 UErrorCode status=U_ZERO_ERROR; | 926 UErrorCode status=U_ZERO_ERROR; |
| 924 const char* locale="te"; | 927 const char* locale="te"; |
| 925 #if !UCONFIG_NO_COLLATION | |
| 926 const char* testdatapath; | 928 const char* testdatapath; |
| 927 #endif | |
| 928 UResourceBundle *teRes = NULL; | 929 UResourceBundle *teRes = NULL; |
| 929 UResourceBundle *coll=NULL; | 930 UResourceBundle *coll=NULL; |
| 930 UResourceBundle *binColl = NULL; | 931 UResourceBundle *binColl = NULL; |
| 931 uint8_t *binResult = NULL; | 932 uint8_t *binResult = NULL; |
| 932 int32_t len=0; | 933 int32_t len=0; |
| 933 const char* action="testing the binary collaton data"; | 934 const char* action="testing the binary collaton data"; |
| 934 | 935 |
| 935 #if !UCONFIG_NO_COLLATION | |
| 936 log_verbose("Testing binary collation data resource......\n"); | 936 log_verbose("Testing binary collation data resource......\n"); |
| 937 | 937 |
| 938 testdatapath=loadTestData(&status); | 938 testdatapath=loadTestData(&status); |
| 939 if(U_FAILURE(status)) | 939 if(U_FAILURE(status)) |
| 940 { | 940 { |
| 941 log_data_err("Could not load testdata.dat %s \n",myErrorName(status)); | 941 log_data_err("Could not load testdata.dat %s \n",myErrorName(status)); |
| 942 return; | 942 return; |
| 943 } | 943 } |
| 944 | 944 |
| 945 | 945 |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 locName, versionArray[0], versionArray[1], versionArray[2],
versionArray[3]); | 1400 locName, versionArray[0], versionArray[1], versionArray[2],
versionArray[3]); |
| 1401 break; | 1401 break; |
| 1402 } | 1402 } |
| 1403 } | 1403 } |
| 1404 ures_close(resB); | 1404 ures_close(resB); |
| 1405 } | 1405 } |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 | 1408 |
| 1409 static void TestGetVersionColl(){ | 1409 static void TestGetVersionColl(){ |
| 1410 #if !UCONFIG_NO_COLLATION |
| 1410 UVersionInfo minVersionArray = {0x00, 0x00, 0x00, 0x00}; | 1411 UVersionInfo minVersionArray = {0x00, 0x00, 0x00, 0x00}; |
| 1411 UVersionInfo maxVersionArray = {0x50, 0x80, 0xcf, 0xcf}; | 1412 UVersionInfo maxVersionArray = {0x50, 0x80, 0xcf, 0xcf}; |
| 1412 UVersionInfo versionArray; | 1413 UVersionInfo versionArray; |
| 1413 UErrorCode status= U_ZERO_ERROR; | 1414 UErrorCode status= U_ZERO_ERROR; |
| 1414 UResourceBundle* resB = NULL; | 1415 UResourceBundle* resB = NULL; |
| 1415 UEnumeration *locs= NULL; | 1416 UEnumeration *locs= NULL; |
| 1416 int i=0; | 1417 int i=0; |
| 1417 const char *locName = "root"; | 1418 const char *locName = "root"; |
| 1418 int32_t locLen; | 1419 int32_t locLen; |
| 1419 const UChar* rules =NULL; | 1420 const UChar* rules =NULL; |
| 1420 int32_t len = 0; | 1421 int32_t len = 0; |
| 1421 | 1422 |
| 1423 /* test NUL termination of UCARules */ |
| 1424 resB = ures_open(U_ICUDATA_COLL,locName, &status); |
| 1425 rules = tres_getString(resB,-1,"UCARules",&len, &status); |
| 1426 if(!rules || U_FAILURE(status)) { |
| 1427 log_data_err("Could not load UCARules for locale %s\n", locName); |
| 1428 status = U_ZERO_ERROR; |
| 1429 } else if(u_strlen(rules) != len){ |
| 1430 log_err("UCARules string not nul terminated! \n"); |
| 1431 } |
| 1432 ures_close(resB); |
| 1433 |
| 1422 log_verbose("The ures_getVersion(%s) tests begin : \n", U_ICUDATA_COLL); | 1434 log_verbose("The ures_getVersion(%s) tests begin : \n", U_ICUDATA_COLL); |
| 1423 locs = ures_openAvailableLocales(U_ICUDATA_COLL, &status); | 1435 locs = ures_openAvailableLocales(U_ICUDATA_COLL, &status); |
| 1424 if (U_FAILURE(status)) { | 1436 if (U_FAILURE(status)) { |
| 1425 log_err_status(status, "enumeration of %s failed.: %s\n", U_ICUDATA_COLL,
myErrorName(status)); | 1437 log_err_status(status, "enumeration of %s failed.: %s\n", U_ICUDATA_COLL,
myErrorName(status)); |
| 1426 return; | 1438 return; |
| 1427 } | 1439 } |
| 1428 | 1440 |
| 1429 do{ | 1441 for (;;) { |
| 1430 log_verbose("Testing version number for locale %s\n", locName); | 1442 log_verbose("Testing version number for locale %s\n", locName); |
| 1431 resB = ures_open(U_ICUDATA_COLL,locName, &status); | 1443 resB = ures_open(U_ICUDATA_COLL,locName, &status); |
| 1432 if (U_FAILURE(status)) { | 1444 if (U_FAILURE(status)) { |
| 1433 log_err("Resource bundle creation for locale %s:%s failed.: %s\n", U
_ICUDATA_COLL, locName, myErrorName(status)); | 1445 log_err("Resource bundle creation for locale %s:%s failed.: %s\n", U
_ICUDATA_COLL, locName, myErrorName(status)); |
| 1434 ures_close(resB); | 1446 ures_close(resB); |
| 1435 return; | 1447 break; |
| 1436 } | |
| 1437 /* test NUL termination of UCARules */ | |
| 1438 rules = tres_getString(resB,-1,"UCARules",&len, &status); | |
| 1439 if(!rules || U_FAILURE(status)) { | |
| 1440 log_data_err("Could not load UCARules for locale %s\n", locName); | |
| 1441 continue; | |
| 1442 } | |
| 1443 if(u_strlen(rules) != len){ | |
| 1444 log_err("UCARules string not nul terminated! \n"); | |
| 1445 } | 1448 } |
| 1446 ures_getVersion(resB, versionArray); | 1449 ures_getVersion(resB, versionArray); |
| 1447 for (i=0; i<4; ++i) { | 1450 for (i=0; i<4; ++i) { |
| 1448 if (versionArray[i] < minVersionArray[i] || | 1451 if (versionArray[i] < minVersionArray[i] || |
| 1449 versionArray[i] > maxVersionArray[i]) | 1452 versionArray[i] > maxVersionArray[i]) |
| 1450 { | 1453 { |
| 1451 log_err("Testing ures_getVersion(%-5s) - unexpected result: %d.%
d.%d.%d\n", | 1454 log_err("Testing ures_getVersion(%-5s) - unexpected result: %d.%
d.%d.%d\n", |
| 1452 locName, versionArray[0], versionArray[1], versionArray[2],
versionArray[3]); | 1455 locName, versionArray[0], versionArray[1], versionArray[2],
versionArray[3]); |
| 1453 break; | 1456 break; |
| 1454 } | 1457 } |
| 1455 } | 1458 } |
| 1456 ures_close(resB); | 1459 ures_close(resB); |
| 1457 } while((locName = uenum_next(locs,&locLen,&status))&&U_SUCCESS(status)); | 1460 locName = uenum_next(locs, &locLen, &status); |
| 1458 | 1461 if(U_FAILURE(status)) { |
| 1459 if(U_FAILURE(status)) { | 1462 log_err("uenum_next(locs) error %s\n", u_errorName(status)); |
| 1460 log_err("Err %s testing Collation locales.\n", u_errorName(status)); | 1463 break; |
| 1464 } |
| 1465 if(locName == NULL) { |
| 1466 break; |
| 1467 } |
| 1461 } | 1468 } |
| 1462 uenum_close(locs); | 1469 uenum_close(locs); |
| 1470 #endif /* !UCONFIG_NO_COLLATION */ |
| 1463 } | 1471 } |
| 1464 | 1472 |
| 1465 static void TestResourceBundles() | 1473 static void TestResourceBundles() |
| 1466 { | 1474 { |
| 1467 UErrorCode status = U_ZERO_ERROR; | 1475 UErrorCode status = U_ZERO_ERROR; |
| 1468 loadTestData(&status); | 1476 loadTestData(&status); |
| 1469 if(U_FAILURE(status)) { | 1477 if(U_FAILURE(status)) { |
| 1470 log_data_err("Could not load testdata.dat, status = %s\n", u_errorName(s
tatus)); | 1478 log_data_err("Could not load testdata.dat, status = %s\n", u_errorName(s
tatus)); |
| 1471 return; | 1479 return; |
| 1472 } | 1480 } |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 ures_close(fr_FR); | 2121 ures_close(fr_FR); |
| 2114 /* Temporary hack err actually should be U_USING_FALLBACK_ERROR */ | 2122 /* Temporary hack err actually should be U_USING_FALLBACK_ERROR */ |
| 2115 /* Test Jitterbug 552 fallback mechanism of aliased data */ | 2123 /* Test Jitterbug 552 fallback mechanism of aliased data */ |
| 2116 { | 2124 { |
| 2117 UErrorCode err =U_ZERO_ERROR; | 2125 UErrorCode err =U_ZERO_ERROR; |
| 2118 UResourceBundle* myResB = ures_open(NULL,"no_NO_NY",&err); | 2126 UResourceBundle* myResB = ures_open(NULL,"no_NO_NY",&err); |
| 2119 UResourceBundle* resLocID = ures_getByKey(myResB, "Version", NULL, &err)
; | 2127 UResourceBundle* resLocID = ures_getByKey(myResB, "Version", NULL, &err)
; |
| 2120 UResourceBundle* tResB; | 2128 UResourceBundle* tResB; |
| 2121 UResourceBundle* zoneResource; | 2129 UResourceBundle* zoneResource; |
| 2122 const UChar* version = NULL; | 2130 const UChar* version = NULL; |
| 2123 static const UChar versionStr[] = { 0x0032, 0x002E, 0x0030, 0x002E, 0x00
39, 0x0030, 0x002E, 0x0036, 0x0031, 0x0000}; | 2131 static const UChar versionStr[] = { 0x0032, 0x002E, 0x0031, 0x002E, 0x00
36, 0x002E, 0x0036, 0x0039, 0x0000}; // 2.1.6.69 |
| 2124 | 2132 |
| 2125 if(err != U_ZERO_ERROR){ | 2133 if(err != U_ZERO_ERROR){ |
| 2126 log_data_err("Expected U_ZERO_ERROR when trying to test no_NO_NY ali
ased to nn_NO for Version err=%s\n",u_errorName(err)); | 2134 log_data_err("Expected U_ZERO_ERROR when trying to test no_NO_NY ali
ased to nn_NO for Version err=%s\n",u_errorName(err)); |
| 2127 return; | 2135 return; |
| 2128 } | 2136 } |
| 2129 version = tres_getString(resLocID, -1, NULL, &resultLen, &err); | 2137 version = tres_getString(resLocID, -1, NULL, &resultLen, &err); |
| 2130 if(u_strcmp(version, versionStr) != 0){ | 2138 if(u_strcmp(version, versionStr) != 0){ |
| 2131 char x[100]; | 2139 char x[100]; |
| 2132 char g[100]; | 2140 char g[100]; |
| 2133 u_austrcpy(x, versionStr); | 2141 u_austrcpy(x, versionStr); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2605 gotAvail?'t':'f', equivLocale, | 2613 gotAvail?'t':'f', equivLocale, |
| 2606 i/3, | 2614 i/3, |
| 2607 expectAvail?'t':'f', inLocale, expectLocale); | 2615 expectAvail?'t':'f', inLocale, expectLocale); |
| 2608 | 2616 |
| 2609 } | 2617 } |
| 2610 } | 2618 } |
| 2611 } | 2619 } |
| 2612 } | 2620 } |
| 2613 | 2621 |
| 2614 static void TestGetFunctionalEquivalent(void) { | 2622 static void TestGetFunctionalEquivalent(void) { |
| 2623 #if !UCONFIG_NO_COLLATION |
| 2615 static const char * const collCases[] = { | 2624 static const char * const collCases[] = { |
| 2616 /* avail locale equiv */ | 2625 /* avail locale equiv */ |
| 2617 "f", "sv_US_CALIFORNIA", "sv", | 2626 "f", "sv_US_CALIFORNIA", "sv", |
| 2618 "f", "zh_TW@collation=stroke", "zh@collation=stroke", /* alia
s of zh_Hant_TW */ | 2627 "f", "zh_TW@collation=stroke", "zh@collation=stroke", /* alia
s of zh_Hant_TW */ |
| 2619 "t", "zh_Hant_TW@collation=stroke", "zh@collation=stroke", | 2628 "f", "zh_Hant_TW@collation=stroke", "zh@collation=stroke", |
| 2620 "f", "sv_CN@collation=pinyin", "sv", | 2629 "f", "sv_CN@collation=pinyin", "sv", |
| 2621 "t", "zh@collation=pinyin", "zh", | 2630 "t", "zh@collation=pinyin", "zh", |
| 2622 "f", "zh_CN@collation=pinyin", "zh", /* alias of zh_Hans_CN *
/ | 2631 "f", "zh_CN@collation=pinyin", "zh", /* alias of zh_Hans_CN *
/ |
| 2623 "t", "zh_Hans_CN@collation=pinyin", "zh", | 2632 "f", "zh_Hans_CN@collation=pinyin", "zh", |
| 2624 "f", "zh_HK@collation=pinyin", "zh", /* alias of zh_Hant_HK *
/ | 2633 "f", "zh_HK@collation=pinyin", "zh", /* alias of zh_Hant_HK *
/ |
| 2625 "t", "zh_Hant_HK@collation=pinyin", "zh", | 2634 "f", "zh_Hant_HK@collation=pinyin", "zh", |
| 2626 "f", "zh_HK@collation=stroke", "zh@collation=stroke", /* alia
s of zh_Hant_HK */ | 2635 "f", "zh_HK@collation=stroke", "zh@collation=stroke", /* alia
s of zh_Hant_HK */ |
| 2627 "t", "zh_Hant_HK@collation=stroke", "zh@collation=stroke", | 2636 "f", "zh_Hant_HK@collation=stroke", "zh@collation=stroke", |
| 2628 "f", "zh_HK", "zh@collation=stroke", /* alia
s of zh_Hant_HK */ | 2637 "f", "zh_HK", "zh@collation=stroke", /* alia
s of zh_Hant_HK */ |
| 2629 "t", "zh_Hant_HK", "zh@collation=stroke", | 2638 "f", "zh_Hant_HK", "zh@collation=stroke", |
| 2630 "f", "zh_MO", "zh@collation=stroke", /* alia
s of zh_Hant_MO */ | 2639 "f", "zh_MO", "zh@collation=stroke", /* alia
s of zh_Hant_MO */ |
| 2631 "t", "zh_Hant_MO", "zh@collation=stroke", | 2640 "f", "zh_Hant_MO", "zh@collation=stroke", |
| 2632 "f", "zh_TW_STROKE", "zh@collation=stroke", | 2641 "f", "zh_TW_STROKE", "zh@collation=stroke", |
| 2633 "f", "zh_TW_STROKE@collation=big5han", "zh@collation=big5han", | 2642 "f", "zh_TW_STROKE@collation=pinyin", "zh", |
| 2634 "f", "sv_CN@calendar=japanese", "sv", | 2643 "f", "sv_CN@calendar=japanese", "sv", |
| 2635 "t", "sv@calendar=japanese", "sv", | 2644 "t", "sv@calendar=japanese", "sv", |
| 2636 "f", "zh_TW@collation=big5han", "zh@collation=big5han", /* ali
as of zh_Hant_TW */ | 2645 "f", "zh_TW@collation=pinyin", "zh", /* alias of zh_Hant_TW *
/ |
| 2637 "t", "zh_Hant_TW@collation=big5han", "zh@collation=big5han", | 2646 "f", "zh_Hant_TW@collation=pinyin", "zh", |
| 2638 "f", "zh_TW@collation=gb2312han", "zh@collation=gb2312han", /* a
lias of zh_Hant_TW */ | 2647 "f", "zh_CN@collation=stroke", "zh@collation=stroke", /* alia
s of zh_Hans_CN */ |
| 2639 "t", "zh_Hant_TW@collation=gb2312han", "zh@collation=gb2312han", | 2648 "f", "zh_Hans_CN@collation=stroke", "zh@collation=stroke", |
| 2640 "f", "zh_CN@collation=big5han", "zh@collation=big5han", /* ali
as of zh_Hans_CN */ | 2649 "t", "de@collation=phonebook", "de@collation=phonebook", |
| 2641 "t", "zh_Hans_CN@collation=big5han", "zh@collation=big5han", | |
| 2642 "f", "zh_CN@collation=gb2312han", "zh@collation=gb2312han", /* a
lias of zh_Hans_CN */ | |
| 2643 "t", "zh_Hans_CN@collation=gb2312han", "zh@collation=gb2312han", | |
| 2644 "t", "zh@collation=big5han", "zh@collation=big5han", | |
| 2645 "t", "zh@collation=gb2312han", "zh@collation=gb2312han", | |
| 2646 "t", "hi@collation=standard", "hi", | 2650 "t", "hi@collation=standard", "hi", |
| 2647 "f", "hi_AU@collation=standard;currency=CHF;calendar=buddhist", "h
i", | 2651 "f", "hi_AU@collation=standard;currency=CHF;calendar=buddhist", "h
i", |
| 2648 "t", "sv_SE@collation=pinyin", "sv", /* bug 4582 tests */ | 2652 "f", "sv_SE@collation=pinyin", "sv", /* bug 4582 tests */ |
| 2649 "f", "sv_SE_BONN@collation=pinyin", "sv", | 2653 "f", "sv_SE_BONN@collation=pinyin", "sv", |
| 2650 "t", "nl", "root", | 2654 "t", "nl", "root", |
| 2651 "t", "nl_NL", "root", | 2655 "f", "nl_NL", "root", |
| 2652 "f", "nl_NL_EEXT", "root", | 2656 "f", "nl_NL_EEXT", "root", |
| 2653 "t", "nl@collation=stroke", "root", | 2657 "t", "nl@collation=stroke", "root", |
| 2654 "t", "nl_NL@collation=stroke", "root", | 2658 "f", "nl_NL@collation=stroke", "root", |
| 2655 "f", "nl_NL_EEXT@collation=stroke", "root", | 2659 "f", "nl_NL_EEXT@collation=stroke", "root", |
| 2656 NULL | 2660 NULL |
| 2657 }; | 2661 }; |
| 2662 #endif /* !UCONFIG_NO_COLLATION */ |
| 2658 | 2663 |
| 2659 static const char *calCases[] = { | 2664 static const char *calCases[] = { |
| 2660 /* avail locale equiv */ | 2665 /* avail locale equiv */ |
| 2661 "t", "en_US_POSIX", "en@calendar=gregorian", | 2666 "t", "en_US_POSIX", "en@calendar=gregorian", |
| 2662 "f", "ja_JP_TOKYO", "ja@calendar=gregorian", | 2667 "f", "ja_JP_TOKYO", "ja@calendar=gregorian", |
| 2663 "f", "ja_JP_TOKYO@calendar=japanese", "ja@calendar=japanese", | 2668 "f", "ja_JP_TOKYO@calendar=japanese", "ja@calendar=japanese", |
| 2664 "t", "sr@calendar=gregorian", "sr@calendar=gregorian", | 2669 "t", "sr@calendar=gregorian", "sr@calendar=gregorian", |
| 2665 "t", "en", "en@calendar=gregorian", | 2670 "t", "en", "en@calendar=gregorian", |
| 2666 NULL | 2671 NULL |
| 2667 }; | 2672 }; |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3080 } | 3085 } |
| 3081 u_versionToString(testCurrent,tmp); | 3086 u_versionToString(testCurrent,tmp); |
| 3082 log_verbose("(data) CurrentCLDRVersion { %s }\n", tmp); | 3087 log_verbose("(data) CurrentCLDRVersion { %s }\n", tmp); |
| 3083 switch(memcmp(cldrVersion, testCurrent, sizeof(UVersionInfo))) { | 3088 switch(memcmp(cldrVersion, testCurrent, sizeof(UVersionInfo))) { |
| 3084 case 0: break; /* OK- current. */ | 3089 case 0: break; /* OK- current. */ |
| 3085 case -1: log_info("CLDR version is behind 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; | 3090 case -1: log_info("CLDR version is behind 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; |
| 3086 case 1: log_info("CLDR version is ahead of 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; | 3091 case 1: log_info("CLDR version is ahead of 'current' (for testdata/root.txt)
%s. Some things may fail.\n", tmp); break; |
| 3087 } | 3092 } |
| 3088 | 3093 |
| 3089 } | 3094 } |
| OLD | NEW |