Remove a lot of the text describing extended format options from the
[sqlite.git] / test / fts-9fd058691.test
blobb228482d46bb84c7e8a620a9589e68bf8d43861c
1 # 2011 October 13
3 #    May you do good and not evil.
4 #    May you find forgiveness for yourself and forgive others.
5 #    May you share freely, never taking more than you give.
7 #***********************************************************************
9 # This file implements regression tests for the FTS SQLite module.
11 # This file implements tests to verify that ticket [9fd058691] has been
12 # fixed.  
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
18 # If SQLITE_ENABLE_FTS3 is defined, omit this file.
19 ifcapable !fts3 {
20   finish_test
21   return
24 set ::testprefix fts3-9fd058691
26 do_execsql_test 1.0 {
27   CREATE VIRTUAL TABLE fts USING fts3( tags TEXT);
28   INSERT INTO fts (tags) VALUES ('tag1');
29   SELECT * FROM fts WHERE tags MATCH 'tag1';
30 } {tag1}
32 do_test 1.1 {
33   db close
34   sqlite3 db test.db
35   execsql {
36     UPDATE fts SET tags = 'tag1' WHERE rowid = 1;
37     SELECT * FROM fts WHERE tags MATCH 'tag1';
38   }
39 } {tag1}
41 db close
42 forcedelete test.db
43 sqlite3 db test.db
45 do_execsql_test 2.0 {
46   CREATE VIRTUAL TABLE fts USING fts3(tags TEXT);
47   INSERT INTO fts (docid, tags) VALUES (1, 'tag1');
48   INSERT INTO fts (docid, tags) VALUES (2, NULL);
49   INSERT INTO fts (docid, tags) VALUES (3, 'three');
50 } {}
52 do_test 2.1 {
53   execsql {
54     UPDATE fts SET tags = 'two' WHERE rowid = 2;
55     SELECT * FROM fts WHERE tags MATCH 'two';
56   }
57 } {two}
59 finish_test