diff options
author | dan miller | 2007-10-20 02:49:29 +0000 |
---|---|---|
committer | dan miller | 2007-10-20 02:49:29 +0000 |
commit | e36d23a85ebff914d74bb541558c2b6082b78edb (patch) | |
tree | 54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/collate8.test | |
parent | * Fixed an issue whereby avatar chat distances were being calculated against ... (diff) | |
download | opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2 opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz |
sqlite source (unix build) added to libraries
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.test | 52 |
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 | |||
18 | set testdir [file dirname $argv0] | ||
19 | source $testdir/tester.tcl | ||
20 | |||
21 | do_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} | ||
31 | do_test collate8-1.2 { | ||
32 | execsql { | ||
33 | SELECT rowid FROM t1 WHERE a<'ccc' ORDER BY 1 | ||
34 | } | ||
35 | } {1 2} | ||
36 | do_test collate8-1.3 { | ||
37 | execsql { | ||
38 | SELECT rowid FROM t1 WHERE a<'ccc' COLLATE binary ORDER BY 1 | ||
39 | } | ||
40 | } {1 2 4} | ||
41 | do_test collate8-1.4 { | ||
42 | execsql { | ||
43 | SELECT rowid FROM t1 WHERE +a<'ccc' ORDER BY 1 | ||
44 | } | ||
45 | } {1 2} | ||
46 | do_test collate8-1.5 { | ||
47 | execsql { | ||
48 | SELECT a FROM t1 ORDER BY +a | ||
49 | } | ||
50 | } {aaa BBB ccc DDD} | ||
51 | |||
52 | finish_test | ||