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

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

Issue 694353003: Get `gn gen` to succeed on Windows (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove GYP_DEFINES code Created 6 years, 1 month 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/test/collate6.test ('k') | third_party/sqlite/src/test/collate8.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #
2 # 2007 May 7
3 #
4 # The author disclaims copyright to this source code. In place of
5 # a legal notice, here is a blessing:
6 #
7 # May you do good and not evil.
8 # May you find forgiveness for yourself and forgive others.
9 # May you share freely, never taking more than you give.
10 #
11 #***********************************************************************
12 # This file implements regression tests for SQLite library. The
13 # focus of this script is the experimental sqlite3_create_collation_v2()
14 # API.
15 #
16 # $Id: collate7.test,v 1.2 2008/07/12 14:52:20 drh Exp $
17
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
20
21 set ::caseless_del 0
22 proc caseless_cmp {zLeft zRight} {
23 string compare -nocase $zLeft $zRight
24 }
25
26 do_test collate7-1.1 {
27 set cmd [list incr ::caseless_del]
28 sqlite3_create_collation_v2 db CASELESS caseless_cmp $cmd
29 set ::caseless_del
30 } {0}
31 do_test collate7-1.2 {
32 sqlite_delete_collation db CASELESS
33 set ::caseless_del
34 } {1}
35 do_test collate7-1.3 {
36 catchsql {
37 CREATE TABLE abc(a COLLATE CASELESS, b, c);
38 }
39 } {1 {no such collation sequence: CASELESS}}
40 do_test collate7-1.4 {
41 sqlite3_create_collation_v2 db CASELESS caseless_cmp {incr ::caseless_del}
42 db close
43 set ::caseless_del
44 } {2}
45
46 do_test collate7-2.1 {
47 file delete -force test.db test.db-journal
48 sqlite3 db test.db
49 sqlite3_create_collation_v2 db CASELESS caseless_cmp {incr ::caseless_del}
50 execsql {
51 PRAGMA encoding='utf-16';
52 CREATE TABLE abc16(a COLLATE CASELESS, b, c);
53 } db
54 set ::caseless_del
55 } {2}
56 do_test collate7-2.2 {
57 execsql {
58 SELECT * FROM abc16 WHERE a < 'abc';
59 }
60 set ::caseless_del
61 } {2}
62 do_test collate7-2.3 {
63 sqlite_delete_collation db CASELESS
64 set ::caseless_del
65 } {3}
66 do_test collate7-2.4 {
67 catchsql {
68 SELECT * FROM abc16 WHERE a < 'abc';
69 }
70 } {1 {no such collation sequence: CASELESS}}
71
72 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/collate6.test ('k') | third_party/sqlite/src/test/collate8.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698