sl@0: # 2008 Jan 21 sl@0: # sl@0: # The author disclaims copyright to this source code. In place of sl@0: # a legal notice, here is a blessing: sl@0: # sl@0: # May you do good and not evil. sl@0: # May you find forgiveness for yourself and forgive others. sl@0: # May you share freely, never taking more than you give. sl@0: # sl@0: #*********************************************************************** sl@0: # This file implements regression tests for SQLite library. sl@0: # sl@0: # This file implements tests for the sqlite3_exec interface sl@0: # sl@0: # $Id: exec.test,v 1.1 2008/01/21 16:22:46 drh Exp $ sl@0: sl@0: set testdir [file dirname $argv0] sl@0: source $testdir/tester.tcl sl@0: sl@0: do_test exec-1.1 { sl@0: execsql { sl@0: CREATE TABLE t1(a,b); sl@0: INSERT INTO t1 VALUES(1,2); sl@0: SELECT * FROM t1; sl@0: } sl@0: } {1 2} sl@0: do_test exec-1.2 { sl@0: sqlite3_exec db {/* comment */;;; SELECT * FROM t1; /* comment */} sl@0: } {0 {a b 1 2}} sl@0: do_test exec-1.3 { sl@0: sqlite3 db2 test.db sl@0: db2 eval {CREATE TABLE t2(x, y);} sl@0: db2 close sl@0: sqlite3_exec db {SELECT * FROM t1} sl@0: } {0 {a b 1 2}} sl@0: sl@0: finish_test