OLD | NEW |
1 # 2006 October 19 | 1 # 2006 October 19 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. | 3 # The author disclaims copyright to this source code. |
4 # | 4 # |
5 #************************************************************************* | 5 #************************************************************************* |
6 # This file implements regression tests for SQLite library. The focus | 6 # This file implements regression tests for SQLite library. The focus |
7 # of this script is testing handling of edge cases for various doclist | 7 # of this script is testing handling of edge cases for various doclist |
8 # merging functions in the FTS3 module query logic. | 8 # merging functions in the FTS3 module query logic. |
9 # | 9 # |
10 # $Id: fts3ag.test,v 1.2 2007/11/16 00:23:08 shess Exp $ | 10 # $Id: fts3ag.test,v 1.2 2007/11/16 00:23:08 shess Exp $ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } {} | 66 } {} |
67 | 67 |
68 # Empty right in docListAndMerge(). | 68 # Empty right in docListAndMerge(). |
69 do_test fts3ag-1.9 { | 69 do_test fts3ag-1.9 { |
70 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'this something'} | 70 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'this something'} |
71 } {} | 71 } {} |
72 | 72 |
73 # No support for all-except queries. | 73 # No support for all-except queries. |
74 do_test fts3ag-1.10 { | 74 do_test fts3ag-1.10 { |
75 catchsql {SELECT rowid FROM t1 WHERE t1 MATCH '-this -something'} | 75 catchsql {SELECT rowid FROM t1 WHERE t1 MATCH '-this -something'} |
76 } {1 {SQL logic error or missing database}} | 76 } {1 {malformed MATCH expression: [-this -something]}} |
77 | 77 |
78 # Test that docListOrMerge() correctly handles reaching the end of one | 78 # Test that docListOrMerge() correctly handles reaching the end of one |
79 # doclist before it reaches the end of the other. | 79 # doclist before it reaches the end of the other. |
80 do_test fts3ag-1.11 { | 80 do_test fts3ag-1.11 { |
| 81 breakpoint |
81 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'this OR also'} | 82 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'this OR also'} |
82 } {1 2} | 83 } {1 2} |
83 do_test fts3ag-1.12 { | 84 do_test fts3ag-1.12 { |
84 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'also OR this'} | 85 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'also OR this'} |
85 } {1 2} | 86 } {1 2} |
86 | 87 |
87 # Empty left and right in docListOrMerge(). Each term matches neither | 88 # Empty left and right in docListOrMerge(). Each term matches neither |
88 # row, and when combined there was an assertion failure. | 89 # row, and when combined there was an assertion failure. |
89 do_test fts3ag-1.13 { | 90 do_test fts3ag-1.13 { |
90 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'something OR nothing'} | 91 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'something OR nothing'} |
91 } {} | 92 } {} |
92 | 93 |
93 finish_test | 94 finish_test |
OLD | NEW |