os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/exec.test
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/exec.test	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,37 @@
     1.4 +# 2008 Jan 21
     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 +# This file implements regression tests for SQLite library.
    1.15 +#
    1.16 +# This file implements tests for the sqlite3_exec interface
    1.17 +#
    1.18 +# $Id: exec.test,v 1.1 2008/01/21 16:22:46 drh Exp $
    1.19 +
    1.20 +set testdir [file dirname $argv0]
    1.21 +source $testdir/tester.tcl
    1.22 +
    1.23 +do_test exec-1.1 {
    1.24 +  execsql {
    1.25 +    CREATE TABLE t1(a,b);
    1.26 +    INSERT INTO t1 VALUES(1,2);
    1.27 +    SELECT * FROM t1;
    1.28 +  }
    1.29 +} {1 2}
    1.30 +do_test exec-1.2 {
    1.31 +  sqlite3_exec db {/* comment */;;; SELECT * FROM t1; /* comment */}
    1.32 +} {0 {a b 1 2}}
    1.33 +do_test exec-1.3 {
    1.34 +  sqlite3 db2 test.db
    1.35 +  db2 eval {CREATE TABLE t2(x, y);}
    1.36 +  db2 close
    1.37 +  sqlite3_exec db {SELECT * FROM t1}
    1.38 +} {0 {a b 1 2}}
    1.39 +
    1.40 +finish_test