/ Check-in [65e5f770]
Login

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

Overview
Comment:Update some test cases in fts4aa.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 65e5f7706d3b6784f9cce315478d7623d6d7e7d9
User & Date: dan 2011-06-20 12:24:26
Context
2011-06-20
15:24
Enable crnl to nl translation for the mksqlite3c.tcl script. check-in: 161379d2 user: drh tags: trunk
12:24
Update some test cases in fts4aa.test. check-in: 65e5f770 user: dan tags: trunk
11:15
Fix a problem where FTS test code was not being included in the testfixture build when SQLITE_ENABLE_FTS4 was defined. check-in: e539d08a user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/fts4aa.test.

    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # If SQLITE_ENABLE_FTS3 is defined, omit this file.
    20     20   ifcapable !fts3 {
    21     21     finish_test
    22     22     return
    23     23   }
    24         -if {[db eval {SELECT sqlite_compileoption_used('ENABLE_FTS4')}]==0} {
    25         -  finish_test
    26         -  return
    27         -}
    28     24   
    29     25   do_test fts4aa-1.0 {
    30     26   db eval {
    31     27   CREATE VIRTUAL TABLE t1 USING fts4(words, tokenize porter);
    32     28   BEGIN TRANSACTION;
    33     29   INSERT INTO t1(docid,words) VALUES(1001001,'In the beginning God created the heaven and the earth.');
    34     30   INSERT INTO t1(docid,words) VALUES(1001002,'And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.');
................................................................................
  1585   1581     binary scan $blob $scan($::tcl_platform(byteOrder)) r
  1586   1582     return $r
  1587   1583   }
  1588   1584   db func mit mit
  1589   1585   
  1590   1586   do_test fts4aa-2.1 {
  1591   1587     db eval {
  1592         -    SELECT docid, mit(matchinfo(t1)) FROM t1 WHERE t1 MATCH 'melchizedek';
         1588  +    SELECT docid, mit(matchinfo(t1, 'pcxnal')) FROM t1 WHERE t1 MATCH 'melchizedek';
  1593   1589     }
  1594   1590   } {1014018 {1 1 1 1 1 1533 25 20}}
  1595   1591   do_test fts4aa-2.2 {
  1596   1592     db eval {
  1597         -    SELECT docid, mit(matchinfo(t1)) FROM t1
         1593  +    SELECT docid, mit(matchinfo(t1, 'pcxnal')) FROM t1
  1598   1594        WHERE t1 MATCH 'spake hebrew'
  1599   1595        ORDER BY docid;
  1600   1596     }
  1601   1597   } {1039014 {2 1 1 40 40 1 6 6 1533 25 42} 1039017 {2 1 1 40 40 1 6 6 1533 25 26}}
  1602   1598   do_test fts4aa-2.3 {
  1603   1599     db eval {
  1604         -    SELECT docid, mit(matchinfo(t1)) FROM t1
         1600  +    SELECT docid, mit(matchinfo(t1, 'pcxnal')) FROM t1
  1605   1601        WHERE t1 MATCH 'laban overtook jacob'
  1606   1602        ORDER BY docid;
  1607   1603     }
  1608   1604   } {1031025 {3 1 2 54 46 1 3 3 2 181 160 1533 25 24}}
  1609   1605   
  1610   1606   do_test fts4aa-9.1 {
  1611   1607     db eval {
  1612   1608       DELETE FROM t1 WHERE docid!=1050026;
  1613   1609       SELECT hex(size) FROM t1_docsize;
  1614   1610       SELECT hex(value) FROM t1_stat;
  1615   1611     }
  1616         -} {17 0117}
         1612  +} {17 01176F}
  1617   1613   
  1618   1614   do_test fts4aa-9.2 {
  1619   1615     db eval {
  1620   1616       SELECT docid FROM t1 EXCEPT SELECT docid FROM t1_docsize
  1621   1617     }
  1622   1618   } {}
  1623   1619   do_test fts4aa-9.3 {
  1624   1620     db eval {
  1625   1621       SELECT docid FROM t1_docsize EXCEPT SELECT docid FROM t1
  1626   1622     }
  1627   1623   } {}
  1628   1624   do_test fts4aa-9.4 {
         1625  +  # Note: Token 'in' is being deferred in the following query. 
  1629   1626     db eval {
  1630         -    SELECT docid, mit(matchinfo(t1)) FROM t1
         1627  +    SELECT docid, mit(matchinfo(t1, 'pcxnal')) FROM t1
  1631   1628        WHERE t1 MATCH 'joseph died in egypt'
  1632   1629        ORDER BY docid;
  1633   1630     }
  1634         -} {1050026 {4 1 1 1 1 1 1 1 2 2 1 1 1 1 1 23 23}}
         1631  +} {1050026 {4 1 1 1 1 1 1 1 2 1 1 1 1 1 1 23 23}}
  1635   1632   
  1636   1633   finish_test