1 # Copyright (c) 2012-2015 International Business Machines
2 # Corporation and others. All Rights Reserved.
4 # This file should be in UTF-8 with a signature byte sequence ("BOM").
6 # collationtest.txt: Collation test data.
8 # created on: 2012apr13
9 # created by: Markus W. Scherer
11 # A line with "** test: description" is used for verbose and error output.
13 # A collator can be set with "@ root" or "@ locale language-tag",
14 # for example "@ locale de-u-co-phonebk".
15 # An old-style locale ID can also be used, for example "@ locale de@collation=phonebook".
17 # A collator can be built with "@ rules".
18 # An "@ rules" line is followed by one or more lines with the tailoring rules.
20 # A collator can be modified with "% attribute=value".
22 # "* compare" tests the order (= or <) of the following strings.
23 # The relation can be "=" or "<" (the level of the difference is not specified)
24 # or "<1", "<2", "<c", "<3", "<4" (indicating the level of the difference).
26 # Test sections ("* compare") are terminated by
27 # definitions of new collators, changing attributes, or new test sections.
29 ** test: simple CEs & expansions
30 # Many types of mappings are tested elsewhere, including via the UCA conformance tests.
31 # Here we mostly cover a few unusual mappings.
33 &\x01 # most control codes are ignorable
34 <<<\u0300 # tertiary CE
35 &9<\x00 # NUL not ignorable
36 &\uA00A\uA00B=\uA002 # two long-primary CEs
37 &\uA00A\uA00B\u00050005=\uA003 # three CEs, require 64 bits
51 <1 か # Hiragana Ka (U+304B)
52 <2 か\u3099 # plus voiced sound mark
53 = が # Hiragana Ga (U+304C)
56 <1 \uA00A\uA00B\u00050004
57 <1 \uA00A\uA00B\u00050005
59 <1 \uA00A\uA00B\u00050006
62 # Create some interesting mappings, and map some normalization-inert characters
63 # (which are not subject to canonical reordering)
64 # to some of the same CEs to check the sequence of CEs.
67 # Contractions starting with 'a' should not continue with any character < U+0300
68 # so that we can test a shortcut for that.
71 &d<dz\u0301=ⓓ # d+z+acute
73 <a\u0301=Ⓐ # a+acute sorts after z
74 <a\u0301\u0301=Ⓑ # a+acute+acute
75 <a\u0301\u0301\u0358=Ⓒ # a+acute+acute+dot above right
77 <a\u0323=Ⓔ # a+dot below
78 <a\u0323\u0358=Ⓕ # a+dot below+dot above right
79 <a\u0327\u0323\u030a=Ⓖ # a+cedilla+dot below+ring
80 <a\u0327\u0323bz=Ⓗ # a+cedilla+dot below+b+z
82 &\U0001D158=⁰ # musical notehead black (has a symbol primary)
83 <\U0001D158\U0001D165=¼ # musical quarter note
85 # deliberately missing prefix contractions:
92 <<<\U0001D165=¹ # musical stem (ccc=216)
93 <<<\U0001D16D=² # musical augmentation dot (ccc=226)
94 <<<\U0001D165\U0001D16D=³ # stem+dot (ccc=216 226)
95 &\u0301=❶ # acute (ccc=230)
96 &\u030a=❷ # ring (ccc=230)
97 &\u0308=❸ # diaeresis (ccc=230)
98 <<\u0308\u0301=❹ # diaeresis+acute (=dialytika tonos) (ccc=230 230)
99 &\u0327=❺ # cedilla (ccc=202)
100 &\u0323=❻ # dot below (ccc=220)
101 &\u0331=❼ # macron below (ccc=220)
102 <<\u0331\u0358=❽ # macron below+dot above right (ccc=220 232)
103 &\u0334=❾ # tilde overlay (ccc=1)
104 &\u0358=❿ # dot above right (ccc=232)
106 &\u0f71=① # tibetan vowel sign aa
107 &\u0f72=② # tibetan vowel sign i
108 # \u0f71\u0f72 # tibetan vowel sign aa + i = ii = U+0F73
109 &\u0f73=③ # tibetan vowel sign ii (ccc=0 but lccc=129)
111 ** test: simple contractions
113 # Some strings are chosen to cause incremental contiguous contraction matching to
114 # go into partial matches for prefixes of contractions
115 # (where the prefixes are deliberately not also contractions).
116 # When there is no complete match, then the matching code must back out of those
117 # so that discontiguous contractions work as specified.
120 # contraction starter with no following text, or mismatch, or blocked
132 <2 a\u0308\u030a # ring blocked by diaeresis
140 <2 \u0308\u030a\u0301 # acute blocked by ring
146 <1 \U0001D158\U0001D165
149 # no discontiguous contraction because of missing prefix contraction d+z,
150 # and a starter ('z') after the 'd'
155 # contiguous contractions
169 <1 a\u0301\u0301\u0358
175 <1 a\u0327\u0323\u030a # match despite missing prefix
181 <2 \u0308\u0308\u0301 # acute blocked from first diaeresis, contracts with second
185 <1 \U0001D158\U0001D165
189 <3 \U0001D165\U0001D16D
192 ** test: discontiguous contractions
194 <1 a\u0327\u030a # a+ring skips cedilla
196 <2 a\u0327\u0327\u030a # a+ring skips 2 cedillas
198 <2 a\u0327\u0327\u0327\u030a # a+ring skips 3 cedillas
200 <2 a\u0334\u0327\u0327\u030a # a+ring skips tilde overlay & 2 cedillas
202 <1 a\u0327\u0323 # a+dot below skips cedilla
204 <1 a\u0323\u0301\u0358 # a+dot below+dot ab.r.: 2-char match, then skips acute
206 <2 a\u0334\u0323\u0358 # a+dot below skips tilde overlay
210 <2 \u0331\u0331\u0358 # macron below+dot ab.r. skips the second macron below
214 <1 a\u0327\u0331\u0323\u030a # a+ring skips cedilla, macron below, dot below (dot blocked by macron)
216 <1 a\u0327\u0323\U0001D16D\u030a # a+dot below skips cedilla
218 <2 a\u0327\u0327\u0323\u030a # a+dot below skips 2 cedillas
220 <2 a\u0327\u0323\u0323\u030a # a+dot below skips cedilla
222 <2 a\u0334\u0327\u0323\u030a # a+dot below skips tilde overlay & cedilla
226 <1 \U0001D158\u0327\U0001D165 # quarter note skips cedilla
228 <1 a\U0001D165\u0323 # a+dot below skips stem
231 # partial contiguous match, backs up, matches discontiguous contraction
237 # a+acute+acute+dot above right skips cedilla, continues matching 2 same-ccc combining marks
239 <1 a\u0327\u0301\u0301\u0358
244 <1 a\u0f73\u0301 # a+acute skips tibetan ii
247 # FCD but the 0f71 inside the 0f73 must be skipped
248 # to match the discontiguous contraction of the first 0f71 with the trailing 0f72 inside the 0f73
250 <1 \u0f71\u0f73 # == \u0f73\u0f71 == \u0f71\u0f71\u0f72
253 ** test: discontiguous contractions with nested contractions
255 <1 a\u0323\u0308\u0301\u0358
257 <2 a\u0323\u0308\u0301\u0308\u0301\u0358
260 ** test: discontiguous contractions with interleaved contractions
262 # a+ring & cedilla & macron below+dot above right
263 <1 a\u0327\u0331\u030a\u0358
266 # a+ring & 1x..3x macron below+dot above right
267 <2 a\u0331\u030a\u0358
269 <2 a\u0331\u0331\u030a\u0358\u0358
272 <2 a\u0331\u0331\u0331\u030a\u0301\u0358\u0358\u0358
275 # a+dot below & stem+augmentation dot, followed by contiguous d+z+acute
276 <1 a\U0001D165\u0323\U0001D16Ddz\u0301
279 ** test: some simple string comparisons
282 # first string compares against ""
289 ** test: compare with strength=primary
296 ** test: compare with strength=secondary
303 ** test: compare with strength=tertiary
310 ** test: compare with strength=quaternary
311 % strength=quaternary
317 ** test: compare with strength=identical
324 ** test: côté with forwards secondary
332 ** test: côté with forwards secondary vs. U+FFFE merge separator
333 # Merged sort keys: On each level, any difference in the first segment
334 # must trump any further difference.
341 ** test: côté with backwards secondary
349 ** test: côté with backwards secondary vs. U+FFFE merge separator
350 # Merged sort keys: On each level, any difference in the first segment
351 # must trump any further difference.
358 ** test: U+FFFE on identical level
362 # All of these control codes are completely-ignorable, so that
363 # their low code points are compared with the merge separator.
364 # The merge separator must compare less than any other character.
365 <1 \uFFFE\u0001\u0002\u0003
366 <i \u0001\uFFFE\u0002\u0003
367 <i \u0001\u0002\uFFFE\u0003
368 <i \u0001\u0002\u0003\uFFFE
371 # The merge separator must even compare less than U+0000.
372 <1 \uFFFE\u0000\u0000
373 <i \u0000\uFFFE\u0000
374 <i \u0000\u0000\uFFFE
376 ** test: Hani < surrogates < U+FFFD
377 # Note: compareUTF8() treats unpaired surrogates like U+FFFD,
378 # so with that the strings with surrogates will compare equal to each other
379 # and equal to the string with U+FFFD.
392 ** test: script reordering
394 % reorder Hani Zzzz digit
420 ** test: very simple rules
422 &a=e<<<<q<<<<r<x<<<X<<y<<<Y;z,Z
423 % strength=quaternary
436 ** test: tailoring twice before a root position: primary
446 ** test: tailoring twice before a root position: secondary
456 # secondary-before common weight
466 ** test: tailoring twice before a root position: tertiary
476 # tertiary-before common weight
497 ** test: tailor after completely ignorable
506 ** test: secondary tailoring gaps, ICU ticket 9362
509 &s<<r # secondary between s and ſ (long s)
510 &ſ<<*a-q # more than 15 between ſ and secondary CE boundary
511 &[before 2][first primary ignorable]<<u<<v # between secondary CE boundary & lowest secondary CE
512 &[last primary ignorable]<<y<<z
517 <2 \u0332 # lowest secondary CE
533 ** test: tertiary tailoring gaps, ICU ticket 9362
536 &t<<<r # tertiary between t and fullwidth t
537 &ᵀ<<<*a-q # more than 15 between ᵀ (modifier letter T) and tertiary CE boundary
538 &[before 3][first secondary ignorable]<<<u<<<v # between tertiary CE boundary & lowest tertiary CE
539 &[last secondary ignorable]<<<y<<<z
544 # Note: The root collator currently does not map any characters to tertiary CEs.
560 ** test: secondary & tertiary around root character
575 ** test: secondary & tertiary around tailored item
591 ** test: more nesting of secondary & tertiary before
616 &w<x # tailored CE getting case bits
617 =uv=uV=Uv=UV # 2 chars -> 1 CE
618 &ae=ch=cH=Ch=CH # 2 chars -> 2 CEs
619 &rst=yz=yZ=Yz=YZ # 2 chars -> 3 CEs
636 = Uv # mixed case on single CE cannot distinguish variations
639 ** test: tertiary CEs, tertiary, caseLevel=off, caseFirst=lower
641 &\u0001<<<t<<<T # tertiary CEs
652 ** test: tertiary CEs, tertiary, caseLevel=off, caseFirst=upper
663 ** test: reset on expansion, ICU tickets 9415 & 9593
665 &æ<x # tailor the last primary CE so that x sorts between ae and af
666 &æb=bæ # copy all reset CEs to make bæ sort the same
667 &각<h # copy/tailor 3 CEs to make h sort before the next Hangul syllable 갂
668 &⒀<<y # copy/tailor 4 CEs to make y sort with only a secondary difference
669 &l·=z # handle the pre-context for · when fetching reset CEs
670 <<u # copy/tailor 2 CEs
690 <1 · # by itself: primary CE
692 <2 l· # l+middle dot has only a secondary difference from l
698 <3 ⒀ # DUCET sets special tertiary weights in all CEs
707 = y # alternate=shifted removes the tailoring difference on the last CE
710 ** test: contraction inside extension, ICU ticket 9378
712 &а<<х/й # all letters are Cyrillic
717 ** test: no duplicate tailored CEs for different reset positions with same CEs, ICU ticket 10104
719 &t<x &ᵀ<y # same primary weights
720 &q<u &[before 1]ꝗ<v # q and ꝗ are primary adjacent
731 # Principle: Each rule builds on the state of preceding rules and ignores following rules.
733 ** test: later rule does not affect earlier reset position, ICU ticket 10105
735 &a < u < v < w &ov < x &b < v
739 <1 x # CE(o) followed by CE between u and w
744 ** test: later rule does not affect earlier extension (1), ICU ticket 10105
760 ** test: later rule does not affect earlier extension (2), ICU ticket 10105
762 &a <<< c / e &g <<< e / l
771 ** test: later rule does not affect earlier extension (3), ICU ticket 10105
773 &a = b / c &d = c / e
776 <1 AC # C is still only tertiary different from the original c
781 ** test: extension contains tailored character, ICU ticket 10105
791 ** test: add simple mappings for characters with root context
793 &z=· # middle dot has a prefix mapping in the CLDR root
794 &n=и # и (U+0438) has contractions in the root
797 <2 l· # root mapping for l|· still works
804 <1 и\u0306 # root mapping for й=и\u0306 still works
808 ** test: add context mappings around characters with root context
810 &z=·h # middle dot has a prefix mapping in the CLDR root
811 &n=ә|и # и (U+0438) has contractions in the root
814 <2 l· # root mapping for l|· still works
820 <1 и\u0306 # root mapping for й=и\u0306 still works
827 ** test: many secondary CEs at the top of their range
829 &[last primary ignorable]<<*\u2801-\u28ff
841 ** test: many tertiary CEs at the top of their range
843 &[last secondary ignorable]<<<*a-z
855 ** test: tailor contraction together with nearly equivalent prefix, ICU ticket 10101
867 = opx # first contraction op, then prefix p|x
871 ** test: reset position with prefix (pre-context), ICU ticket 10102
882 ** test: prefix+contraction together (1), ICU ticket 10071
902 ** test: prefix+contraction together (2), ICU ticket 10071
916 = abc # prefix match a|b takes precedence over contraction match bc
921 ** test: prefix+contraction together (3), ICU ticket 10071
923 &x=a|b &w=bc # reverse order of rules as previous test, order should not matter here
924 * compare # same "compare" sequences as previous test
935 = abc # prefix match a|b takes precedence over contraction match bc
940 ** test: no mapping p|c, falls back to contraction ch, CLDR ticket 5962
949 = pch # no-prefix contraction ch matches
952 = pci # prefix+contraction p|ci matches
955 ** test: tailor in & around compact ranges of root primaries
956 # The Ogham characters U+1681..U+169A are in simple ascending order of primary CEs
957 # which should be reliably encoded as one range in the root elements data.
970 <1 ᣵ # U+18F5 last Canadian Aboriginal
986 <1 ᚠ # U+16A0 first Runic
988 ** test: suppressContractions
990 &z<ch<әж [suppressContractions [·cә]]
993 <3 cH # ch was suppressed
995 <1 l· # primary difference, not secondary, because l|· was suppressed
997 <2 ә\u0308 # secondary difference, not primary, because contractions for ә were suppressed
1001 ** test: Hangul & Jamo
1003 &L=\u1100 # first Jamo L
1004 &V=\u1161 # first Jamo V
1005 &T=\u11A8 # first Jamo T
1006 &\uAC01<<*\u4E00-\u4EFF # first Hangul LVT syllable & lots of secondary diffs
1014 = \u1100\u1161\u11A8
1025 ** test: adjust special reset positions according to previous rules, CLDR ticket 6070
1028 [maxVariable space] # has effect only after building, no effect on following rules
1030 &[before 1][first regular]<z
1032 <1 ? # some punctuation
1039 &[last primary ignorable]<<x<<<y
1040 &[last primary ignorable]<<z
1049 &[last secondary ignorable]<<<x
1050 &[last secondary ignorable]<<<y
1057 &[before 2][first variable]<<z
1058 &[before 2][first variable]<<y
1059 &[before 3][first variable]<<<x
1060 &[before 3][first variable]<<<w
1061 &[before 1][first variable]<v
1062 &[before 2][first variable]<<u
1063 &[before 3][first variable]<<<t
1064 &[before 2]\uFDD1\xA0<<s # FractionalUCA.txt: FDD1 00A0, SPACE first primary
1079 &[before 2][first regular]<<z
1080 &[before 3][first regular]<<<y
1081 &[before 1][first regular]<x
1082 &[before 3][first regular]<<<w
1083 &[before 2]\uFDD1\u263A<<v # FractionalUCA.txt: FDD1 263A, SYMBOL first primary
1084 &[before 3][first regular]<<<u
1085 &[before 1][first regular]<p # primary before the boundary: becomes variable
1086 &[before 3][first regular]<<<t # not affected by p
1087 &[last variable]<q # after p!
1101 # check that p & q are indeed variable
1117 &[before 2][first trailing]<<z
1118 &[before 1][first trailing]<y
1119 &[before 3][first trailing]<<<x
1121 <1 \u4E00 # first Han, first implicit
1122 <1 \uFDD1\uFDD0 # FractionalUCA.txt: unassigned first primary
1123 # Note: The root collator currently does not map any characters to the trailing first boundary primary.
1127 <2 \uFFFD # The root collator currently maps U+FFFD to the first real trailing primary.
1130 &[before 2][first primary ignorable]<<z
1131 &[before 2][first primary ignorable]<<y
1132 &[before 3][first primary ignorable]<<<x
1133 &[before 3][first primary ignorable]<<<w
1143 &[before 3][first secondary ignorable]<<<y
1144 &[before 3][first secondary ignorable]<<<x
1151 ** test: canonical closure
1160 = Ấ # A with circumflex & acute
1165 <2 X\u030A # with ring above
1168 = \u212B # Angstrom sign
1177 = \uFA0C\uFA0D # CJK compatibility characters
1180 # canonical closure on prefix rules, ICU ticket 9444
1184 <1 äs # not tailored
1192 ** test: conjoining Jamo map to expansions
1194 &gg=\u1101 # Jamo Lead consonant GG
1195 &nj=\u11AC # Jamo Trail consonant NJ
1198 = \u1101\u1161\u11AC
1204 ** test: canonical tail closure, ICU ticket 5913
1211 <2 a\u0323\u0302 # discontiguous contraction
1212 = ạ\u0302 # equivalent
1222 <2 a\u0323\u0302 # contiguous contraction plus extra diacritic
1223 = ạ\u0302 # equivalent
1227 # Tail closure should work even if there is a prefix and/or contraction.
1230 # In order to find discontiguous contractions for \u5140|câ
1231 # there must exist a mapping for \u5140|ca, regardless of what it maps to.
1232 # (This follows from the UCA spec.)
1237 <1 \u5140câ # tailored
1241 <2 \u5140ca\u0323\u0302 # discontiguous contraction
1242 = \uFA0Cca\u0323\u0302
1252 # Double-check that without the extra mapping there will be no discontiguous match.
1258 <1 \u5140câ # tailored
1264 <1 \u5140ca\u0323\u0302 # no discontiguous contraction
1265 = \uFA0Cca\u0323\u0302
1277 <2 ca\u0323\u0302 # contiguous contraction plus extra diacritic
1278 = cạ\u0302 # equivalent
1282 # ᾢ = U+1FA2 GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI
1283 # = 03C9 0313 0300 0345
1284 # ccc = 0, 230, 230, 240
1287 # In order to find discontiguous contractions for αῳ
1288 # there must exist a mapping for αω, regardless of what it maps to.
1289 # (This follows from the UCA spec.)
1295 <2 αω\u0313\u0300\u0345 # discontiguous contraction
1299 <2 αω\u0300\u0313\u0345
1301 = αῲ\u0313 # not FCD
1305 # Double-check that without the extra mapping there will be no discontiguous match.
1309 <1 αω\u0313\u0300\u0345 # no discontiguous contraction
1313 <2 αω\u0300\u0313\u0345
1315 = αῲ\u0313 # not FCD
1320 # Add U+0315 COMBINING COMMA ABOVE RIGHT which has ccc=232.
1321 # Tests code paths where the tailored string has a combining mark
1322 # that does not occur in any composite's decomposition.
1326 <1 αω\u0313\u0300\u0315 # Not tailored: The grave accent blocks the comma above.
1332 <2 αω\u0300\u0315\u0345
1334 = αῲ\u0315 # not FCD
1336 ** test: danish a+a vs. a-umlaut, ICU ticket 9319
1345 ** test: Jamo L with and in prefix
1346 # Useful for the Korean "searchjl" tailoring (instead of contractions of pairs of Jamo L).
1348 # Jamo Lead consonant G after G or GG
1349 &[last primary ignorable]<<\u1100|\u1100=\u1101|\u1100
1350 # Jamo Lead consonant GG sorts like G+G
1351 &\u1100\u1100=\u1101
1352 # Note: Making G|GG and GG|GG sort the same as G|G+G
1353 # would require the ability to reset on G|G+G,
1354 # or we could make G-after-G equal to some secondary-CE character,
1355 # and reset on a pair of those.
1356 # (It does not matter much if there are at most two G in a row in real text.)
1359 <2 \u1100\u1100 # only one primary from a sequence of G lead consonants
1361 <2 \u1100\u1100\u1100
1363 # but not = \u1100\u1101, see above
1366 <2 \u1100\u1100\u1161
1367 = \u1100\uAC00 # prefix match from the L of the LV syllable
1371 ** test: proposed Korean "searchjl" tailoring with prefixes, CLDR ticket 6546
1373 # Low secondary CEs for Jamo V & T.
1374 # Note: T should sort before V for proper syllable order.
1375 &\u0332 # COMBINING LOW LINE (first primary ignorable)
1378 # Korean Jamo lead consonant search rules, part 2:
1379 # Make modern compound L jamo primary equivalent to non-compound forms.
1381 # Secondary CEs for Jamo L-after-L, greater than Jamo V & T.
1382 &\u0313 # COMBINING COMMA ABOVE (second primary ignorable)
1389 # Compound L Jamo map to equivalent expansions of primary+secondary CE.
1390 &\u1100\u0313=\u1101<<<\u3132 # HANGUL CHOSEONG SSANGKIYEOK, HANGUL LETTER SSANGKIYEOK
1391 &\u1103\u0313=\u1104<<<\u3138 # HANGUL CHOSEONG SSANGTIKEUT, HANGUL LETTER SSANGTIKEUT
1392 &\u1107\u0313=\u1108<<<\u3143 # HANGUL CHOSEONG SSANGPIEUP, HANGUL LETTER SSANGPIEUP
1393 &\u1109\u0313=\u110A<<<\u3146 # HANGUL CHOSEONG SSANGSIOS, HANGUL LETTER SSANGSIOS
1394 &\u110C\u0313=\u110D<<<\u3149 # HANGUL CHOSEONG SSANGCIEUC, HANGUL LETTER SSANGCIEUC
1401 <2 \u1100\u1100\u1161
1407 ** test: Hangul syllables in prefix & in the interior of a contraction
1409 &x=\u1100\u1161|a\u1102\u1162z
1412 = \u1100\u1161a\u1102\u1162z
1413 = \u1100\u1161a\uB0B4z
1414 = \uAC00a\u1102\u1162z
1417 ** test: digits are unsafe-backwards when numeric=on
1421 # If digits are not unsafe, then numeric collation sees "1"=="01" and "b">"a".
1422 # We need to back up before the identical prefix "1" and compare the full numbers.
1426 ** test: simple locale data test
1434 @ locale de-u-co-phonebk
1441 # The following test cases were moved here from ICU 52's DataDrivenCollationTest.txt.
1443 ** test: DataDrivenCollationTest/TestMorePinyin
1444 # Testing the primary strength.
1461 ** test: DataDrivenCollationTest/TestLithuanian
1462 # Lithuanian sort order.
1476 ** test: DataDrivenCollationTest/TestLatvian
1477 # Latvian sort order.
1506 ** test: DataDrivenCollationTest/TestEstonian
1507 # Estonian sort order.
1529 ** test: DataDrivenCollationTest/TestAlbanian
1530 # Albanian sort order.
1566 ** test: DataDrivenCollationTest/TestSimplifiedChineseOrder
1567 # Sorted file has different order.
1569 # normalization=on turned on & off automatically.
1572 < \u5F20\u4E00\u8E3F
1574 ** test: DataDrivenCollationTest/TestTibetanNormalizedIterativeCrash
1575 # This pretty much crashes.
1578 < \u0f71\u0f72\u0f80\u0f71\u0f72
1581 ** test: DataDrivenCollationTest/TestThaiPartialSortKeyProblems
1582 # These are examples of strings that caused trouble in partial sort key testing.
1585 < \u0E01\u0E01\u0E38\u0E18\u0E20\u0E31\u0E13\u0E11\u0E4C
1586 < \u0E01\u0E01\u0E38\u0E2A\u0E31\u0E19\u0E42\u0E18
1588 < \u0E01\u0E07\u0E01\u0E32\u0E23
1589 < \u0E01\u0E07\u0E42\u0E01\u0E49
1591 < \u0E01\u0E23\u0E19\u0E17\u0E32
1592 < \u0E01\u0E23\u0E19\u0E19\u0E40\u0E0A\u0E49\u0E32
1594 < \u0E01\u0E23\u0E30\u0E40\u0E08\u0E35\u0E22\u0E27
1595 < \u0E01\u0E23\u0E30\u0E40\u0E08\u0E35\u0E4A\u0E22\u0E27
1597 < \u0E01\u0E23\u0E23\u0E40\u0E0A\u0E2D
1598 < \u0E01\u0E23\u0E23\u0E40\u0E0A\u0E49\u0E32
1600 ** test: DataDrivenCollationTest/TestJavaStyleRule
1601 # java.text allows rules to start as '<<<x<<<y...'
1602 # we emulate this by assuming a &[first tertiary ignorable] in this case.
1604 &\u0001=equal<<<z<<x<<<w &[first tertiary ignorable]=a &[first primary ignorable]=b
1610 = b # x had become the new first primary ignorable
1613 ** test: DataDrivenCollationTest/TestShiftedIgnorable
1614 # The UCA states that primary ignorables should be completely
1615 # ignorable when following a shifted code point.
1618 % strength=quaternary
1637 ** test: DataDrivenCollationTest/TestNShiftedIgnorable
1638 # The UCA states that primary ignorables should be completely
1639 # ignorable when following a shifted code point.
1641 % alternate=non-ignorable
1661 ** test: DataDrivenCollationTest/TestSafeSurrogates
1662 # It turned out that surrogates were not skipped properly
1663 # when iterating backwards if they were in the middle of a
1664 # contraction. This test assures that this is fixed.
1671 ** test: DataDrivenCollationTest/da_TestPrimary
1672 # This test goes through primary strength cases
1685 ** test: DataDrivenCollationTest/da_TestTertiary
1686 # This test goes through tertiary strength cases
1727 < HAANDV\u00c6RKSBANKEN
1730 < NIELS\u0020J\u00d8RGEN
1739 < SCH\u00dcTT,\u0020H
1741 < SCH\u00dcTT,\u0020M
1745 < STORE\u0020VILDMOSE
1747 < STORM\u0020PETERSEN
1751 < \u00feORVAR\u00d0UR
1753 < VESTERG\u00c5RD,\u0020A
1754 < VESTERGAARD,\u0020A
1755 < VESTERG\u00c5RD,\u0020B
1769 < \u010du\u010d\u0113t
1817 ** test: DataDrivenCollationTest/hi_TestNewRules
1818 # This test goes through new rules and tests against old rules
1826 ** test: DataDrivenCollationTest/ro_TestNewRules
1827 # This test goes through new rules and tests against old rules
1881 ** test: DataDrivenCollationTest/testOffsets
1882 # This tests cases where forwards and backwards iteration get different offsets
1886 < a\uD800\uDC00\uDC00
1887 < b\uD800\uDC00\uDC00
1889 < \u0301A\u0301\u0301
1890 < \u0301B\u0301\u0301
1894 # TODO: test offsets in new CollationTest
1896 # End of test cases moved here from ICU 52's DataDrivenCollationTest.txt.
1898 ** test: was ICU 52 cmsccoll/TestRedundantRules
1900 & a < b < c < d& [before 1] c < m
1909 & a < b <<< c << d <<< e& [before 3] e <<< x
1919 & a < b <<< c << d <<< e <<< f < g& [before 1] g < x
1931 & a <<< b << c < d& a < m
1962 & a < b < c < d& r < c
1971 & a < b < c < d& c < m
1980 & a < b < c < d& a < m
1988 ** test: was ICU 52 cmsccoll/TestExpansionSyntax
1989 # The following two rules should sort the particular list of strings the same.
1991 &AE <<< a << b <<< c &d <<< f
2001 &A <<< a / E << b / E <<< c /E &d <<< f
2010 # The following two rules should sort the particular list of strings the same.
2012 &AE <<< a <<< b << c << d < e < f <<< g
2024 &A <<< a / E <<< b / E << c / E << d / E < e < f <<< g
2035 # The following two rules should sort the particular list of strings the same.
2037 &AE <<< B <<< C / D <<< F
2046 &A <<< B / E <<< C / ED <<< F / E
2054 ** test: never reorder trailing primaries
2064 ** test: fall back to mappings with shorter prefixes, not immediately to ones with no prefixes
2077 # With the following rules, there is only one prefix per composite ĉ or ç,
2078 # but both prefixes apply to just c in NFD form.
2079 # We would get different results for composed vs. NFD input
2080 # if we fell back directly from longest-prefix mappings to no-prefix mappings.
2096 # The mapping is used which has the longest matching prefix for which
2097 # there is also a suffix match, with the longest suffix match among several for that prefix.
2137 ** test: prefix + discontiguous contraction with missing prefix contraction
2138 # Unfortunate terminology: The first "prefix" here is the pre-context,
2139 # the second "prefix" refers to the contraction/relation string that is
2140 # one shorter than the one being tested.
2145 # No mapping for op|e:
2146 # Discontiguous contraction matching should not match op|ê in opệ
2147 # because it would have to skip the dot below and extend a match on op|e by the circumflex,
2148 # but there is no match on op|e.
2154 = opy\u0323 # y not z
2158 # We cannot test for fallback by whether the contraction default CE32
2159 # is for another contraction. With the following rules, there is no mapping for op|e,
2160 # and the fallback to prefix p has no contractions.
2169 = opx\u0323\u0302 # x not z
2173 # One more variation: Fallback to the simple code point, no shorter non-empty prefix.
2183 = opx\u0323\u0302 # x not z
2187 ** test: maxVariable via rules
2189 [maxVariable space][alternate shifted]
2198 ** test: maxVariable via setting
2200 % maxVariable=currency
2210 ** test: ICU4J CollationMiscTest/TestContractionClosure (ää)
2211 # This tests canonical closure, but it also tests that CollationFastLatin
2212 # bails out properly for contractions with combining marks.
2213 # For that we need pairs of strings that remain in the Latin fastpath
2214 # long enough, hence the extra "= b" lines.
2227 ** test: ICU4J CollationMiscTest/TestContractionClosure (Å)
2238 ** test: reset-before on already-tailored characters, ICU ticket 10108
2240 &a<w<<x &[before 2]x<<y
2248 &a<<w<<<x &[before 2]x<<y
2256 &a<w<x &[before 2]x<<y
2264 &a<w<<<x &[before 2]x<<y
2271 ** test: numeric collation with other settings, ICU ticket 9092
2273 % strength=identical
2280 ** test: collation type fallback from unsupported type, ICU ticket 10149
2281 @ locale fr-CA-u-co-phonebk
2282 # Expect the same result as with fr-CA, using backwards-secondary order.
2283 # That is, we should fall back from the unsupported collation type
2284 # to the locale's default collation type.
2291 ** test: @ is equivalent to [backwards 2], ICU ticket 9956
2305 ** test: shifted+reordering, ICU ticket 9507
2307 % reorder Grek punct space
2309 % strength=quaternary
2310 # Which primaries are "variable" should be determined without script reordering,
2311 # and then primaries should be reordered whether they are shifted to quaternary or not.
2318 <1 $ # currency symbol
2332 ** test: "uppercase first" could sort a string before its prefix, ICU ticket 9351
2340 ** test: secondary+case ignores secondary ignorables, ICU ticket 9355
2343 % strength=secondary
2350 ** test: custom collation rules involving tail of a contraction in Malayalam, ICU ticket 6328
2352 &[before 2] ൌ << ൗ # U+0D57 << U+0D4C == 0D46+0D57
2359 ** test: quoted apostrophe in compact syntax, ICU ticket 8204
2371 # ICU ticket #8260 "Support all collation-related keywords in Collator.getInstance()"
2372 ** test: locale -u- with collation keywords, ICU ticket 8260
2373 @ locale de-u-kv-sPace-ka-shifTed-kn-kk-falsE-kf-Upper-kc-tRue-ks-leVel4
2375 <4 \u0020 # space is shifted, strength=quaternary
2376 <1 ! # punctuation is regular
2378 <1 12 # numeric sorting
2380 <c b # uppercase first on case level
2382 <2 x\u0308\u0301 # normalization off
2384 ** test: locale @ with collation keywords, ICU ticket 8260
2385 @ locale fr@colbAckwards=yes;ColStrength=Quaternary;kv=currencY;colalternate=shifted
2387 <4 $ # currency symbols are shifted, strength=quaternary
2389 <2 alà # backwards secondary level
2391 ** test: locale -u- with script reordering, ICU ticket 8260
2392 @ locale el-u-kr-kana-SYMBOL-Grek-hani-cyrl-latn-digit-armn-deva-ethi-thai
2407 ** test: locale @collation=type should be case-insensitive
2408 @ locale de@coLLation=PhoneBook
2414 ** test: import root search rules plus German phonebook rules, ICU ticket 8962
2415 @ locale de-u-co-search
2423 # Once more, but with runtime builder.
2425 [import und-u-co-search][import de-u-co-phonebk]
2433 # Once again, with import from "root" not "und" (as in a proper language tag).
2435 [import root-u-co-search][import de-u-co-phonebk]
2443 ** test: import rules from a language with non-Latin native script, and reset the reordering, ICU ticket 10998
2444 # Greek should sort Greek first.
2452 # Import Greek, and then reset the reordering.
2454 [import el][reorder Zzzz]
2460 # "others" is a synonym for Zzzz.
2462 [import el][reorder others]
2468 ** test: regression test for CollationFastLatinBuilder, ICU ticket 11388
2471 % strength=secondary
2480 ** test: tailor tertiary-after a common tertiary where there is a lower one
2481 # Assume that Hiragana small A has a below-common tertiary, and Hiragana A has a common one.
2482 # See ICU ticket 11448 & CLDR ticket 7222.
2494 ** test: tailor tertiary-after a below-common tertiary
2506 ** test: tailor tertiary-before a common tertiary where there is a lower one
2508 &[before 3]あ<<<x<<<y<<<z
2518 ** test: tailor tertiary-before a below-common tertiary
2520 &[before 3]ぁ<<<x<<<y<<<z
2530 ** test: reorder single scripts not groups, ICU ticket 11449
2538 # Before ICU 55, the following reordered together with Gothic.