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()
554 static UBool scriptsContain(UScriptCode scripts[], int32_t length, UScriptCode script) { in scriptsContain() argument
558 int32_t s=scripts[i]; in scriptsContain()
568 UScriptCode scripts[20]; in TestGetScriptExtensions() local
574 length=uscript_getScriptExtensions(0x0640, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
580 length=uscript_getScriptExtensions(0x0640, NULL, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
586 length=uscript_getScriptExtensions(0x0640, scripts, -1, &errorCode); in TestGetScriptExtensions()
592 length=uscript_getScriptExtensions(0x0640, scripts, 0, &errorCode); in TestGetScriptExtensions()
598 length=uscript_getScriptExtensions(0x0640, scripts, 1, &errorCode); in TestGetScriptExtensions()
605 length=uscript_getScriptExtensions(0x063f, scripts, 0, &errorCode); in TestGetScriptExtensions()
613 length=uscript_getScriptExtensions(-1, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
614 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_UNKNOWN) { in TestGetScriptExtensions()
619 length=uscript_getScriptExtensions(0x110000, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
620 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_UNKNOWN) { in TestGetScriptExtensions()
627 length=uscript_getScriptExtensions(0x063f, scripts, 1, &errorCode); in TestGetScriptExtensions()
628 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_ARABIC) { in TestGetScriptExtensions()
633 length=uscript_getScriptExtensions(0x0640, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
635 !scriptsContain(scripts, length, USCRIPT_ARABIC) || in TestGetScriptExtensions()
636 !scriptsContain(scripts, length, USCRIPT_SYRIAC) || in TestGetScriptExtensions()
637 !scriptsContain(scripts, length, USCRIPT_MANDAIC)) { in TestGetScriptExtensions()
642 length=uscript_getScriptExtensions(0xfdf2, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
643 …if(U_FAILURE(errorCode) || length!=2 || scripts[0]!=USCRIPT_ARABIC || scripts[1]!=USCRIPT_THAANA) { in TestGetScriptExtensions()
648 length=uscript_getScriptExtensions(0xff65, scripts, UPRV_LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
649 … if(U_FAILURE(errorCode) || length!=6 || scripts[0]!=USCRIPT_BOPOMOFO || scripts[5]!=USCRIPT_YI) { in TestGetScriptExtensions()