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 #*************************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this script is testing the FTS5 module.
15 source [file join [file dirname [info script]] fts5_common.tcl]
16 set testprefix fts5circref
18 # If SQLITE_ENABLE_FTS5 is not defined, omit this file.
25 CREATE VIRTUAL TABLE tt USING fts5(a);
26 SELECT name FROM sqlite_master ORDER BY 1;
28 tt tt_config tt_content tt_data tt_docsize tt_idx
32 foreach {tn schema sql} {
34 CREATE TRIGGER tr1 AFTER INSERT ON tt_config BEGIN
38 INSERT INTO tt(tt, rank) VALUES('usermerge', 4);
42 CREATE TRIGGER tr1 AFTER INSERT ON tt_docsize BEGIN
46 INSERT INTO tt(a) VALUES('one two three');
50 CREATE TRIGGER tr1 AFTER INSERT ON tt_content BEGIN
54 INSERT INTO tt(a) VALUES('one two three');
58 CREATE TRIGGER tr1 AFTER INSERT ON tt_data BEGIN
62 INSERT INTO tt(a) VALUES('one two three');
66 CREATE TRIGGER tr1 AFTER INSERT ON tt_idx BEGIN
70 INSERT INTO tt(a) VALUES('one two three');
74 do_execsql_test 1.1.$tn.1 $schema
75 do_catchsql_test 1.1.$tn.2 $sql {1 {SQL logic error}}