]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/testdata/DataDrivenCollationTest.txt
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / test / testdata / DataDrivenCollationTest.txt
CommitLineData
b75a7d8f
A
1// Copyright (c) 2001-2003 International Business Machines
2// Corporation and others. All Rights Reserved.
3DataDrivenCollationTest {
4 Info {
5 Headers { "sequence" }
6 Description { "These are the data driven tests" }
7 LongDescription { "The following entries are separate tests containing test data for various locales."
8 "Each entry has the following fields: "
9 "Info/Description - short descrioption of the test"
10 "Settings - settings for the test."
11 "Settings/TestLocale - locale for the collator OR"
12 "Settings/Rules - rules for the collator (can't have both)"
13 "Settings/Arguments - arguments to be passed to the collator before testing. Use rule syntax."
14 "Cases - set of test cases, which are sequences of strings that will be parsed"
15 "Sequences must not change the sign of relation, i.e. we can only have < and = or"
16 "> and = in single sequence. Cannot mix < and > in the same sequence. Whitespace is"
17 "is ignored unless quoted."
18 }
19 }
20 TestData {
21 TestThaiPartialSortKeyProblems {
22 Info {
23 Description { "These are examples of strings that caused trouble in partial sort key testing." }
24 }
25 Settings {
26 {
27 TestLocale { "th_TH" }
28 }
29 }
30 // TODO: the tests that are commented out should be enabled when j2720 is fixed
31 Cases { "\u0E01\u0E01\u0E38\u0E18\u0E20\u0E31\u0E13\u0E11\u0E4C"
32 "<\u0E01\u0E01\u0E38\u0E2A\u0E31\u0E19\u0E42\u0E18",
33 "\u0E01\u0E07\u0E01\u0E32\u0E23"
34 "<\u0E01\u0E07\u0E42\u0E01\u0E49",
35 //"\u0E01\u0E23\u0E19\u0E17\u0E32"
36 //"<\u0E01\u0E23\u0E19\u0E19\u0E40\u0E0A\u0E49\u0E32",
37 "\u0E01\u0E23\u0E30\u0E40\u0E08\u0E35\u0E22\u0E27"
38 "<\u0E01\u0E23\u0E30\u0E40\u0E08\u0E35\u0E4A\u0E22\u0E27",
39 //"\u0E01\u0E23\u0E23\u0E40\u0E0A\u0E2D"
40 //"<\u0E01\u0E23\u0E23\u0E40\u0E0A\u0E49\u0E32"
41 }
42 }
43 TestJavaStyleRule {
44 Info {
45 Description { "java.text allows rules to start as '<<<x<<<y...' "
46 "we emulate this by assuming a &[first tertiary ignorable] "
47 "in this case."
48 }
49 }
50 Settings {
51 {
52 Rules { "=equal<<<z<<x<<<w<y &[first tertiary ignorable]=a &[first primary ignorable]=b" }
53 }
54 }
55 Cases { "a = equal < z < x < w < b < y" }
56 }
57 TestShiftedIgnorable {
58 Info {
59 Description { "New UCA states that primary ignorables should be completely "
60 "ignorable when following a shifted code point."
61 }
62 }
63 Settings {
64 {
65 TestLocale { "root" }
66 Arguments { "[alternate shifted][strength 4]" }
67 }
68 }
69 Cases {
70 "a' 'b="
71 "a' '\u0300b="
72 "a' '\u0301b<"
73 "a_b="
74 "a_\u0300b="
75 "a_\u0301b<"
76 "A' 'b="
77 "A' '\u0300b="
78 "A' '\u0301b<"
79 "A_b="
80 "A_\u0300b="
81 "A_\u0301b<"
82 "a\u0301b<"
83 "A\u0301b<"
84 "a\u0300b<"
85 "A\u0300b"
86
87 }
88 }
89
90 TestNShiftedIgnorable {
91 Info {
92 Description { "New UCA states that primary ignorables should be completely "
93 "ignorable when following a shifted code point."
94 }
95 }
96 Settings {
97 {
98 TestLocale { "root" }
99 Arguments { "[alternate non-ignorable][strength 3]" }
100 }
101 }
102 Cases {
103 "a' 'b<"
104 "A' 'b<"
105 "a' '\u0301b<"
106 "A' '\u0301b<"
107 "a' '\u0300b<"
108 "A' '\u0300b<"
109 "a_b<"
110 "A_b<"
111 "a_\u0301b<"
112 "A_\u0301b<"
113 "a_\u0300b<"
114 "A_\u0300b<"
115 "a\u0301b<"
116 "A\u0301b<"
117 "a\u0300b<"
118 "A\u0300b<"
119 }
120 }
121
122 TestSafeSurrogates {
123 Info {
124 Description { "It turned out that surrogates were not skipped properly "
125 "when iterating backwards if they were in the middle of a "
126 "contraction. This test assures that this is fixed."
127 }
128 }
129 Settings {
130 {
131 Rules {
132 "&a < x\ud800\udc00b"
133 }
134 }
135 }
136 Cases {
137 "a<x\ud800\udc00b"
138 }
139 }
140
141 TestCIgnorableContraction {
142 Info {
143 Description { "Checks whether completely ignorable code points are "
144 "skipped in contractions."
145 }
146 }
147 Settings {
148 {
149 TestLocale { "sh" }
150 }
151 {
152 Rules {
153 "& L < lj, Lj <<< LJ"
154 "& N < nj, Nj <<< NJ "
155 }
156 }
157 }
158 Cases {
159 "njiva=n\ud834\udd65jiva=n\uD834\uDD79jiva=n\u0000\u0000\u0000jiva=n\u0000jiva=n\ud800jiva=n\ufffejiva",
160 "ljubav=l\u0000jubav=l\uD834\uDD79jubav=l\u0000\u0000\u0000jubav=l\ud800jubav=l\ufffejubav",
161 "Ljubav=L\u0000jubav=L\uD834\uDD79jubav=L\u0000\u0000\u0000jubav=L\ud800jubav=L\ufffejubav",
162 }
163 }
164
165
166 TestCIgnorablePrefix {
167 Info {
168 Description { "Checks whether completely ignorable code points are "
169 "skipped in prefix processing."
170 }
171 }
172 Settings {
173 {
174 TestLocale { "ja" }
175 }
176 }
177 Cases {
178 "\u30A1\u30FC"
179 "= \u30A1\uDB40\uDC30\u30FC"
180 "= \u30A1\uD800\u30FC"
181 "= \u30A1\uFFFE\u30FC"
182 "= \u30A1\uD834\uDD79\u30FC"
183 "= \u30A1\u0000\u0000\u0000\u30FC"
184 "= \u30A1\u0000\u30FC"
185 "= \u30A1\u30FC"
186 "= \u30A1\u0000\u059a\u30FC"
187 "= \u30A1\u30FC"
188 }
189 }
190
191 da_TestPrimary {
192 Info {
193 Description { "This test goes through primary strength cases" }
194 }
195 Settings {
196 {
197 TestLocale { "da" }
198 Arguments { "[strength 1]" }
199 }
200 }
201 Cases {
202 "Lvi=Lwi",
203 "L\u00e4vi<L\u00f6wi",
204 "L\u00fcbeck=Lybeck",
205 }
206 }
207 da_TestTertiary {
208 Info {
209 Description { "This test goes through tertiary strength cases" }
210 }
211 Settings {
212 {
213 TestLocale { "da" }
214 Arguments { "[strength 3]" }
215 }
216 }
217 Cases {
218 "Luc<luck",
219 "luck<L\u00fcbeck",
220 "L\u00fcbeck>lybeck",
221 "L\u00e4vi<L\u00f6we",
222 "L\u00f6ww<mast",
223 // constUCharCollationDanishTest::testBugs[][CollationDanishTest::MAX_TOKEN_LEN]="
224 "A/S<"
225 "ANDRE<"
226 "ANDR\u00c9<"
227 "ANDREAS<"
228 "AS<"
229 "CA<"
230 "\u00c7A<"
231 "CB<"
232 "\u00c7C<"
233 "D.S.B.<"
234 "DA<"
235 "DB<"
236 "DSB<"
237 "DSC<"
238 "\u00d0A<"
239 "\u00d0C<"
240 "EKSTRA_ARBEJDE<"
241 "EKSTRABUD0<"
242 "H\u00d8ST<"
243 "HAAG<"
244 "H\u00c5NDBOG<"
245 "HAANDV\u00c6RKSBANKEN<"
246 "karl<"
247 "Karl<"
248 "'NIELS J\u00d8RGEN'<"
249 "NIELS-J\u00d8RGEN<"
250 "NIELSEN<"
251 "'R\u00c9E, A'<"
252 "'REE, B'<"
253 "'R\u00c9E, L'<"
254 "'REE, V'<"
255 "'SCHYTT, B'<"
256 "'SCHYTT, H'<"
257 "'SCH\u00dcTT, H'<"
258 "'SCHYTT, L'<"
259 "'SCH\u00dcTT, M'<"
260 "SS<"
261 "\u00df<"
262 "SSA<"
263 "'STORE VILDMOSE'<"
264 "STOREK\u00c6R0<"
265 "'STORM PETERSEN'<"
266 "STORMLY<"
267 "THORVALD<"
268 "THORVARDUR<"
269 "THYGESEN<"
270 "\u00feORVAR\u00d0UR<"
271 "'VESTERG\u00c5RD, A'<"
272 "'VESTERGAARD, A'<"
273 "'VESTERG\u00c5RD, B'<"
274 "\u00c6BLE<"
275 "\u00c4BLE<"
276 "\u00d8BERG<"
277 "\u00d6BERG",
278
279 // constUCharCollationDanishTest::testNTList[][CollationDanishTest::MAX_TOKEN_LEN]="
280 "andere<"
281 "chaque<"
282 "chemin<"
283 "cote<"
284 "cot\u00e9<"
285 "c\u00f4te<"
286 "c\u00f4t\u00e9<"
287 "\u010du\u010d\u0113t<"
288 "Czech<"
289 "hi\u0161a<"
290 "irdisch<"
291 "lie<"
292 "lire<"
293 "llama<"
294 "l\u00f5ug<"
295 "l\u00f2za<"
296 "lu\u010d<"
297 "luck<"
298 "L\u00fcbeck<"
299 "lye<"
300 "l\u00e4vi<"
301 "L\u00f6wen<"
302 "m\u00e0\u0161ta<"
303 "m\u00eer<"
304 "myndig<"
305 "M\u00e4nner<"
306 "m\u00f6chten<"
307 "pi\u00f1a<"
308 "pint<"
309 "pylon<"
310 "\u0161\u00e0ran<"
311 "savoir<"
312 "\u0160erb\u016bra<"
313 "Sietla<"
314 "\u015blub<"
315 "subtle<"
316 "symbol<"
317 "s\u00e4mtlich<"
318 "waffle<"
319 "verkehrt<"
320 "wood<"
321 "vox<"
322 "v\u00e4ga<"
323 "yen<"
324 "yuan<"
325 "yucca<"
326 "\u017eal<"
327 "\u017eena<"
328 "\u017den\u0113va<"
329 "zoo0<"
330 "Zviedrija<"
331 "Z\u00fcrich<"
332 "zysk0<"
333 "\u00e4ndere"
334 }
335 }
336 }
337}