Lines Matching full:scripts
16 static void scriptsToString(const UScriptCode scripts[], int32_t length, char s[]) { in scriptsToString() argument
19 strcpy(s, "(no scripts)"); in scriptsToString()
27 strcat(s, uscript_getShortName(scripts[i])); in scriptsToString()
157 UScriptCode scripts[5]; in TestUScriptCodeAPI() local
163 num = uscript_getCode("tg", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
164 assertEqualScripts("tg script: Cyrl", CYRILLIC, 1, scripts, num, err); // Tajik in TestUScriptCodeAPI()
166 num = uscript_getCode("xsr", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
167 assertEqualScripts("xsr script: Deva", DEVANAGARI, 1, scripts, num, err); // Sherpa in TestUScriptCodeAPI()
171 num = uscript_getCode("ja", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
172 assertEqualScripts("ja scripts: Kana Hira Hani", in TestUScriptCodeAPI()
173 JAPANESE, UPRV_LENGTHOF(JAPANESE), scripts, num, err); in TestUScriptCodeAPI()
175 num = uscript_getCode("ko", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
176 assertEqualScripts("ko scripts: Hang Hani", in TestUScriptCodeAPI()
177 KOREAN, UPRV_LENGTHOF(KOREAN), scripts, num, err); in TestUScriptCodeAPI()
179 num = uscript_getCode("zh", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
180 assertEqualScripts("zh script: Hani", HAN, 1, scripts, num, err); in TestUScriptCodeAPI()
182 num = uscript_getCode("zh-Hant", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
183 assertEqualScripts("zh-Hant scripts: Hani Bopo", HAN_BOPO, 2, scripts, num, err); in TestUScriptCodeAPI()
185 num = uscript_getCode("zh-TW", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
186 assertEqualScripts("zh-TW scripts: Hani Bopo", HAN_BOPO, 2, scripts, num, err); in TestUScriptCodeAPI()
190 num = uscript_getCode("ro-RO", scripts, UPRV_LENGTHOF(scripts), &err); in TestUScriptCodeAPI()
191 assertEqualScripts("ro-RO script: Latn", LATIN, 1, scripts, num, err); in TestUScriptCodeAPI()
380 * Unicode 5 and later encode some of these scripts and give them long names. in TestUScriptCodeAPI()
546 static UBool scriptsContain(UScriptCode scripts[], int32_t length, UScriptCode script) { in scriptsContain() argument
550 int32_t s=scripts[i]; in scriptsContain()
560 UScriptCode scripts[20]; in TestGetScriptExtensions() local
566 length=uscript_getScriptExtensions(0x0640, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
572 length=uscript_getScriptExtensions(0x0640, NULL, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
578 length=uscript_getScriptExtensions(0x0640, scripts, -1, &errorCode); in TestGetScriptExtensions()
584 length=uscript_getScriptExtensions(0x0640, scripts, 0, &errorCode); in TestGetScriptExtensions()
590 length=uscript_getScriptExtensions(0x0640, scripts, 1, &errorCode); in TestGetScriptExtensions()
597 length=uscript_getScriptExtensions(0x063f, scripts, 0, &errorCode); in TestGetScriptExtensions()
605 length=uscript_getScriptExtensions(-1, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
606 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_UNKNOWN) { in TestGetScriptExtensions()
611 length=uscript_getScriptExtensions(0x110000, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
612 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_UNKNOWN) { in TestGetScriptExtensions()
619 length=uscript_getScriptExtensions(0x063f, scripts, 1, &errorCode); in TestGetScriptExtensions()
620 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_ARABIC) { in TestGetScriptExtensions()
625 length=uscript_getScriptExtensions(0x0640, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
627 !scriptsContain(scripts, length, USCRIPT_ARABIC) || in TestGetScriptExtensions()
628 !scriptsContain(scripts, length, USCRIPT_SYRIAC) || in TestGetScriptExtensions()
629 !scriptsContain(scripts, length, USCRIPT_MANDAIC)) { in TestGetScriptExtensions()
634 length=uscript_getScriptExtensions(0xfdf2, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
635 …if(U_FAILURE(errorCode) || length!=2 || scripts[0]!=USCRIPT_ARABIC || scripts[1]!=USCRIPT_THAANA) { in TestGetScriptExtensions()
640 length=uscript_getScriptExtensions(0xff65, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
641 … if(U_FAILURE(errorCode) || length!=6 || scripts[0]!=USCRIPT_BOPOMOFO || scripts[5]!=USCRIPT_YI) { in TestGetScriptExtensions()