1# 2011 March 25 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# This file implements regression tests for TCL interface to the 12# SQLite library. 13# 14# The focus of the tests is the word-fuzzer virtual table. 15# 16 17set testdir [file dirname $argv0] 18source $testdir/tester.tcl 19 20ifcapable !vtab { 21 finish_test 22 return 23} 24 25register_fuzzer_module db 26do_test fuzzer1-1.0 { 27 catchsql {CREATE VIRTUAL TABLE fault1 USING fuzzer;} 28} {1 {fuzzer virtual tables must be TEMP}} 29do_test fuzzer1-1.1 { 30 db eval {CREATE VIRTUAL TABLE temp.f1 USING fuzzer;} 31} {} 32do_test fuzzer1-1.2 { 33 db eval { 34 INSERT INTO f1(cfrom, cto, cost) VALUES('e','a',0.1); 35 INSERT INTO f1(cfrom, cto, cost) VALUES('a','e',0.1); 36 INSERT INTO f1(cfrom, cto, cost) VALUES('e','o',0.1); 37 } 38} {} 39 40 41finish_test 42