SQLite
Check-in [0d0e5ab8f1]
Not logged in
Overview
SHA1 Hash:0d0e5ab8f16c890629ec1120c78168ef6be9e419
Date: 2013-01-09 15:44:23
User: dan
Comment:Check in an extra test for the fts4 "content=" option. No code changes.
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to test/fts4content.test

42 # 7.* - Test that if content=xxx is specified and table xxx does not 42 # 7.* - Test that if content=xxx is specified and table xxx does not 43 # exist, the FTS table can still be used for INSERT and some 43 # exist, the FTS table can still be used for INSERT and some 44 # SELECT statements. 44 # SELECT statements. 45 # 45 # 46 # 8.* - Test that if the content=xxx and prefix options are used together, 46 # 8.* - Test that if the content=xxx and prefix options are used together, 47 # the 'rebuild' command still works. 47 # the 'rebuild' command still works. 48 # 48 # > 49 # 9.* - Test using content=xxx where xxx is a virtual table. > 50 # 49 51 50 do_execsql_test 1.1.1 { 52 do_execsql_test 1.1.1 { 51 CREATE TABLE t1(a, b, c); 53 CREATE TABLE t1(a, b, c); 52 INSERT INTO t1 VALUES('w x', 'x y', 'y z'); 54 INSERT INTO t1 VALUES('w x', 'x y', 'y z'); 53 CREATE VIRTUAL TABLE ft1 USING fts4(content=t1); 55 CREATE VIRTUAL TABLE ft1 USING fts4(content=t1); 54 } 56 } 55 57 ................................................................................................................................................................................ 517 } 519 } 518 520 519 do_execsql_test 8.2 { SELECT * FROM ft10 WHERE a MATCH 'ab*'; } 521 do_execsql_test 8.2 { SELECT * FROM ft10 WHERE a MATCH 'ab*'; } 520 do_execsql_test 8.3 { INSERT INTO ft10(ft10) VALUES('rebuild'); } 522 do_execsql_test 8.3 { INSERT INTO ft10(ft10) VALUES('rebuild'); } 521 do_execsql_test 8.4 { SELECT rowid FROM ft10 WHERE a MATCH 'ab*'; } {1 2 3} 523 do_execsql_test 8.4 { SELECT rowid FROM ft10 WHERE a MATCH 'ab*'; } {1 2 3} 522 do_execsql_test 8.5 { SELECT rowid FROM ft10 WHERE b MATCH 'abav*'; } {3} 524 do_execsql_test 8.5 { SELECT rowid FROM ft10 WHERE b MATCH 'abav*'; } {3} 523 do_execsql_test 8.6 { SELECT rowid FROM ft10 WHERE ft10 MATCH 'abas*'; } {1} 525 do_execsql_test 8.6 { SELECT rowid FROM ft10 WHERE ft10 MATCH 'abas*'; } {1} 524 526 > 527 #------------------------------------------------------------------------- > 528 # Test cases 9.* > 529 # > 530 reset_db > 531 register_echo_module [sqlite3_connection_pointer db] > 532 > 533 do_execsql_test 9.1 { > 534 CREATE TABLE tbl1(a, b); > 535 INSERT INTO tbl1 VALUES('a b', 'c d'); > 536 INSERT INTO tbl1 VALUES('e f', 'a b'); > 537 CREATE VIRTUAL TABLE e1 USING echo(tbl1); > 538 CREATE VIRTUAL TABLE ft1 USING fts4(content=e1); > 539 INSERT INTO ft1(ft1) VALUES('rebuild'); > 540 } > 541 > 542 do_execsql_test 9.2 { > 543 SELECT rowid, * FROM ft1 WHERE ft1 MATCH 'e' > 544 } {2 {e f} {a b}} > 545 > 546 do_execsql_test 9.3 { > 547 SELECT rowid, * FROM ft1 WHERE ft1 MATCH 'a' > 548 } {1 {a b} {c d} 2 {e f} {a b}} > 549 > 550 do_execsql_test 9.4 { > 551 DELETE FROM ft1 WHERE docid=1; > 552 } > 553 > 554 do_execsql_test 9.5 { > 555 SELECT rowid, * FROM ft1 WHERE ft1 MATCH 'a' > 556 } {2 {e f} {a b}} > 557 > 558 do_execsql_test 9.6 { > 559 INSERT INTO ft1(ft1) VALUES('rebuild'); > 560 SELECT rowid, * FROM ft1 WHERE ft1 MATCH 'a' > 561 } {1 {a b} {c d} 2 {e f} {a b}} > 562 > 563 > 564 525 finish_test 565 finish_test