Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Side by Side Diff: third_party/sqlite/src/test/fts3ab.test

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 2006 September 13 1 # 2006 September 13
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #************************************************************************* 10 #*************************************************************************
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 # invert: words for the bits of ~rowid 108 # invert: words for the bits of ~rowid
109 # 109 #
110 db eval { 110 db eval {
111 CREATE VIRTUAL TABLE t4 USING fts3([norm],'plusone',"invert"); 111 CREATE VIRTUAL TABLE t4 USING fts3([norm],'plusone',"invert");
112 } 112 }
113 for {set i 1} {$i<=15} {incr i} { 113 for {set i 1} {$i<=15} {incr i} {
114 set vset [list [wordset $i] [wordset [expr {$i+1}]] [wordset [expr {~$i}]]] 114 set vset [list [wordset $i] [wordset [expr {$i+1}]] [wordset [expr {~$i}]]]
115 db eval "INSERT INTO t4(norm,plusone,invert) VALUES([join $vset ,]);" 115 db eval "INSERT INTO t4(norm,plusone,invert) VALUES([join $vset ,]);"
116 } 116 }
117 117
118 breakpoint
119 do_test fts3ab-4.1 { 118 do_test fts3ab-4.1 {
120 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'norm:one'} 119 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'norm:one'}
121 } {1 3 5 7 9 11 13 15} 120 } {1 3 5 7 9 11 13 15}
122 do_test fts3ab-4.2 { 121 do_test fts3ab-4.2 {
123 execsql {SELECT rowid FROM t4 WHERE norm MATCH 'one'} 122 execsql {SELECT rowid FROM t4 WHERE norm MATCH 'one'}
124 } {1 3 5 7 9 11 13 15} 123 } {1 3 5 7 9 11 13 15}
125 do_test fts3ab-4.3 { 124 do_test fts3ab-4.3 {
126 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'one'} 125 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'one'}
127 } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15} 126 } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15}
128 do_test fts3ab-4.4 { 127 do_test fts3ab-4.4 {
(...skipping 10 matching lines...) Expand all
139 } {1 3 5 7 9 11 13 15} 138 } {1 3 5 7 9 11 13 15}
140 do_test fts3ab-4.8 { 139 do_test fts3ab-4.8 {
141 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'plusone:two norm:one'} 140 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'plusone:two norm:one'}
142 } {1 5 9 13} 141 } {1 5 9 13}
143 do_test fts3ab-4.9 { 142 do_test fts3ab-4.9 {
144 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'two norm:one'} 143 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'two norm:one'}
145 } {1 3 5 7 9 11 13 15} 144 } {1 3 5 7 9 11 13 15}
146 145
147 146
148 finish_test 147 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698