]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | //******************************************************************************* |
2 | //* | |
729e4ab9 | 3 | //* Copyright (C) 2002-2010, International Business Machines |
b75a7d8f A |
4 | //* Corporation and others. All Rights Reserved. |
5 | //* | |
6 | //******************************************************************************* | |
7 | ||
73c04bcf | 8 | casing:table(nofallback) { |
b75a7d8f | 9 | Info { |
73c04bcf | 10 | Description { "This is test data file for string casing." } |
b75a7d8f | 11 | |
73c04bcf A |
12 | LongDescription { |
13 | "each item is an array with\n" | |
14 | "input string, result string, locale ID[, break iterator]\n" | |
15 | "the break iterator (only for titlecasing) is specified as an int, same as in UBreakIteratorType:\n" | |
46f4442e A |
16 | "0=UBRK_CHARACTER 1=UBRK_WORD 2=UBRK_LINE 3=UBRK_SENTENCE 4=UBRK_TITLE -1=default (NULL=words) -2=no breaks (.*)\n" |
17 | "options: T=U_FOLD_CASE_EXCLUDE_SPECIAL_I L=U_TITLECASE_NO_LOWERCASE A=U_TITLECASE_NO_BREAK_ADJUSTMENT\n" | |
73c04bcf | 18 | } |
b75a7d8f A |
19 | } |
20 | TestData { | |
73c04bcf A |
21 | lowercasing { |
22 | Headers { "Input", "Output", "Locale" } | |
23 | Cases { | |
24 | { " tHe QUIcK bRoWn", " the quick brown", "" }, | |
25 | { "aBIΣßΣ/𐐅", "abiσßς/𐐭", "" }, | |
26 | { "aBIΣßΣ/𐐅", "abıσßς/𐐭", "tur" } // tur: 3-letter code for Turkish | |
27 | } | |
28 | } | |
29 | uppercasing { | |
30 | Headers { "Input", "Output", "Locale" } | |
31 | Cases { | |
32 | { " tHe QUIcK bRoWn", " THE QUICK BROWN", "" }, | |
33 | { "aBiσßς/ffi𐐭", "ABIΣSSΣ/FFI𐐅", "" }, | |
34 | { "aBiσßς/ffi𐐭", "ABİΣSSΣ/FFI𐐅", "az" } // az same casing as tr | |
35 | } | |
36 | } | |
b75a7d8f | 37 | titlecasing { |
46f4442e | 38 | Headers { "Input", "Output", "Locale", "Type", "Options" } |
b75a7d8f | 39 | Cases { |
46f4442e A |
40 | { "ʻaMeLikA huI Pū ʻʻʻiA", "ʻAmelika Hui Pū ʻʻʻIa", "", "-1", "" }, // titlecase first _cased_ letter, j4933 |
41 | { " tHe QUIcK bRoWn", " The Quick Brown", "", "4", "" }, | |
42 | { "DŽDždžLJLjljNJNjnj", "DžDžDžLjLjLjNjNjNj", "", "0", "" }, // UBRK_CHARACTER | |
43 | { "ljubav ljubav", "Ljubav Ljubav", "", "-1", "" }, // Lj vs. L+j | |
44 | { "ijssel igloo IJMUIDEN", "Ijssel Igloo Ijmuiden", "", "1", "" }, // Dutch titlecasing default | |
45 | { "ijssel igloo IJMUIDEN", "IJssel Igloo IJmuiden", "nl", "1", "" }, // Dutch titlecasing | |
46 | { "'oH dOn'T tItLeCaSe AfTeR lEtTeR+'", "'Oh Don't Titlecase After Letter+'", "", "-1", "" }, | |
47 | ||
48 | { "a ʻCaT. A ʻdOg! ʻeTc.", "A ʻCat. A ʻDog! ʻEtc.", "", "-1", "" }, // default | |
49 | { "a ʻCaT. A ʻdOg! ʻeTc.", "A ʻcat. A ʻdog! ʻetc.", "", "-1", "A" }, // U_TITLECASE_NO_BREAK_ADJUSTMENT | |
50 | { "a ʻCaT. A ʻdOg! ʻeTc.", "A ʻCaT. A ʻdOg! ʻETc.", "", "3", "L" }, // UBRK_SENTENCE and U_TITLECASE_NO_LOWERCASE | |
51 | ||
52 | { "ʻcAt! ʻeTc.", "ʻCat! ʻetc.", "", "-2", "" }, // -2=Trivial break iterator | |
53 | { "ʻcAt! ʻeTc.", "ʻcat! ʻetc.", "", "-2", "A" }, // U_TITLECASE_NO_BREAK_ADJUSTMENT | |
54 | { "ʻcAt! ʻeTc.", "ʻCAt! ʻeTc.", "", "-2", "L" }, // U_TITLECASE_NO_LOWERCASE | |
55 | { "ʻcAt! ʻeTc.", "ʻcAt! ʻeTc.", "", "-2", "AL" }, // Both options | |
56 | ||
729e4ab9 A |
57 | // Test case for ticket #7251: UCharacter.toTitleCase() throws OutOfMemoryError |
58 | // when TITLECASE_NO_LOWERCASE encounters a single-letter word | |
59 | { "a b c", "A B C", "", "1", "L" } // U_TITLECASE_NO_LOWERCASE | |
46f4442e A |
60 | } |
61 | } | |
62 | casefolding { | |
63 | Headers { "Input", "Output", "Options" } | |
64 | Cases { | |
65 | { "aBİIıϐßffi", "abi̇iıβssffi", "" }, | |
66 | { "aBİIıϐßffi", "abiııβssffi", "T" } // U_FOLD_CASE_EXCLUDE_SPECIAL_I | |
b75a7d8f A |
67 | } |
68 | } | |
69 | } | |
70 | } |