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

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

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 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
OLDNEW
1 # 1 #
2 # 2007 May 7 2 # 2007 May 7
3 # 3 #
4 # The author disclaims copyright to this source code. In place of 4 # The author disclaims copyright to this source code. In place of
5 # a legal notice, here is a blessing: 5 # a legal notice, here is a blessing:
6 # 6 #
7 # May you do good and not evil. 7 # May you do good and not evil.
8 # May you find forgiveness for yourself and forgive others. 8 # May you find forgiveness for yourself and forgive others.
9 # May you share freely, never taking more than you give. 9 # May you share freely, never taking more than you give.
10 # 10 #
(...skipping 26 matching lines...) Expand all
37 CREATE TABLE abc(a COLLATE CASELESS, b, c); 37 CREATE TABLE abc(a COLLATE CASELESS, b, c);
38 } 38 }
39 } {1 {no such collation sequence: CASELESS}} 39 } {1 {no such collation sequence: CASELESS}}
40 do_test collate7-1.4 { 40 do_test collate7-1.4 {
41 sqlite3_create_collation_v2 db CASELESS caseless_cmp {incr ::caseless_del} 41 sqlite3_create_collation_v2 db CASELESS caseless_cmp {incr ::caseless_del}
42 db close 42 db close
43 set ::caseless_del 43 set ::caseless_del
44 } {2} 44 } {2}
45 45
46 do_test collate7-2.1 { 46 do_test collate7-2.1 {
47 file delete -force test.db test.db-journal 47 forcedelete test.db test.db-journal
48 sqlite3 db test.db 48 sqlite3 db test.db
49 sqlite3_create_collation_v2 db CASELESS caseless_cmp {incr ::caseless_del} 49 sqlite3_create_collation_v2 db CASELESS caseless_cmp {incr ::caseless_del}
50 execsql { 50 execsql {
51 PRAGMA encoding='utf-16'; 51 PRAGMA encoding='utf-16';
52 CREATE TABLE abc16(a COLLATE CASELESS, b, c); 52 CREATE TABLE abc16(a COLLATE CASELESS, b, c);
53 } db 53 } db
54 set ::caseless_del 54 set ::caseless_del
55 } {2} 55 } {2}
56 do_test collate7-2.2 { 56 do_test collate7-2.2 {
57 execsql { 57 execsql {
58 SELECT * FROM abc16 WHERE a < 'abc'; 58 SELECT * FROM abc16 WHERE a < 'abc';
59 } 59 }
60 set ::caseless_del 60 set ::caseless_del
61 } {2} 61 } {2}
62 do_test collate7-2.3 { 62 do_test collate7-2.3 {
63 sqlite_delete_collation db CASELESS 63 sqlite_delete_collation db CASELESS
64 set ::caseless_del 64 set ::caseless_del
65 } {3} 65 } {3}
66 do_test collate7-2.4 { 66 do_test collate7-2.4 {
67 catchsql { 67 catchsql {
68 SELECT * FROM abc16 WHERE a < 'abc'; 68 SELECT * FROM abc16 WHERE a < 'abc';
69 } 69 }
70 } {1 {no such collation sequence: CASELESS}} 70 } {1 {no such collation sequence: CASELESS}}
71 71
72 finish_test 72 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698