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 fts5delete
18 # If SQLITE_ENABLE_FTS5 is not defined, omit this file.
23 fts5_aux_test_functions db
26 CREATE VIRTUAL TABLE t1 USING fts5(x);
28 SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<5000
30 INSERT INTO t1(rowid, x) SELECT i, (i/2)*2 FROM s;
35 for {set i 1} {$i<=5000} {incr i} {
37 execsql { INSERT INTO t1 VALUES($i) }
39 execsql { DELETE FROM t1 WHERE rowid = $i }
46 execsql { INSERT INTO t1(t1, rank) VALUES('usermerge', 2); }
47 for {set i 0} {$i < 5} {incr i} {
48 execsql { INSERT INTO t1(t1, rank) VALUES('merge', 1) }
49 execsql { INSERT INTO t1(t1) VALUES('integrity-check') }