Sync up the MSVC autoconf makefile.
[sqlite.git] / test / indexexpr2.test
blobc72561f34760bae0f9e655203c5b96995aa6acac
1 # 2017 April 11
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
6 #    May you do good and not evil.
7 #    May you find forgiveness for yourself and forgive others.
8 #    May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library.
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16 set testprefix indexexpr2
18 do_execsql_test 1 {
19   CREATE TABLE t1(a, b);
20   INSERT INTO t1 VALUES(1, 'one');
21   INSERT INTO t1 VALUES(2, 'two');
22   INSERT INTO t1 VALUES(3, 'three');
24   CREATE INDEX i1 ON t1(b || 'x');
27 do_execsql_test 1.1 {
28   SELECT 'TWOX' == (b || 'x') FROM t1 WHERE (b || 'x')>'onex'
29 } {0 0}
31 do_execsql_test 1.2 {
32   SELECT 'TWOX' == (b || 'x') COLLATE nocase  FROM t1 WHERE (b || 'x')>'onex'
33 } {0 1}
35 do_execsql_test 2.0 {
36   CREATE INDEX i2 ON t1(a+1);
39 do_execsql_test 2.1 {
40   SELECT a+1, quote(a+1) FROM t1 ORDER BY 1;
41 } {2 2 3 3 4 4}
43 finish_test