1# 2001 September 15 2# 3# The author disclaims copyright to this source code. In place of 4# a legal notice, here is a blessing: 5# 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. 9# 10#*********************************************************************** 11# 12 13set testdir [file dirname $argv0] 14source $testdir/tester.tcl 15 16db close 17 18foreach {t failed rc started} { 19 1.1 {} SQLITE_OK {mutex mem pcache os} 20 1.2 {mutex} SQLITE_ERROR {} 21 1.3 {mem} SQLITE_ERROR {mutex} 22 1.4 {pcache} SQLITE_ERROR {mutex mem} 23 1.5 {os} SQLITE_ERROR {mutex mem pcache} 24} { 25 do_test init-$t.1 { 26 eval init_wrapper_install $failed 27 sqlite3_initialize 28 } $rc 29 do_test init-$t.2 { 30 init_wrapper_query 31 } $started 32 do_test init-$t.3 { 33 sqlite3_shutdown 34 init_wrapper_query 35 } {} 36 do_test init-$t.4 { 37 sqlite3_initialize 38 } $rc 39 do_test init-$t.5 { 40 init_wrapper_query 41 } $started 42 do_test init-$t.6 { 43 init_wrapper_clear 44 sqlite3_initialize 45 } SQLITE_OK 46 do_test init-$t.7 { 47 init_wrapper_query 48 } {mutex mem pcache os} 49 do_test init-$t.8 { 50 init_wrapper_uninstall 51 } {} 52} 53 54autoinstall_test_functions 55finish_test 56 57