/ Check-in [31752207]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix Makefile.in to account for recent changes. Update fts5 test scripts so that they do not run if SQLITE_ENABLE_FTS5 is not defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fts5
Files: files | file ages | folders
SHA1: 3175220747f5d4dadd17e09fb1899dc782c90926
User & Date: dan 2015-06-25 20:36:36
Context
2015-06-26
16:42
Remove fts5 initialization code from core file main.c. check-in: c91a93b3 user: dan tags: fts5
04:34
Initial changes to get FTS5 working with MSVC. check-in: ef2052f8 user: mistachkin tags: fts5Msvc
2015-06-25
20:36
Fix Makefile.in to account for recent changes. Update fts5 test scripts so that they do not run if SQLITE_ENABLE_FTS5 is not defined. check-in: 31752207 user: dan tags: fts5
20:16
Merge latest trunk changes into this branch. check-in: fcd8f7ce user: dan tags: fts5
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to Makefile.in.

   169    169            backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
   170    170            callback.lo complete.lo ctime.lo date.lo dbstat.lo delete.lo \
   171    171            expr.lo fault.lo fkey.lo \
   172    172            fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
   173    173            fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
   174    174            fts3_tokenize_vtab.lo \
   175    175            fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
          176  +	 fts5.lo \
   176    177            func.lo global.lo hash.lo \
   177    178            icu.lo insert.lo journal.lo legacy.lo loadext.lo \
   178    179            main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
   179    180            memjournal.lo \
   180    181            mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
   181    182            notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
   182    183            pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
................................................................................
   343    344   SRC += \
   344    345     $(TOP)/ext/rtree/rtree.h \
   345    346     $(TOP)/ext/rtree/rtree.c
   346    347   SRC += \
   347    348     $(TOP)/ext/ota/sqlite3ota.h \
   348    349     $(TOP)/ext/ota/sqlite3ota.c
   349    350   
   350         -SRC += \
   351         -   $(TOP)/ext/fts5/fts5.h \
   352         -   $(TOP)/ext/fts5/fts5Int.h \
   353         -   $(TOP)/ext/fts5/fts5_aux.c \
   354         -   $(TOP)/ext/fts5/fts5_buffer.c \
   355         -   $(TOP)/ext/fts5/fts5_main.c \
   356         -   $(TOP)/ext/fts5/fts5_config.c \
   357         -   $(TOP)/ext/fts5/fts5_expr.c \
   358         -   $(TOP)/ext/fts5/fts5_hash.c \
   359         -   $(TOP)/ext/fts5/fts5_index.c \
   360         -   fts5parse.c fts5parse.h \
   361         -   $(TOP)/ext/fts5/fts5_storage.c \
   362         -   $(TOP)/ext/fts5/fts5_tokenize.c \
   363         -   $(TOP)/ext/fts5/fts5_unicode2.c \
   364         -   $(TOP)/ext/fts5/fts5_vocab.c 
   365         -
   366    351   
   367    352   # Generated source code files
   368    353   #
   369    354   SRC += \
   370    355     keywordhash.h \
   371    356     opcodes.c \
   372    357     opcodes.h \
................................................................................
   425    410   #
   426    411   TESTSRC += \
   427    412     $(TOP)/ext/misc/amatch.c \
   428    413     $(TOP)/ext/misc/closure.c \
   429    414     $(TOP)/ext/misc/eval.c \
   430    415     $(TOP)/ext/misc/fileio.c \
   431    416     $(TOP)/ext/misc/fuzzer.c \
          417  +  $(TOP)/ext/fts5/fts5_tcl.c \
   432    418     $(TOP)/ext/misc/ieee754.c \
   433    419     $(TOP)/ext/misc/nextchar.c \
   434    420     $(TOP)/ext/misc/percentile.c \
   435    421     $(TOP)/ext/misc/regexp.c \
   436    422     $(TOP)/ext/misc/spellfix.c \
   437    423     $(TOP)/ext/misc/totype.c \
   438    424     $(TOP)/ext/misc/wholenumber.c
................................................................................
   986    972   
   987    973   fts3_write.lo:	$(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
   988    974   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
   989    975   
   990    976   rtree.lo:	$(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
   991    977   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
   992    978   
          979  +# FTS5 things
          980  +#
          981  +FTS5_SRC = \
          982  +   $(TOP)/ext/fts5/fts5.h \
          983  +   $(TOP)/ext/fts5/fts5Int.h \
          984  +   $(TOP)/ext/fts5/fts5_aux.c \
          985  +   $(TOP)/ext/fts5/fts5_buffer.c \
          986  +   $(TOP)/ext/fts5/fts5_main.c \
          987  +   $(TOP)/ext/fts5/fts5_config.c \
          988  +   $(TOP)/ext/fts5/fts5_expr.c \
          989  +   $(TOP)/ext/fts5/fts5_hash.c \
          990  +   $(TOP)/ext/fts5/fts5_index.c \
          991  +   fts5parse.c fts5parse.h \
          992  +   $(TOP)/ext/fts5/fts5_storage.c \
          993  +   $(TOP)/ext/fts5/fts5_tokenize.c \
          994  +   $(TOP)/ext/fts5/fts5_unicode2.c \
          995  +   $(TOP)/ext/fts5/fts5_varint.c \
          996  +   $(TOP)/ext/fts5/fts5_vocab.c  \
          997  +
   993    998   fts5parse.c:	$(TOP)/ext/fts5/fts5parse.y lemon 
   994    999   	cp $(TOP)/ext/fts5/fts5parse.y .
   995   1000   	rm -f fts5parse.h
   996   1001   	./lemon $(OPTS) fts5parse.y
   997   1002   	mv fts5parse.c fts5parse.c.orig
   998   1003   	echo "#ifdef SQLITE_ENABLE_FTS5" > fts5parse.c
   999   1004   	cat fts5parse.c.orig | sed 's/yy/fts5yy/g' | sed 's/YY/fts5YY/g' \
  1000   1005   		| sed 's/TOKEN/FTS5TOKEN/g' >> fts5parse.c
  1001   1006   	echo "#endif /* SQLITE_ENABLE_FTS5 */" >> fts5parse.c
  1002   1007   
  1003   1008   fts5parse.h: fts5parse.c
  1004   1009   
         1010  +fts5.c: $(FTS5_SRC)
         1011  +	$(TCLSH_CMD) $(TOP)/ext/fts5/tool/mkfts5c.tcl
         1012  +
         1013  +fts5.lo:	fts5.c $(HDR) $(EXTHDR)
         1014  +	$(LTCOMPILE) -DSQLITE_CORE -c fts5.c
         1015  +
  1005   1016   
  1006   1017   # Rules to build the 'testfixture' application.
  1007   1018   #
  1008   1019   # If using the amalgamation, use sqlite3.c directly to build the test
  1009   1020   # fixture.  Otherwise link against libsqlite3.la.  (This distinction is
  1010   1021   # necessary because the test fixture requires non-API symbols which are
  1011   1022   # hidden when the library is built via the amalgamation).

Changes to ext/fts5/test/fts5_common.tcl.

    10     10   #***********************************************************************
    11     11   #
    12     12   
    13     13   if {![info exists testdir]} {
    14     14     set testdir [file join [file dirname [info script]] .. .. .. test]
    15     15   }
    16     16   source $testdir/tester.tcl
           17  +
    17     18   
    18     19   catch { sqlite3_fts5_may_be_corrupt 0 }
    19     20   
    20     21   proc fts5_test_poslist {cmd} {
    21     22     set res [list]
    22     23     for {set i 0} {$i < [$cmd xInstCount]} {incr i} {
    23     24       lappend res [string map {{ } .} [$cmd xInst $i]]

Changes to ext/fts5/test/fts5alter.test.

    12     12   # The tests in this file focus on renaming FTS5 tables using the
    13     13   # "ALTER TABLE ... RENAME TO ..." command
    14     14   #
    15     15   
    16     16   source [file join [file dirname [info script]] fts5_common.tcl]
    17     17   set testprefix fts5alter
    18     18   
           19  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           20  +ifcapable !fts5 {
           21  +  finish_test
           22  +  return
           23  +}
    19     24   
    20     25   #-------------------------------------------------------------------------
    21     26   # Test renaming regular, contentless and columnsize=0 FTS5 tables.
    22     27   #
    23     28   do_execsql_test 1.1.0 {
    24     29     CREATE VIRTUAL TABLE "a x" USING fts5(a, x);
    25     30     INSERT INTO "a x" VALUES('a a a', 'x x x');

Changes to ext/fts5/test/fts5aux.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests focusing on the auxiliary function APIs.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5aux
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   proc inst {cmd i} { 
    19     25     $cmd xInst $i
    20     26   }
    21     27   sqlite3_fts5_create_function db inst inst
    22     28   
    23     29   proc colsize {cmd i} { 

Changes to ext/fts5/test/fts5auxdata.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests focusing on the fts5 xSetAuxdata() and xGetAuxdata() APIs.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5auxdata
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   do_execsql_test 1.0 {
    19     25     CREATE VIRTUAL TABLE f1 USING fts5(a, b);
    20     26     INSERT INTO f1(rowid, a, b) VALUES(1, 'a', 'b1');
    21     27     INSERT INTO f1(rowid, a, b) VALUES(2, 'a', 'b2');
    22     28     INSERT INTO f1(rowid, a, b) VALUES(3, 'a', 'b3');
    23     29     INSERT INTO f1(rowid, a, b) VALUES(4, 'a', 'b4');

Changes to ext/fts5/test/fts5bigpl.test.

    12     12   # This test is focused on really large position lists. Those that require
    13     13   # 4 or 5 byte position-list size varints. Because of the amount of memory
    14     14   # required, these tests only run on 64-bit platforms.
    15     15   #
    16     16   
    17     17   source [file join [file dirname [info script]] fts5_common.tcl]
    18     18   set testprefix fts5bigpl
           19  +
           20  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           21  +ifcapable !fts5 {
           22  +  finish_test
           23  +  return
           24  +}
    19     25   
    20     26   if { $tcl_platform(wordSize)<8 } {
    21     27     finish_test
    22     28     return
    23     29   }
    24     30   
    25     31   do_execsql_test 1.0 { CREATE VIRTUAL TABLE t1 USING fts5(x) }

Changes to ext/fts5/test/fts5columnsize.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests focusing on fts5 tables with the columnsize=0 option.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5columnsize
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   #-------------------------------------------------------------------------
    19     25   # Check that the option can be parsed and that the %_docsize table is
    20     26   # only created if it is set to true.
    21     27   #
    22     28   foreach {tn outcome stmt} {
    23     29     1 0 { CREATE VIRTUAL TABLE t1 USING fts5(x, columnsize=0) }

Changes to ext/fts5/test/fts5config.test.

    11     11   #
    12     12   # This file focuses on the code in fts5_config.c, which is largely concerned
    13     13   # with parsing the various configuration and CREATE TABLE options.
    14     14   #
    15     15   
    16     16   source [file join [file dirname [info script]] fts5_common.tcl]
    17     17   set testprefix fts5config
           18  +
           19  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           20  +ifcapable !fts5 {
           21  +  finish_test
           22  +  return
           23  +}
    18     24   
    19     25   #-------------------------------------------------------------------------
    20     26   # Try different types of quote characters.
    21     27   #
    22     28   do_execsql_test 1.0 {
    23     29     CREATE VIRTUAL TABLE t1 USING fts5('a', "b", [c], `d`);
    24     30     PRAGMA table_info = t1;

Changes to ext/fts5/test/fts5content.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This file contains tests for the content= and content_rowid= options.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5content
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   #-------------------------------------------------------------------------
    19     25   # Contentless tables
    20     26   #
    21     27   do_execsql_test 1.1 {
    22     28     CREATE VIRTUAL TABLE f1 USING fts5(a, b, content='');
    23     29     INSERT INTO f1(rowid, a, b) VALUES(1, 'one',   'o n e');

Changes to ext/fts5/test/fts5corrupt.test.

    11     11   #
    12     12   # This file tests that the FTS5 'integrity-check' command detects 
    13     13   # inconsistencies (corruption) in the on-disk backing tables.
    14     14   #
    15     15   
    16     16   source [file join [file dirname [info script]] fts5_common.tcl]
    17     17   set testprefix fts5corrupt
           18  +
           19  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           20  +ifcapable !fts5 {
           21  +  finish_test
           22  +  return
           23  +}
    18     24   
    19     25   do_execsql_test 1.0 {
    20     26     CREATE VIRTUAL TABLE t1 USING fts5(x);
    21     27     INSERT INTO t1(t1, rank) VALUES('pgsz', 32);
    22     28   }
    23     29   
    24     30   do_test 1.1 {

Changes to ext/fts5/test/fts5corrupt2.test.

    12     12   # This file tests that FTS5 handles corrupt databases (i.e. internal
    13     13   # inconsistencies in the backing tables) correctly. In this case 
    14     14   # "correctly" means without crashing.
    15     15   #
    16     16   
    17     17   source [file join [file dirname [info script]] fts5_common.tcl]
    18     18   set testprefix fts5corrupt2
           19  +
           20  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           21  +ifcapable !fts5 {
           22  +  finish_test
           23  +  return
           24  +}
    19     25   sqlite3_fts5_may_be_corrupt 1
    20     26   
    21     27   # Create a simple FTS5 table containing 100 documents. Each document 
    22     28   # contains 10 terms, each of which start with the character "x".
    23     29   #
    24     30   expr srand(0)
    25     31   db func rnddoc fts5_rnddoc

Changes to ext/fts5/test/fts5corrupt3.test.

    12     12   # This file tests that FTS5 handles corrupt databases (i.e. internal
    13     13   # inconsistencies in the backing tables) correctly. In this case 
    14     14   # "correctly" means without crashing.
    15     15   #
    16     16   
    17     17   source [file join [file dirname [info script]] fts5_common.tcl]
    18     18   set testprefix fts5corrupt3
           19  +
           20  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           21  +ifcapable !fts5 {
           22  +  finish_test
           23  +  return
           24  +}
    19     25   sqlite3_fts5_may_be_corrupt 1
    20     26   
    21     27   # Create a simple FTS5 table containing 100 documents. Each document 
    22     28   # contains 10 terms, each of which start with the character "x".
    23     29   #
    24     30   expr srand(0)
    25     31   db func rnddoc fts5_rnddoc

Changes to ext/fts5/test/fts5dlidx.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This test is focused on uses of doclist-index records.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5dlidx
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   if { $tcl_platform(wordSize)<8 } {
    19     25     finish_test
    20     26     return
    21     27   }
    22     28   
    23     29   proc do_fb_test {tn sql res} {

Changes to ext/fts5/test/fts5doclist.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This test is focused on edge cases in the doclist format.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5doclist
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   
    19     25   #-------------------------------------------------------------------------
    20     26   # Create a table with 1000 columns. Then add some large documents to it.
    21     27   # All text is in the right most column of the table.
    22     28   #
    23     29   do_test 1.0 {

Changes to ext/fts5/test/fts5full.test.

    12     12   # Test that SQLITE_FULL is returned if the FTS5 table cannot find a free 
    13     13   # segid to use. In practice this can only really happen when automerge and
    14     14   # crisismerge are both disabled.
    15     15   #
    16     16   
    17     17   source [file join [file dirname [info script]] fts5_common.tcl]
    18     18   set testprefix fts5full
           19  +
           20  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           21  +ifcapable !fts5 {
           22  +  finish_test
           23  +  return
           24  +}
    19     25   
    20     26   do_execsql_test 1.0 {
    21     27     CREATE VIRTUAL TABLE x8 USING fts5(i);
    22     28     INSERT INTO x8(x8, rank) VALUES('automerge', 0);
    23     29     INSERT INTO x8(x8, rank) VALUES('crisismerge', 100000);
    24     30   }
    25     31   

Changes to ext/fts5/test/fts5hash.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # The tests in this file are focused on the code in fts5_hash.c.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5hash
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   #-------------------------------------------------------------------------
    19     25   # Return a list of tokens (a vocabulary) that all share the same hash
    20     26   # key value. This can be used to test hash collisions.
    21     27   #
    22     28   proc build_vocab1 {args} {
    23     29   

Changes to ext/fts5/test/fts5integrity.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This file containst tests focused on the integrity-check procedure.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5integrity
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   do_execsql_test 1.0 {
    19     25     CREATE VIRTUAL TABLE xx USING fts5(x);
    20     26     INSERT INTO xx VALUES('term');
    21     27   }
    22     28   do_execsql_test 1.1 {
    23     29     INSERT INTO xx(xx) VALUES('integrity-check');

Changes to ext/fts5/test/fts5merge.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Test that focus on incremental merges of segments.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5merge
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   db func repeat [list string repeat]
    19     25   
    20     26   #-------------------------------------------------------------------------
    21     27   # Create an fts index so that:
    22     28   #
    23     29   #   * the index consists of two top-level segments

Changes to ext/fts5/test/fts5near.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests focused on the NEAR operator.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5near
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   proc do_near_test {tn doc near res} {
    19     25     uplevel [list do_execsql_test $tn "
    20     26       DELETE FROM t1;
    21     27       INSERT INTO t1 VALUES('$doc');
    22     28       SELECT count(*) FROM t1 WHERE t1 MATCH '$near';
    23     29     " $res]

Changes to ext/fts5/test/fts5optimize.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   #
    13     13   
    14     14   source [file join [file dirname [info script]] fts5_common.tcl]
    15     15   set testprefix fts5optimize
           16  +
           17  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           18  +ifcapable !fts5 {
           19  +  finish_test
           20  +  return
           21  +}
    16     22   
    17     23   proc rnddoc {nWord} {
    18     24     set vocab {a b c d e f g h i j k l m n o p q r s t u v w x y z}
    19     25     set nVocab [llength $vocab]
    20     26     set ret [list]
    21     27     for {set i 0} {$i < $nWord} {incr i} {
    22     28       lappend ret [lindex $vocab [expr {int(rand() * $nVocab)}]]

Changes to ext/fts5/test/fts5plan.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This file focuses on testing the planner (xBestIndex function).
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5plan
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   do_execsql_test 1.0 {
    19     25     CREATE TABLE t1(x, y);
    20     26     CREATE VIRTUAL TABLE f1 USING fts5(ff);
    21     27   }
    22     28   
    23     29   do_eqp_test 1.1 {

Changes to ext/fts5/test/fts5porter.test.

    12     12   # Tests focusing on the fts5 porter stemmer implementation.
    13     13   #
    14     14   #   http://tartarus.org/martin/PorterStemmer/
    15     15   #
    16     16   
    17     17   source [file join [file dirname [info script]] fts5_common.tcl]
    18     18   set testprefix fts5porter
           19  +
           20  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           21  +ifcapable !fts5 {
           22  +  finish_test
           23  +  return
           24  +}
    19     25   
    20     26   set test_vocab {
    21     27     a               a               aaron           aaron          
    22     28     abaissiez       abaissiez       abandon         abandon        
    23     29     abandoned       abandon         abase           abas           
    24     30     abash           abash           abate           abat           
    25     31     abated          abat            abatement       abat           

Changes to ext/fts5/test/fts5porter2.test.

    13     13   #
    14     14   # These are extra tests added to those in fts5porter.test in order to
    15     15   # improve test coverage of the porter stemmer implementation.
    16     16   #
    17     17   
    18     18   source [file join [file dirname [info script]] fts5_common.tcl]
    19     19   set testprefix fts5porter2
           20  +
           21  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           22  +ifcapable !fts5 {
           23  +  finish_test
           24  +  return
           25  +}
    20     26   
    21     27   set test_vocab {
    22     28     tion          tion
    23     29     ation         ation
    24     30     vation        vation
    25     31     avation       avat
    26     32     vion          vion

Changes to ext/fts5/test/fts5prefix.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This file containst tests focused on prefix indexes.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5prefix
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   do_execsql_test 1.0 {
    19     25     CREATE VIRTUAL TABLE xx USING fts5(x, prefix=1);
    20     26     INSERT INTO xx VALUES('one two three');
    21     27     INSERT INTO xx VALUES('four five six');
    22     28     INSERT INTO xx VALUES('seven eight nine ten');
    23     29   }

Changes to ext/fts5/test/fts5rank.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This file focuses on testing queries that use the "rank" column.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5rank
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   
    19     25   #-------------------------------------------------------------------------
    20     26   # "ORDER BY rank" + highlight() + large poslists.
    21     27   #
    22     28   do_execsql_test 1.0 {
    23     29     CREATE VIRTUAL TABLE xyz USING fts5(z);

Changes to ext/fts5/test/fts5rebuild.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   #
    13     13   
    14     14   source [file join [file dirname [info script]] fts5_common.tcl]
    15     15   set testprefix fts5rebuild
           16  +
           17  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           18  +ifcapable !fts5 {
           19  +  finish_test
           20  +  return
           21  +}
    16     22   
    17     23   do_execsql_test 1.1 {
    18     24     CREATE VIRTUAL TABLE f1 USING fts5(a, b);
    19     25     INSERT INTO f1(a, b) VALUES('one',   'o n e');
    20     26     INSERT INTO f1(a, b) VALUES('two',   't w o');
    21     27     INSERT INTO f1(a, b) VALUES('three', 't h r e e');
    22     28   }

Changes to ext/fts5/test/fts5restart.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # This file focuses on testing the planner (xBestIndex function).
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5restart
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   do_execsql_test 1.0 {
    19     25     CREATE VIRTUAL TABLE f1 USING fts5(ff);
    20     26   }
    21     27   
    22     28   #-------------------------------------------------------------------------
    23     29   # Run the 'optimize' command. Check that it does not disturb ongoing

Changes to ext/fts5/test/fts5rowid.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests of the scalar fts5_rowid() and fts5_decode() functions.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5rowid
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   do_catchsql_test 1.1 {
    19     25     SELECT fts5_rowid()
    20     26   } {1 {should be: fts5_rowid(subject, ....)}}
    21     27   
    22     28   do_catchsql_test 1.2 {
    23     29     SELECT fts5_rowid('segment')

Changes to ext/fts5/test/fts5tokenizer.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests focusing on the built-in fts5 tokenizers. 
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5tokenizer
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   
    19     25   do_execsql_test 1.0 {
    20     26     CREATE VIRTUAL TABLE ft1 USING fts5(x, tokenize=porter);
    21     27     DROP TABLE ft1;
    22     28   }
    23     29   do_execsql_test 1.1 {

Changes to ext/fts5/test/fts5unicode.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests focusing on the fts5 tokenizers
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5unicode
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   proc tokenize_test {tn tokenizer input output} {
    19     25     uplevel [list do_test $tn [subst -nocommands {
    20     26       set ret {}
    21     27       foreach {z s e} [sqlite3_fts5_tokenize db {$tokenizer} {$input}] {
    22     28         lappend ret [set z]
    23     29       }

Changes to ext/fts5/test/fts5unicode2.test.

    12     12   # The tests in this file focus on testing the "unicode" FTS tokenizer.
    13     13   #
    14     14   # This is a modified copy of FTS4 test file "fts4_unicode.test".
    15     15   #
    16     16   
    17     17   source [file join [file dirname [info script]] fts5_common.tcl]
    18     18   set testprefix fts5unicode2
           19  +
           20  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           21  +ifcapable !fts5 {
           22  +  finish_test
           23  +  return
           24  +}
    19     25   
    20     26   proc do_unicode_token_test {tn input res} {
    21     27     uplevel [list do_test $tn [list \
    22     28       sqlite3_fts5_tokenize -subst db "unicode61 remove_diacritics 0" $input
    23     29     ] [list {*}$res]]
    24     30   }
    25     31   

Changes to ext/fts5/test/fts5unicode3.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # Tests focusing on the fts5 tokenizers
    13     13   #
           14  +
           15  +source [file join [file dirname [info script]] fts5_common.tcl]
           16  +
           17  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           18  +ifcapable !fts5 {
           19  +  finish_test
           20  +  return
           21  +}
    14     22   
    15     23   proc fts3_unicode_path {file} {
    16     24     file join [file dirname [info script]] .. .. fts3 unicode $file
    17     25   }
    18     26   
    19         -source [file join [file dirname [info script]] fts5_common.tcl]
    20     27   source [fts3_unicode_path parseunicode.tcl]
    21     28   set testprefix fts5unicode3
    22     29   
    23     30   set CF [fts3_unicode_path CaseFolding.txt]
    24     31   set UD [fts3_unicode_path UnicodeData.txt]
    25     32   
    26     33   tl_load_casefolding_txt $CF

Changes to ext/fts5/test/fts5unindexed.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # The tests in this file focus on "unindexed" columns.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5unindexed
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   
    19     25   do_execsql_test 1.1 {
    20     26     CREATE VIRTUAL TABLE t1 USING fts5(a, b UNINDEXED);
    21     27     INSERT INTO t1 VALUES('a b c', 'd e f');
    22     28     INSERT INTO t1 VALUES('g h i', 'j k l');
    23     29   } {}

Changes to ext/fts5/test/fts5version.test.

    11     11   #
    12     12   # The tests in this file focus on testing that unrecognized file-format
    13     13   # versions are detected and reported.
    14     14   #
    15     15   
    16     16   source [file join [file dirname [info script]] fts5_common.tcl]
    17     17   set testprefix fts5version
           18  +
           19  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           20  +ifcapable !fts5 {
           21  +  finish_test
           22  +  return
           23  +}
    18     24   
    19     25   
    20     26   do_execsql_test 1.1 {
    21     27     CREATE VIRTUAL TABLE t1 USING fts5(one);
    22     28     INSERT INTO t1 VALUES('a b c d');
    23     29   } {}
    24     30   

Changes to ext/fts5/test/fts5vocab.test.

    10     10   #***********************************************************************
    11     11   #
    12     12   # The tests in this file focus on testing the fts5vocab module.
    13     13   #
    14     14   
    15     15   source [file join [file dirname [info script]] fts5_common.tcl]
    16     16   set testprefix fts5vocab
           17  +
           18  +# If SQLITE_ENABLE_FTS5 is defined, omit this file.
           19  +ifcapable !fts5 {
           20  +  finish_test
           21  +  return
           22  +}
    17     23   
    18     24   
    19     25   do_execsql_test 1.1.1 {
    20     26     CREATE VIRTUAL TABLE t1 USING fts5(one, prefix=1);
    21     27     CREATE VIRTUAL TABLE v1 USING fts5vocab(t1, 'row');
    22     28     PRAGMA table_info = v1;
    23     29   } {