CLDRLocaleMatcherTest.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. # TODO: this file has not yet been included in the main CLDR release.
  2. # The intent is to verify this file against the Go implementation and then
  3. # correct the cases and add merge in other interesting test cases.
  4. # See TestCLDRCompliance in match_test.go, as well as the list of exceptions
  5. # defined in the map skip below it, for the work in progress.
  6. # Data-driven test for the XLocaleMatcher.
  7. # Format
  8. # • Everything after "#" is a comment
  9. # • Arguments are separated by ";". They are:
  10. # supported ; desired ; expected
  11. # • The supported may have the threshold distance reset as a first item, eg 50, en, fr
  12. # A line starting with @debug will reach a statement in the test code where you can put a breakpoint for debugging
  13. # The test code also supports reformatting this file, by setting the REFORMAT flag.
  14. ##################################################
  15. # testParentLocales
  16. # es-419, es-AR, and es-MX are in a cluster; es is in a different one
  17. es-419, es-ES ; es-AR ; es-419
  18. es-ES, es-419 ; es-AR ; es-419
  19. es-419, es ; es-AR ; es-419
  20. es, es-419 ; es-AR ; es-419
  21. es-MX, es ; es-AR ; es-MX
  22. es, es-MX ; es-AR ; es-MX
  23. # en-GB, en-AU, and en-NZ are in a cluster; en in a different one
  24. en-GB, en-US ; en-AU ; en-GB
  25. en-US, en-GB ; en-AU ; en-GB
  26. en-GB, en ; en-AU ; en-GB
  27. en, en-GB ; en-AU ; en-GB
  28. en-NZ, en-US ; en-AU ; en-NZ
  29. en-US, en-NZ ; en-AU ; en-NZ
  30. en-NZ, en ; en-AU ; en-NZ
  31. en, en-NZ ; en-AU ; en-NZ
  32. # pt-AU and pt-PT in one cluster; pt-BR in another
  33. pt-PT, pt-BR ; pt-AO ; pt-PT
  34. pt-BR, pt-PT ; pt-AO ; pt-PT
  35. pt-PT, pt ; pt-AO ; pt-PT
  36. pt, pt-PT ; pt-AO ; pt-PT
  37. zh-MO, zh-TW ; zh-HK ; zh-MO
  38. zh-TW, zh-MO ; zh-HK ; zh-MO
  39. zh-MO, zh-TW ; zh-HK ; zh-MO
  40. zh-TW, zh-MO ; zh-HK ; zh-MO
  41. zh-MO, zh-CN ; zh-HK ; zh-MO
  42. zh-CN, zh-MO ; zh-HK ; zh-MO
  43. zh-MO, zh ; zh-HK ; zh-MO
  44. zh, zh-MO ; zh-HK ; zh-MO
  45. ##################################################
  46. # testChinese
  47. zh-CN, zh-TW, iw ; zh-Hant-TW ; zh-TW
  48. zh-CN, zh-TW, iw ; zh-Hant ; zh-TW
  49. zh-CN, zh-TW, iw ; zh-TW ; zh-TW
  50. zh-CN, zh-TW, iw ; zh-Hans-CN ; zh-CN
  51. zh-CN, zh-TW, iw ; zh-CN ; zh-CN
  52. zh-CN, zh-TW, iw ; zh ; zh-CN
  53. ##################################################
  54. # testenGB
  55. fr, en, en-GB, es-419, es-MX, es ; en-NZ ; en-GB
  56. fr, en, en-GB, es-419, es-MX, es ; es-ES ; es
  57. fr, en, en-GB, es-419, es-MX, es ; es-AR ; es-419
  58. fr, en, en-GB, es-419, es-MX, es ; es-MX ; es-MX
  59. ##################################################
  60. # testFallbacks
  61. 91, en, hi ; sa ; hi
  62. ##################################################
  63. # testBasics
  64. fr, en-GB, en ; en-GB ; en-GB
  65. fr, en-GB, en ; en ; en
  66. fr, en-GB, en ; fr ; fr
  67. fr, en-GB, en ; ja ; fr # return first if no match
  68. ##################################################
  69. # testFallback
  70. # check that script fallbacks are handled right
  71. zh-CN, zh-TW, iw ; zh-Hant ; zh-TW
  72. zh-CN, zh-TW, iw ; zh ; zh-CN
  73. zh-CN, zh-TW, iw ; zh-Hans-CN ; zh-CN
  74. zh-CN, zh-TW, iw ; zh-Hant-HK ; zh-TW
  75. zh-CN, zh-TW, iw ; he-IT ; iw
  76. ##################################################
  77. # testSpecials
  78. # check that nearby languages are handled
  79. en, fil, ro, nn ; tl ; fil
  80. en, fil, ro, nn ; mo ; ro
  81. en, fil, ro, nn ; nb ; nn
  82. # make sure default works
  83. en, fil, ro, nn ; ja ; en
  84. ##################################################
  85. # testRegionalSpecials
  86. # verify that en-AU is closer to en-GB than to en (which is en-US)
  87. en, en-GB, es, es-419 ; es-MX ; es-419
  88. en, en-GB, es, es-419 ; en-AU ; en-GB
  89. en, en-GB, es, es-419 ; es-ES ; es
  90. ##################################################
  91. # testHK
  92. # HK and MO are closer to each other for Hant than to TW
  93. zh, zh-TW, zh-MO ; zh-HK ; zh-MO
  94. zh, zh-TW, zh-HK ; zh-MO ; zh-HK
  95. ##################################################
  96. # testMatch-exact
  97. # see localeDistance.txt
  98. ##################################################
  99. # testMatch-none
  100. # see localeDistance.txt
  101. ##################################################
  102. # testMatch-matchOnMazimized
  103. zh, zh-Hant ; und-TW ; zh-Hant # und-TW should be closer to zh-Hant than to zh
  104. en-Hant-TW, und-TW ; zh-Hant ; und-TW # zh-Hant should be closer to und-TW than to en-Hant-TW
  105. en-Hant-TW, und-TW ; zh ; und-TW # zh should be closer to und-TW than to en-Hant-TW
  106. ##################################################
  107. # testMatchGrandfatheredCode
  108. fr, i-klingon, en-Latn-US ; en-GB-oed ; en-Latn-US
  109. ##################################################
  110. # testGetBestMatchForList-exactMatch
  111. fr, en-GB, ja, es-ES, es-MX ; ja, de ; ja
  112. ##################################################
  113. # testGetBestMatchForList-simpleVariantMatch
  114. fr, en-GB, ja, es-ES, es-MX ; de, en-US ; en-GB # Intentionally avoiding a perfect-match or two candidates for variant matches.
  115. # Fallback.
  116. fr, en-GB, ja, es-ES, es-MX ; de, zh ; fr
  117. ##################################################
  118. # testGetBestMatchForList-matchOnMaximized
  119. # Check that if the preference is maximized already, it works as well.
  120. en, ja ; ja-Jpan-JP, en-AU ; ja # Match for ja-Jpan-JP (maximized already)
  121. # ja-JP matches ja on likely subtags, and it's listed first, thus it wins over the second preference en-GB.
  122. en, ja ; ja-JP, en-US ; ja # Match for ja-Jpan-JP (maximized already)
  123. # Check that if the preference is maximized already, it works as well.
  124. en, ja ; ja-Jpan-JP, en-US ; ja # Match for ja-Jpan-JP (maximized already)
  125. ##################################################
  126. # testGetBestMatchForList-noMatchOnMaximized
  127. # Regression test for http://b/5714572 .
  128. # de maximizes to de-DE. Pick the exact match for the secondary language instead.
  129. en, de, fr, ja ; de-CH, fr ; de
  130. ##################################################
  131. # testBestMatchForTraditionalChinese
  132. # Scenario: An application that only supports Simplified Chinese (and some other languages),
  133. # but does not support Traditional Chinese. zh-Hans-CN could be replaced with zh-CN, zh, or
  134. # zh-Hans, it wouldn't make much of a difference.
  135. # The script distance (simplified vs. traditional Han) is considered small enough
  136. # to be an acceptable match. The regional difference is considered almost insignificant.
  137. fr, zh-Hans-CN, en-US ; zh-TW ; zh-Hans-CN
  138. fr, zh-Hans-CN, en-US ; zh-Hant ; zh-Hans-CN
  139. # For geo-political reasons, you might want to avoid a zh-Hant -> zh-Hans match.
  140. # In this case, if zh-TW, zh-HK or a tag starting with zh-Hant is requested, you can
  141. # change your call to getBestMatch to include a 2nd language preference.
  142. # "en" is a better match since its distance to "en-US" is closer than the distance
  143. # from "zh-TW" to "zh-CN" (script distance).
  144. fr, zh-Hans-CN, en-US ; zh-TW, en ; en-US
  145. fr, zh-Hans-CN, en-US ; zh-Hant-CN, en, en ; en-US
  146. fr, zh-Hans-CN, en-US ; zh-Hans, en ; zh-Hans-CN
  147. ##################################################
  148. # testUndefined
  149. # When the undefined language doesn't match anything in the list,
  150. # getBestMatch returns the default, as usual.
  151. it, fr ; und ; it
  152. # When it *does* occur in the list, bestMatch returns it, as expected.
  153. it, und ; und ; und
  154. # The unusual part: max("und") = "en-Latn-US", and since matching is based on maximized
  155. # tags, the undefined language would normally match English. But that would produce the
  156. # counterintuitive results that getBestMatch("und", XLocaleMatcher("it,en")) would be "en", and
  157. # getBestMatch("en", XLocaleMatcher("it,und")) would be "und".
  158. # To avoid that, we change the matcher's definitions of max
  159. # so that max("und")="und". That produces the following, more desirable
  160. # results:
  161. it, en ; und ; it
  162. it, und ; en ; it
  163. ##################################################
  164. # testGetBestMatch-regionDistance
  165. es-AR, es ; es-MX ; es-AR
  166. fr, en, en-GB ; en-CA ; en-GB
  167. de-AT, de-DE, de-CH ; de ; de-DE
  168. ##################################################
  169. # testAsymmetry
  170. mul, nl ; af ; nl # af => nl
  171. mul, af ; nl ; mul # but nl !=> af
  172. ##################################################
  173. # testGetBestMatchForList-matchOnMaximized2
  174. # ja-JP matches ja on likely subtags, and it's listed first, thus it wins over the second preference en-GB.
  175. fr, en-GB, ja, es-ES, es-MX ; ja-JP, en-GB ; ja # Match for ja-JP, with likely region subtag
  176. # Check that if the preference is maximized already, it works as well.
  177. fr, en-GB, ja, es-ES, es-MX ; ja-Jpan-JP, en-GB ; ja # Match for ja-Jpan-JP (maximized already)
  178. ##################################################
  179. # testGetBestMatchForList-closeEnoughMatchOnMaximized
  180. en-GB, en, de, fr, ja ; de-CH, fr ; de
  181. en-GB, en, de, fr, ja ; en-US, ar, nl, de, ja ; en
  182. ##################################################
  183. # testGetBestMatchForPortuguese
  184. # pt might be supported and not pt-PT
  185. # European user who prefers Spanish over Brazillian Portuguese as a fallback.
  186. pt-PT, pt-BR, es, es-419 ; pt-PT, es, pt ; pt-PT
  187. pt-PT, pt, es, es-419 ; pt-PT, es, pt ; pt-PT # pt implicit
  188. # Brazillian user who prefers South American Spanish over European Portuguese as a fallback.
  189. # The asymmetry between this case and above is because it's "pt-PT" that's missing between the
  190. # matchers as "pt-BR" is a much more common language.
  191. pt-PT, pt-BR, es, es-419 ; pt, es-419, pt-PT ; pt-BR
  192. pt-PT, pt-BR, es, es-419 ; pt-PT, es, pt ; pt-PT
  193. pt-PT, pt, es, es-419 ; pt-PT, es, pt ; pt-PT
  194. pt-PT, pt, es, es-419 ; pt, es-419, pt-PT ; pt
  195. pt-BR, es, es-419 ; pt, es-419, pt-PT ; pt-BR
  196. # Code that adds the user's country can get "pt-US" for a user's language.
  197. # That should fall back to "pt-BR".
  198. pt-PT, pt-BR, es, es-419 ; pt-US, pt-PT ; pt-BR
  199. pt-PT, pt, es, es-419 ; pt-US, pt-PT, pt ; pt # pt-BR implicit
  200. ##################################################
  201. # testVariantWithScriptMatch 1 and 2
  202. fr, en, sv ; en-GB ; en
  203. fr, en, sv ; en-GB ; en
  204. en, sv ; en-GB, sv ; en
  205. ##################################################
  206. # testLongLists
  207. en, sv ; sv ; sv
  208. af, am, ar, az, be, bg, bn, bs, ca, cs, cy, cy, da, de, el, en, en-GB, es, es-419, et, eu, fa, fi, fil, fr, ga, gl, gu, hi, hr, hu, hy, id, is, it, iw, ja, ka, kk, km, kn, ko, ky, lo, lt, lv, mk, ml, mn, mr, ms, my, ne, nl, no, pa, pl, pt, pt-PT, ro, ru, si, sk, sl, sq, sr, sr-Latn, sv, sw, ta, te, th, tr, uk, ur, uz, vi, zh-CN, zh-TW, zu ; sv ; sv
  209. af, af-NA, af-ZA, agq, agq-CM, ak, ak-GH, am, am-ET, ar, ar-001, ar-AE, ar-BH, ar-DJ, ar-DZ, ar-EG, ar-EH, ar-ER, ar-IL, ar-IQ, ar-JO, ar-KM, ar-KW, ar-LB, ar-LY, ar-MA, ar-MR, ar-OM, ar-PS, ar-QA, ar-SA, ar-SD, ar-SO, ar-SS, ar-SY, ar-TD, ar-TN, ar-YE, as, as-IN, asa, asa-TZ, ast, ast-ES, az, az-Cyrl, az-Cyrl-AZ, az-Latn, az-Latn-AZ, bas, bas-CM, be, be-BY, bem, bem-ZM, bez, bez-TZ, bg, bg-BG, bm, bm-ML, bn, bn-BD, bn-IN, bo, bo-CN, bo-IN, br, br-FR, brx, brx-IN, bs, bs-Cyrl, bs-Cyrl-BA, bs-Latn, bs-Latn-BA, ca, ca-AD, ca-ES, ca-ES-VALENCIA, ca-FR, ca-IT, ce, ce-RU, cgg, cgg-UG, chr, chr-US, ckb, ckb-IQ, ckb-IR, cs, cs-CZ, cu, cu-RU, cy, cy-GB, da, da-DK, da-GL, dav, dav-KE, de, de-AT, de-BE, de-CH, de-DE, de-LI, de-LU, dje, dje-NE, dsb, dsb-DE, dua, dua-CM, dyo, dyo-SN, dz, dz-BT, ebu, ebu-KE, ee, ee-GH, ee-TG, el, el-CY, el-GR, en, en-001, en-150, en-AG, en-AI, en-AS, en-AT, en-AU, en-BB, en-BE, en-BI, en-BM, en-BS, en-BW, en-BZ, en-CA, en-CC, en-CH, en-CK, en-CM, en-CX, en-CY, en-DE, en-DG, en-DK, en-DM, en-ER, en-FI, en-FJ, en-FK, en-FM, en-GB, en-GD, en-GG, en-GH, en-GI, en-GM, en-GU, en-GY, en-HK, en-IE, en-IL, en-IM, en-IN, en-IO, en-JE, en-JM, en-KE, en-KI, en-KN, en-KY, en-LC, en-LR, en-LS, en-MG, en-MH, en-MO, en-MP, en-MS, en-MT, en-MU, en-MW, en-MY, en-NA, en-NF, en-NG, en-NL, en-NR, en-NU, en-NZ, en-PG, en-PH, en-PK, en-PN, en-PR, en-PW, en-RW, en-SB, en-SC, en-SD, en-SE, en-SG, en-SH, en-SI, en-SL, en-SS, en-SX, en-SZ, en-TC, en-TK, en-TO, en-TT, en-TV, en-TZ, en-UG, en-UM, en-US, en-US-POSIX, en-VC, en-VG, en-VI, en-VU, en-WS, en-ZA, en-ZM, en-ZW, eo, eo-001, es, es-419, es-AR, es-BO, es-CL, es-CO, es-CR, es-CU, es-DO, es-EA, es-EC, es-ES, es-GQ, es-GT, es-HN, es-IC, es-MX, es-NI, es-PA, es-PE, es-PH, es-PR, es-PY, es-SV, es-US, es-UY, es-VE, et, et-EE, eu, eu-ES, ewo, ewo-CM, fa, fa-AF, fa-IR, ff, ff-CM, ff-GN, ff-MR, ff-SN, fi, fi-FI, fil, fil-PH, fo, fo-DK, fo-FO, fr, fr-BE, fr-BF, fr-BI, fr-BJ, fr-BL, fr-CA, fr-CD, fr-CF, fr-CG, fr-CH, fr-CI, fr-CM, fr-DJ, fr-DZ, fr-FR, fr-GA, fr-GF, fr-GN, fr-GP, fr-GQ, fr-HT, fr-KM, fr-LU, fr-MA, fr-MC, fr-MF, fr-MG, fr-ML, fr-MQ, fr-MR, fr-MU, fr-NC, fr-NE, fr-PF, fr-PM, fr-RE, fr-RW, fr-SC, fr-SN, fr-SY, fr-TD, fr-TG, fr-TN, fr-VU, fr-WF, fr-YT, fur, fur-IT, fy, fy-NL, ga, ga-IE, gd, gd-GB, gl, gl-ES, gsw, gsw-CH, gsw-FR, gsw-LI, gu, gu-IN, guz, guz-KE, gv, gv-IM, ha, ha-GH, ha-NE, ha-NG, haw, haw-US, he, he-IL, hi, hi-IN, hr, hr-BA, hr-HR, hsb, hsb-DE, hu, hu-HU, hy, hy-AM, id, id-ID, ig, ig-NG, ii, ii-CN, is, is-IS, it, it-CH, it-IT, it-SM, ja, ja-JP, jgo, jgo-CM, jmc, jmc-TZ, ka, ka-GE, kab, kab-DZ, kam, kam-KE, kde, kde-TZ, kea, kea-CV, khq, khq-ML, ki, ki-KE, kk, kk-KZ, kkj, kkj-CM, kl, kl-GL, kln, kln-KE, km, km-KH, kn, kn-IN, ko, ko-KP, ko-KR, kok, kok-IN, ks, ks-IN, ksb, ksb-TZ, ksf, ksf-CM, ksh, ksh-DE, kw, kw-GB, ky, ky-KG, lag, lag-TZ, lb, lb-LU, lg, lg-UG, lkt, lkt-US, ln, ln-AO, ln-CD, ln-CF, ln-CG, lo, lo-LA, lrc, lrc-IQ, lrc-IR, lt, lt-LT, lu, lu-CD, luo, luo-KE, luy, luy-KE, lv, lv-LV, mas, mas-KE, mas-TZ, mer, mer-KE, mfe, mfe-MU, mg, mg-MG, mgh, mgh-MZ, mgo, mgo-CM, mk, mk-MK, ml, ml-IN, mn, mn-MN, mr, mr-IN, ms, ms-BN, ms-MY, ms-SG, mt, mt-MT, mua, mua-CM, my, my-MM, mzn, mzn-IR, naq, naq-NA, nb, nb-NO, nb-SJ, nd, nd-ZW, ne, ne-IN, ne-NP, nl, nl-AW, nl-BE, nl-BQ, nl-CW, nl-NL, nl-SR, nl-SX, nmg, nmg-CM, nn, nn-NO, nnh, nnh-CM, nus, nus-SS, nyn, nyn-UG, om, om-ET, om-KE, or, or-IN, os, os-GE, os-RU, pa, pa-Arab, pa-Arab-PK, pa-Guru, pa-Guru-IN, pl, pl-PL, prg, prg-001, ps, ps-AF, pt, pt-AO, pt-BR, pt-CV, pt-GW, pt-MO, pt-MZ, pt-PT, pt-ST, pt-TL, qu, qu-BO, qu-EC, qu-PE, rm, rm-CH, rn, rn-BI, ro, ro-MD, ro-RO, rof, rof-TZ, root, ru, ru-BY, ru-KG, ru-KZ, ru-MD, ru-RU, ru-UA, rw, rw-RW, rwk, rwk-TZ, sah, sah-RU, saq, saq-KE, sbp, sbp-TZ, se, se-FI, se-NO, se-SE, seh, seh-MZ, ses, ses-ML, sg, sg-CF, shi, shi-Latn, shi-Latn-MA, shi-Tfng, shi-Tfng-MA, si, si-LK, sk, sk-SK, sl, sl-SI, smn, smn-FI, sn, sn-ZW, so, so-DJ, so-ET, so-KE, so-SO, sq, sq-AL, sq-MK, sq-XK, sr, sr-Cyrl, sr-Cyrl-BA, sr-Cyrl-ME, sr-Cyrl-RS, sr-Cyrl-XK, sr-Latn, sr-Latn-BA, sr-Latn-ME, sr-Latn-RS, sr-Latn-XK, sv, sv-AX, sv-FI, sv-SE, sw, sw-CD, sw-KE, sw-TZ, sw-UG, ta, ta-IN, ta-LK, ta-MY, ta-SG, te, te-IN, teo, teo-KE, teo-UG, th, th-TH, ti, ti-ER, ti-ET, tk, tk-TM, to, to-TO, tr, tr-CY, tr-TR, twq, twq-NE, tzm, tzm-MA, ug, ug-CN, uk, uk-UA, ur, ur-IN, ur-PK, uz, uz-Arab, uz-Arab-AF, uz-Cyrl, uz-Cyrl-UZ, uz-Latn, uz-Latn-UZ, vai, vai-Latn, vai-Latn-LR, vai-Vaii, vai-Vaii-LR, vi, vi-VN, vo, vo-001, vun, vun-TZ, wae, wae-CH, xog, xog-UG, yav, yav-CM, yi, yi-001, yo, yo-BJ, yo-NG, zgh, zgh-MA, zh, zh-Hans, zh-Hans-CN, zh-Hans-HK, zh-Hans-MO, zh-Hans-SG, zh-Hant, zh-Hant-HK, zh-Hant-MO, zh-Hant-TW, zu, zu-ZA ; sv ; sv
  210. ##################################################
  211. # test8288
  212. it, en ; und ; it
  213. it, en ; und, en ; en
  214. # examples from
  215. # https://unicode.org/repos/cldr/tags/latest/common/bcp47/
  216. # https://unicode.org/repos/cldr/tags/latest/common/validity/variant.xml
  217. ##################################################
  218. # testUnHack
  219. en-NZ, en-IT ; en-US ; en-NZ
  220. ##################################################
  221. # testEmptySupported => null
  222. ; en ; null
  223. ##################################################
  224. # testVariantsAndExtensions
  225. ##################################################
  226. # tests the .combine() method
  227. und, fr ; fr-BE-fonipa ; fr ; fr-BE-fonipa
  228. und, fr-CA ; fr-BE-fonipa ; fr-CA ; fr-BE-fonipa
  229. und, fr-fonupa ; fr-BE-fonipa ; fr-fonupa ; fr-BE-fonipa
  230. und, no ; nn-BE-fonipa ; no ; no-BE-fonipa
  231. und, en-GB-u-sd-gbsct ; en-fonipa-u-nu-Arab-ca-buddhist-t-m0-iso-i0-pinyin ; en-GB-u-sd-gbsct ; en-GB-fonipa-u-nu-Arab-ca-buddhist-t-m0-iso-i0-pinyin
  232. en-PSCRACK, de-PSCRACK, fr-PSCRACK, pt-PT-PSCRACK ; fr-PSCRACK ; fr-PSCRACK
  233. en-PSCRACK, de-PSCRACK, fr-PSCRACK, pt-PT-PSCRACK ; fr ; fr-PSCRACK
  234. en-PSCRACK, de-PSCRACK, fr-PSCRACK, pt-PT-PSCRACK ; de-CH ; de-PSCRACK
  235. ##################################################
  236. # testClusters
  237. # we favor es-419 over others in cluster. Clusters: es- {ES, MA, EA} {419, AR, MX}
  238. und, es, es-MA, es-MX, es-419 ; es-AR ; es-419
  239. und, es-MA, es, es-419, es-MX ; es-AR ; es-419
  240. und, es, es-MA, es-MX, es-419 ; es-EA ; es
  241. und, es-MA, es, es-419, es-MX ; es-EA ; es
  242. # of course, fall back to within cluster
  243. und, es, es-MA, es-MX ; es-AR ; es-MX
  244. und, es-MA, es, es-MX ; es-AR ; es-MX
  245. und, es-MA, es-MX, es-419 ; es-EA ; es-MA
  246. und, es-MA, es-419, es-MX ; es-EA ; es-MA
  247. # we favor es-GB over others in cluster. Clusters: en- {US, GU, VI} {GB, IN, ZA}
  248. und, en, en-GU, en-IN, en-GB ; en-ZA ; en-GB
  249. und, en-GU, en, en-GB, en-IN ; en-ZA ; en-GB
  250. und, en, en-GU, en-IN, en-GB ; en-VI ; en
  251. und, en-GU, en, en-GB, en-IN ; en-VI ; en
  252. # of course, fall back to within cluster
  253. und, en, en-GU, en-IN ; en-ZA ; en-IN
  254. und, en-GU, en, en-IN ; en-ZA ; en-IN
  255. und, en-GU, en-IN, en-GB ; en-VI ; en-GU
  256. und, en-GU, en-GB, en-IN ; en-VI ; en-GU
  257. ##################################################
  258. # testThreshold
  259. @Threshold=60
  260. 50, und, fr-CA-fonupa ; fr-BE-fonipa ; fr-CA-fonupa ; fr-BE-fonipa
  261. 50, und, fr-Cyrl-CA-fonupa ; fr-BE-fonipa ; fr-Cyrl-CA-fonupa ; fr-Cyrl-BE-fonipa
  262. @Threshold=-1 # restore
  263. ##################################################
  264. # testScriptFirst
  265. @DistanceOption=SCRIPT_FIRST
  266. @debug
  267. ru, fr ; zh, pl ; fr
  268. ru, fr ; zh-Cyrl, pl ; ru
  269. hr, en-Cyrl; sr ; en-Cyrl
  270. da, ru, hr; sr ; ru