sl@0: # 2007 July 24 sl@0: # sl@0: # The author disclaims copyright to this source code. In place of sl@0: # a legal notice, here is a blessing: sl@0: # sl@0: # May you do good and not evil. sl@0: # May you find forgiveness for yourself and forgive others. sl@0: # May you share freely, never taking more than you give. sl@0: # sl@0: #************************************************************************* sl@0: # This file implements regression tests for SQLite library. The focus sl@0: # of this script is testing the FTS1 module for errors in the handling sl@0: # of SQLITE_SCHEMA. sl@0: # sl@0: # $Id: fts1n.test,v 1.1 2007/07/25 00:38:06 shess Exp $ sl@0: # sl@0: sl@0: set testdir [file dirname $argv0] sl@0: source $testdir/tester.tcl sl@0: sl@0: # If SQLITE_ENABLE_FTS1 is not defined, omit this file. sl@0: ifcapable !fts1 { sl@0: finish_test sl@0: return sl@0: } sl@0: sl@0: do_test fts1m-1.1 { sl@0: execsql { sl@0: CREATE VIRTUAL TABLE t1 USING fts1(a, b, c); sl@0: INSERT INTO t1(a, b, c) VALUES('one three four', 'one four', 'one two'); sl@0: SELECT a, b, c FROM t1 WHERE c MATCH 'two'; sl@0: } sl@0: } {{one three four} {one four} {one two}} sl@0: sl@0: # This test was crashing at one point. sl@0: # sl@0: do_test fts1m-1.2 { sl@0: execsql { sl@0: SELECT a, b, c FROM t1 WHERE c MATCH 'two'; sl@0: CREATE TABLE t3(a, b, c); sl@0: SELECT a, b, c FROM t1 WHERE c MATCH 'two'; sl@0: } sl@0: } {{one three four} {one four} {one two} {one three four} {one four} {one two}} sl@0: sl@0: finish_test