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 focus
12 # of this script is testing the FTS1 module, specifically snippet
13 # generation. Extracted from fts2o.test.
15 # $Id: fts1m.test,v 1.1 2007/07/25 00:25:20 shess Exp $
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
21 # If SQLITE_ENABLE_FTS1 is not defined, omit this file.
27 #---------------------------------------------------------------------
28 # These tests, fts1m-1.*, test that ticket #2429 is fixed.
31 CREATE VIRTUAL TABLE t1 USING fts1(a, b, c);
32 INSERT INTO t1(a, b, c) VALUES('one three four', 'one four', 'one four two');
36 SELECT rowid, snippet(t1) FROM t1 WHERE c MATCH 'four';
38 } {1 {one <b>four</b> two}}
41 SELECT rowid, snippet(t1) FROM t1 WHERE b MATCH 'four';
43 } {1 {one <b>four</b>}}
46 SELECT rowid, snippet(t1) FROM t1 WHERE a MATCH 'four';
48 } {1 {one three <b>four</b>}}