Enhance the command-line completion extension to return the names of
[sqlite.git] / test / exec.test
blobdbcc6265b344bc8cbdfe650bf87bd0b665176a01
1 # 2008 Jan 21
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.
13 # This file implements tests for the sqlite3_exec interface
15 # $Id: exec.test,v 1.1 2008/01/21 16:22:46 drh Exp $
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
20 do_test exec-1.1 {
21   execsql {
22     CREATE TABLE t1(a,b);
23     INSERT INTO t1 VALUES(1,2);
24     SELECT * FROM t1;
25   }
26 } {1 2}
27 do_test exec-1.2 {
28   sqlite3_exec db {/* comment */;;; SELECT * FROM t1; /* comment */}
29 } {0 {a b 1 2}}
30 do_test exec-1.3 {
31   sqlite3 db2 test.db
32   db2 eval {CREATE TABLE t2(x, y);}
33   db2 close
34   sqlite3_exec db {SELECT * FROM t1}
35 } {0 {a b 1 2}}
37 finish_test