Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: third_party/sqlite/src/test/icu.test

Issue 1746453002: [sqlite] Backport icuCaseFunc16 patch from SQLite. Base URL: https://chromium.googlesource.com/chromium/src.git@zzsql_patch_backport_icu_compare
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/ext/icu/icu.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2007 May 1 1 # 2007 May 1
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 set ::egrave "\xE8" 49 set ::egrave "\xE8"
50 50
51 set ::OGRAVE "\xD2" 51 set ::OGRAVE "\xD2"
52 set ::ograve "\xF2" 52 set ::ograve "\xF2"
53 53
54 # That German letter that looks a bit like a B. The 54 # That German letter that looks a bit like a B. The
55 # upper-case version of which is "SS" (two characters). 55 # upper-case version of which is "SS" (two characters).
56 # 56 #
57 set ::szlig "\xDF" 57 set ::szlig "\xDF"
58 58
59 # U+FB03 (ffi ligature) and U+FB04 (ffl ligature). They're uppercased
60 # to 'FFI' and 'FFL'.
61 set ::ffi_ffl "\ufb03\ufb04"
62
63 # Tests of the upper()/lower() functions. 59 # Tests of the upper()/lower() functions.
64 # 60 #
65 test_expr icu-2.1 {i1='HellO WorlD'} {upper(i1)} {HELLO WORLD} 61 test_expr icu-2.1 {i1='HellO WorlD'} {upper(i1)} {HELLO WORLD}
66 test_expr icu-2.2 {i1='HellO WorlD'} {lower(i1)} {hello world} 62 test_expr icu-2.2 {i1='HellO WorlD'} {lower(i1)} {hello world}
67 test_expr icu-2.3 {i1=$::egrave} {lower(i1)} $::egrave 63 test_expr icu-2.3 {i1=$::egrave} {lower(i1)} $::egrave
68 test_expr icu-2.4 {i1=$::egrave} {upper(i1)} $::EGRAVE 64 test_expr icu-2.4 {i1=$::egrave} {upper(i1)} $::EGRAVE
69 test_expr icu-2.5 {i1=$::ograve} {lower(i1)} $::ograve 65 test_expr icu-2.5 {i1=$::ograve} {lower(i1)} $::ograve
70 test_expr icu-2.6 {i1=$::ograve} {upper(i1)} $::OGRAVE 66 test_expr icu-2.6 {i1=$::ograve} {upper(i1)} $::OGRAVE
71 test_expr icu-2.3 {i1=$::EGRAVE} {lower(i1)} $::egrave 67 test_expr icu-2.3 {i1=$::EGRAVE} {lower(i1)} $::egrave
72 test_expr icu-2.4 {i1=$::EGRAVE} {upper(i1)} $::EGRAVE 68 test_expr icu-2.4 {i1=$::EGRAVE} {upper(i1)} $::EGRAVE
73 test_expr icu-2.5 {i1=$::OGRAVE} {lower(i1)} $::ograve 69 test_expr icu-2.5 {i1=$::OGRAVE} {lower(i1)} $::ograve
74 test_expr icu-2.6 {i1=$::OGRAVE} {upper(i1)} $::OGRAVE 70 test_expr icu-2.6 {i1=$::OGRAVE} {upper(i1)} $::OGRAVE
75 71
76 test_expr icu-2.7 {i1=$::szlig} {upper(i1)} "SS" 72 test_expr icu-2.7 {i1=$::szlig} {upper(i1)} "SS"
77 test_expr icu-2.8 {i1='SS'} {lower(i1)} "ss" 73 test_expr icu-2.8 {i1='SS'} {lower(i1)} "ss"
78 74
79 test_expr icu-2.9 {i1=$::ffi_ffl} {upper(i1)} "FFIFFL" 75 do_execsql_test icu-2.9 {
80 test_expr icu-2.10 {i1=$::ffi_ffl} {lower(i1)} $::ffi_ffl 76 SELECT upper(char(0xfb04,0xfb04,0xfb04,0xfb04));
77 } {FFLFFLFFLFFL}
81 78
82 # In turkish (locale="tr_TR"), the lower case version of I 79 # In turkish (locale="tr_TR"), the lower case version of I
83 # is "small dotless i" (code point 0x131 (decimal 305)). 80 # is "small dotless i" (code point 0x131 (decimal 305)).
84 # 81 #
85 set ::small_dotless_i "\u0131" 82 set ::small_dotless_i "\u0131"
86 test_expr icu-3.1 {i1='I'} {lower(i1)} "i" 83 test_expr icu-3.1 {i1='I'} {lower(i1)} "i"
87 test_expr icu-3.2 {i1='I'} {lower(i1, 'tr_tr')} $::small_dotless_i 84 test_expr icu-3.2 {i1='I'} {lower(i1, 'tr_tr')} $::small_dotless_i
88 test_expr icu-3.3 {i1='I'} {lower(i1, 'en_AU')} "i" 85 test_expr icu-3.3 {i1='I'} {lower(i1, 'en_AU')} "i"
89 86
90 #-------------------------------------------------------------------- 87 #--------------------------------------------------------------------
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } {1 {wrong number of arguments to function regexp()}} 130 } {1 {wrong number of arguments to function regexp()}}
134 do_catchsql_test icu-5.3 { 131 do_catchsql_test icu-5.3 {
135 SELECT regexp('a[abc]c.*', 'abc', 'c') 132 SELECT regexp('a[abc]c.*', 'abc', 'c')
136 } {1 {wrong number of arguments to function regexp()}} 133 } {1 {wrong number of arguments to function regexp()}}
137 do_catchsql_test icu-5.4 { 134 do_catchsql_test icu-5.4 {
138 SELECT 'abc' REGEXP 'a[abc]c.*' 135 SELECT 'abc' REGEXP 'a[abc]c.*'
139 } {0 1} 136 } {0 1}
140 do_catchsql_test icu-5.4 { SELECT 'abc' REGEXP } {1 {near " ": syntax error}} 137 do_catchsql_test icu-5.4 { SELECT 'abc' REGEXP } {1 {near " ": syntax error}}
141 do_catchsql_test icu-5.5 { SELECT 'abc' REGEXP, 1 } {1 {near ",": syntax error}} 138 do_catchsql_test icu-5.5 { SELECT 'abc' REGEXP, 1 } {1 {near ",": syntax error}}
142 139
140
141 do_malloc_test icu-6.10 -sqlbody {
142 SELECT upper(char(0xfb04,0xdf,0xfb04,0xe8,0xfb04));
143 }
144
143 finish_test 145 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/ext/icu/icu.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698