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 fts5colset
18 # If SQLITE_ENABLE_FTS5 is not defined, omit this file.
24 foreach_detail_mode $::testprefix {
25 if {[detail_is_none]} continue
28 CREATE VIRTUAL TABLE t1 USING fts5(a, b, c, d, detail=%DETAIL%);
29 INSERT INTO t1 VALUES('a', 'b', 'c', 'd'); -- 1
30 INSERT INTO t1 VALUES('d', 'a', 'b', 'c'); -- 2
31 INSERT INTO t1 VALUES('c', 'd', 'a', 'b'); -- 3
32 INSERT INTO t1 VALUES('b', 'c', 'd', 'a'); -- 4
40 5 " - {d d c} : a" {1 2}
41 6 "- {d c b a} : a" {}
42 7 "-{\"a\"} : b" {1 2 3}
45 10 "-\"c\" : a" {1 2 4}
48 do_execsql_test 1.$tn {
49 SELECT rowid FROM t1($q)