1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/tkt3121.test Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,50 @@
1.4 +# 2008 May 16
1.5 +#
1.6 +# The author disclaims copyright to this source code. In place of
1.7 +# a legal notice, here is a blessing:
1.8 +#
1.9 +# May you do good and not evil.
1.10 +# May you find forgiveness for yourself and forgive others.
1.11 +# May you share freely, never taking more than you give.
1.12 +#
1.13 +#***********************************************************************
1.14 +#
1.15 +# $Id: tkt3121.test,v 1.2 2008/07/12 14:52:21 drh Exp $
1.16 +
1.17 +set testdir [file dirname $argv0]
1.18 +source $testdir/tester.tcl
1.19 +
1.20 +ifcapable !vtab {
1.21 + finish_test
1.22 + return
1.23 +}
1.24 +
1.25 +# Register the module
1.26 +register_echo_module [sqlite3_connection_pointer db]
1.27 +
1.28 +do_test vtabD-1.1 {
1.29 + execsql {
1.30 + PRAGMA encoding = 'utf16';
1.31 +
1.32 + CREATE TABLE r1(field);
1.33 + CREATE TABLE r2(col PRIMARY KEY, descr);
1.34 +
1.35 + INSERT INTO r1 VALUES('abcd');
1.36 + INSERT INTO r2 VALUES('abcd', 'A nice description');
1.37 + INSERT INTO r2 VALUES('efgh', 'Another description');
1.38 +
1.39 + CREATE VIRTUAL TABLE t1 USING echo(r1);
1.40 + CREATE VIRTUAL TABLE t2 USING echo(r2);
1.41 + }
1.42 +} {}
1.43 +
1.44 +do_test vtabD-1.2 {
1.45 + execsql {
1.46 + select
1.47 + t1.field as Field,
1.48 + t2.descr as Descr
1.49 + from t1 inner join t2 on t1.field = t2.col order by t1.field
1.50 + }
1.51 +} {abcd {A nice description}}
1.52 +
1.53 +finish_test