os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/fts1n.test
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/fts1n.test	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,45 @@
     1.4 +# 2007 July 24
     1.5 +#
     1.6 +# The author disclaims copyright to this source code.  In place of
     1.7 +# a legal notice, here is a blessing:
     1.8 +#
     1.9 +#    May you do good and not evil.
    1.10 +#    May you find forgiveness for yourself and forgive others.
    1.11 +#    May you share freely, never taking more than you give.
    1.12 +#
    1.13 +#*************************************************************************
    1.14 +# This file implements regression tests for SQLite library.  The focus
    1.15 +# of this script is testing the FTS1 module for errors in the handling
    1.16 +# of SQLITE_SCHEMA.
    1.17 +#
    1.18 +# $Id: fts1n.test,v 1.1 2007/07/25 00:38:06 shess Exp $
    1.19 +#
    1.20 +
    1.21 +set testdir [file dirname $argv0]
    1.22 +source $testdir/tester.tcl
    1.23 +
    1.24 +# If SQLITE_ENABLE_FTS1 is not defined, omit this file.
    1.25 +ifcapable !fts1 {
    1.26 +  finish_test
    1.27 +  return
    1.28 +}
    1.29 +
    1.30 +do_test fts1m-1.1 {
    1.31 +  execsql {
    1.32 +    CREATE VIRTUAL TABLE t1 USING fts1(a, b, c);
    1.33 +    INSERT INTO t1(a, b, c) VALUES('one three four', 'one four', 'one two');
    1.34 +    SELECT a, b, c FROM t1 WHERE c MATCH 'two';
    1.35 +  }
    1.36 +} {{one three four} {one four} {one two}}
    1.37 +
    1.38 +# This test was crashing at one point.
    1.39 +#
    1.40 +do_test fts1m-1.2 {
    1.41 +  execsql {
    1.42 +    SELECT a, b, c FROM t1 WHERE c MATCH 'two';
    1.43 +    CREATE TABLE t3(a, b, c);
    1.44 +    SELECT a, b, c FROM t1 WHERE  c  MATCH 'two';
    1.45 +  }
    1.46 +} {{one three four} {one four} {one two} {one three four} {one four} {one two}}
    1.47 +
    1.48 +finish_test