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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/fts3ah.test ('k') | third_party/sqlite/src/test/fts3an.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2007 March 28 1 # 2007 March 28
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 isspace/isalnum/tolower problems with the 7 # of this script is testing isspace/isalnum/tolower problems with the
8 # FTS3 module. Unfortunately, this code isn't a really principled set 8 # FTS3 module. Unfortunately, this code isn't a really principled set
9 # of tests, because it is impossible to know where new uses of these 9 # of tests, because it is impossible to know where new uses of these
10 # functions might appear. 10 # functions might appear.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 # chars before and after the matched term, and scanning ~10 chars 46 # chars before and after the matched term, and scanning ~10 chars
47 # around that position for isspace() characters. The long word with 47 # around that position for isspace() characters. The long word with
48 # embedded hi-bit chars causes one of these isspace() calls to be 48 # embedded hi-bit chars causes one of these isspace() calls to be
49 # exercised. The version with a couple extra spaces should cause the 49 # exercised. The version with a couple extra spaces should cause the
50 # other isspace() call to be exercised. [Both cases have been tested 50 # other isspace() call to be exercised. [Both cases have been tested
51 # in the debugger, but I'm hoping to continue to catch it if simple 51 # in the debugger, but I'm hoping to continue to catch it if simple
52 # constant changes change things slightly. 52 # constant changes change things slightly.
53 # 53 #
54 # The trailing and leading hi-bit chars help with code which tests for 54 # The trailing and leading hi-bit chars help with code which tests for
55 # isspace() to coalesce multiple spaces. 55 # isspace() to coalesce multiple spaces.
56 #
57 # UPDATE: The above is no longer true; there is no such code in fts3.
58 # But leave the test in just the same.
59 #
56 60
57 set word "\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80" 61 set word "\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80"
58 set phrase1 "$word $word $word target $word $word $word" 62 set phrase1 "$word $word $word target $word $word $word"
59 set phrase2 "$word $word $word target $word $word $word" 63 set phrase2 "$word $word $word target $word $word $word"
60 64
61 db eval {CREATE VIRTUAL TABLE t4 USING fts3(content)} 65 db eval {CREATE VIRTUAL TABLE t4 USING fts3(content)}
62 db eval "INSERT INTO t4 (content) VALUES ('$phrase1')" 66 db eval "INSERT INTO t4 (content) VALUES ('$phrase1')"
63 db eval "INSERT INTO t4 (content) VALUES ('$phrase2')" 67 db eval "INSERT INTO t4 (content) VALUES ('$phrase2')"
64 68
65 do_test fts3al-1.4 { 69 do_test fts3al-1.4 {
66 execsql {SELECT rowid, length(snippet(t4)) FROM t4 WHERE t4 MATCH 'target'} 70 execsql {SELECT rowid, length(snippet(t4)) FROM t4 WHERE t4 MATCH 'target'}
67 } {1 111 2 117} 71 } {1 241 2 247}
68 72
69 finish_test 73 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/fts3ah.test ('k') | third_party/sqlite/src/test/fts3an.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698