aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/test/collate8.test
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/collate8.test')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/test/collate8.test52
1 files changed, 52 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/collate8.test b/libraries/sqlite/unix/sqlite-3.5.1/test/collate8.test
new file mode 100644
index 0000000..3e90c38
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/test/collate8.test
@@ -0,0 +1,52 @@
1#
2# 2007 June 20
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 making sure collations pass through the
14# unary + operator.
15#
16# $Id: collate8.test,v 1.1 2007/06/20 16:13:23 drh Exp $
17
18set testdir [file dirname $argv0]
19source $testdir/tester.tcl
20
21do_test collate8-1.1 {
22 execsql {
23 CREATE TABLE t1(a TEXT COLLATE nocase);
24 INSERT INTO t1 VALUES('aaa');
25 INSERT INTO t1 VALUES('BBB');
26 INSERT INTO t1 VALUES('ccc');
27 INSERT INTO t1 VALUES('DDD');
28 SELECT a FROM t1 ORDER BY a;
29 }
30} {aaa BBB ccc DDD}
31do_test collate8-1.2 {
32 execsql {
33 SELECT rowid FROM t1 WHERE a<'ccc' ORDER BY 1
34 }
35} {1 2}
36do_test collate8-1.3 {
37 execsql {
38 SELECT rowid FROM t1 WHERE a<'ccc' COLLATE binary ORDER BY 1
39 }
40} {1 2 4}
41do_test collate8-1.4 {
42 execsql {
43 SELECT rowid FROM t1 WHERE +a<'ccc' ORDER BY 1
44 }
45} {1 2}
46do_test collate8-1.5 {
47 execsql {
48 SELECT a FROM t1 ORDER BY +a
49 }
50} {aaa BBB ccc DDD}
51
52finish_test