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

Side by Side Diff: third_party/sqlite/src/test/fts3near.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 1
2 # 2007 October 15 2 # 2007 October 15
3 # 3 #
4 # The author disclaims copyright to this source code. In place of 4 # The author disclaims copyright to this source code. In place of
5 # a legal notice, here is a blessing: 5 # a legal notice, here is a blessing:
6 # 6 #
7 # May you do good and not evil. 7 # May you do good and not evil.
8 # May you find forgiveness for yourself and forgive others. 8 # May you find forgiveness for yourself and forgive others.
9 # May you share freely, never taking more than you give. 9 # May you share freely, never taking more than you give.
10 # 10 #
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/2 two'} 158 execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/2 two'}
159 } {{0 1 4 3 0 0 8 5 0 1 14 3 0 0 27 5}} 159 } {{0 1 4 3 0 0 8 5 0 1 14 3 0 0 27 5}}
160 do_test fts3near-3.5 { 160 do_test fts3near-3.5 {
161 execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'two NEAR/2 three'} 161 execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'two NEAR/2 three'}
162 } {{0 0 4 3 0 1 8 5 0 0 14 3 0 1 27 5}} 162 } {{0 0 4 3 0 1 8 5 0 0 14 3 0 1 27 5}}
163 do_test fts3near-3.6 { 163 do_test fts3near-3.6 {
164 execsql { 164 execsql {
165 SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/0 "two four"' 165 SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/0 "two four"'
166 } 166 }
167 } {{0 0 8 5 0 1 14 3 0 2 18 4}} 167 } {{0 0 8 5 0 1 14 3 0 2 18 4}}
168 breakpoint
169 do_test fts3near-3.7 { 168 do_test fts3near-3.7 {
170 execsql { 169 execsql {
171 SELECT offsets(t1) FROM t1 WHERE content MATCH '"two four" NEAR/0 three'} 170 SELECT offsets(t1) FROM t1 WHERE content MATCH '"two four" NEAR/0 three'}
172 } {{0 2 8 5 0 0 14 3 0 1 18 4}} 171 } {{0 2 8 5 0 0 14 3 0 1 18 4}}
173 172
174 db eval { 173 db eval {
175 INSERT INTO t1(content) VALUES(' 174 INSERT INTO t1(content) VALUES('
176 This specification defines Cascading Style Sheets, level 2 (CSS2). CSS2 is a style sheet language that allows authors and users to attach style (e.g., fonts , spacing, and aural cues) to structured documents (e.g., HTML documents and XML applications). By separating the presentation style of documents from the conte nt of documents, CSS2 simplifies Web authoring and site maintenance. 175 This specification defines Cascading Style Sheets, level 2 (CSS2). CSS2 is a style sheet language that allows authors and users to attach style (e.g., fonts , spacing, and aural cues) to structured documents (e.g., HTML documents and XML applications). By separating the presentation style of documents from the conte nt of documents, CSS2 simplifies Web authoring and site maintenance.
177 176
178 CSS2 builds on CSS1 (see [CSS1]) and, with very few exceptions, all valid CS S1 style sheets are valid CSS2 style sheets. CSS2 supports media-specific style sheets so that authors may tailor the presentation of their documents to visual browsers, aural devices, printers, braille devices, handheld devices, etc. This specification also supports content positioning, downloadable fonts, table layou t, features for internationalization, automatic counters and numbering, and some properties related to user interface. 177 CSS2 builds on CSS1 (see [CSS1]) and, with very few exceptions, all valid CS S1 style sheets are valid CSS2 style sheets. CSS2 supports media-specific style sheets so that authors may tailor the presentation of their documents to visual browsers, aural devices, printers, braille devices, handheld devices, etc. This specification also supports content positioning, downloadable fonts, table layou t, features for internationalization, automatic counters and numbering, and some properties related to user interface.
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 execsql { 572 execsql {
574 SELECT docid FROM t1 WHERE content MATCH 'abbrev NEAR/1000 zygosis' 573 SELECT docid FROM t1 WHERE content MATCH 'abbrev NEAR/1000 zygosis'
575 } 574 }
576 } {} 575 } {}
577 do_test fts3near-6.5 { 576 do_test fts3near-6.5 {
578 execsql { 577 execsql {
579 SELECT docid FROM t1 WHERE content MATCH 'abbrev NEAR/10000 zygosis' 578 SELECT docid FROM t1 WHERE content MATCH 'abbrev NEAR/10000 zygosis'
580 } 579 }
581 } {3} 580 } {3}
582 581
582 # Ticket 38b1ae018f.
583 #
584 do_execsql_test fts3near-7.1 {
585 CREATE VIRTUAL TABLE x USING fts4(y,z);
586 INSERT INTO x VALUES('aaa bbb ccc ddd', 'bbb ddd aaa ccc');
587 SELECT * FROM x where y MATCH 'bbb NEAR/6 aaa';
588 } {{aaa bbb ccc ddd} {bbb ddd aaa ccc}}
589
590 do_execsql_test fts3near-7.2 {
591 CREATE VIRTUAL TABLE t2 USING fts4(a, b);
592 INSERT INTO t2 VALUES('A B C', 'A D E');
593 SELECT * FROM t2 where t2 MATCH 'a:A NEAR E'
594 } {}
595
583 596
584 finish_test 597 finish_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698