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 #***********************************************************************
13 if {![info exists testdir
]} {
14 set testdir
[file join [file dirname
[info script
]] .. .. test
]
16 source $testdir/tester.tcl
18 proc do_intck
{db
{bSuspend
0}} {
19 set ic
[sqlite3_intck
$db main
]
22 while {"SQLITE_OK"==[$ic step
]} {
27 if {$bSuspend} { $ic suspend
}
31 if {[lindex $err 0]!="SQLITE_OK"} {
39 proc intck_sql
{db tbl
} {
40 set ic
[sqlite3_intck
$db main
]
41 set sql
[$ic test_sql
$tbl]
46 proc do_intck_test
{tn expect
} {
47 uplevel [list do_test
$tn.a
[list do_intck db
] [list {*}$expect]]
48 uplevel [list do_test
$tn.b
[list do_intck db
1] [list {*}$expect]]