sqlite/test/trace.test
danielk1977 93cd039570 Minor fixes for UTF-16 databases. (CVS 1770)
FossilOrigin-Name: 6c5c11e07e157c15cf99078fce2a1bc478e287ce
2004-06-30 02:35:51 +00:00

48 lines
1.2 KiB
Plaintext

# 2004 Jun 29
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for the "sqlite3_trace()" API.
#
# $Id: trace.test,v 1.2 2004/06/30 02:35:51 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set ::stmtlist {}
do_test trace-1.1 {
set rc [catch {db trace 1 2 3} msg]
lappend rc $msg
} {1 {wrong # args: should be "db trace ?CALLBACK?"}}
proc trace_proc cmd {
lappend ::stmtlist [string trim $cmd]
}
do_test trace-1.2 {
db trace trace_proc
db trace
} {trace_proc}
do_test trace-1.3 {
execsql {
CREATE TABLE t1(a,b);
INSERT INTO t1 VALUES(1,2);
SELECT * FROM t1;
}
} {1 2}
do_test trace-1.4 {
set ::stmtlist
} {{CREATE TABLE t1(a,b);} {INSERT INTO t1 VALUES(1,2);} {SELECT * FROM t1;} {}}
do_test trace-1.5 {
db trace {}
db trace
} {}
finish_test