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 if {![info exists testdir]} {
16 set testdir [file join [file dirname [info script]] .. .. test]
18 source [file join [file dirname [info script]] rtree_util.tcl]
19 source $testdir/tester.tcl
20 set testprefix rtreecirc
28 CREATE VIRTUAL TABLE rt USING rtree(id, x1, x2, y1, y2);
29 SELECT name FROM sqlite_master ORDER BY 1;
31 rt rt_node rt_parent rt_rowid
35 foreach {tn schema sql} {
37 CREATE TRIGGER tr1 AFTER INSERT ON rt_node BEGIN
41 INSERT INTO rt VALUES(1, 2, 3, 4, 5);
44 CREATE TRIGGER tr1 AFTER INSERT ON rt_parent BEGIN
48 INSERT INTO rt VALUES(1, 2, 3, 4, 5);
51 CREATE TRIGGER tr1 AFTER INSERT ON rt_rowid BEGIN
55 INSERT INTO rt VALUES(1, 2, 3, 4, 5);
59 do_execsql_test 1.1.$tn.1 $schema
60 do_catchsql_test 1.1.$tn.2 $sql {1 {no such table: main.rt}}