SQLite

Check-in [13146b3493]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a couple of extra tests for the fts3 expression parser to improve mcdc coverage. (CVS 6093)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 13146b34935d339d7b8379083e024647af07e2c1
User & Date: danielk1977 2009-01-01 07:42:49.000
Context
2009-01-01
12:34
Additional test cases and cleanup of FTS3 parenthesis processing. (CVS 6094) (check-in: afac429300 user: drh tags: trunk)
07:42
Add a couple of extra tests for the fts3 expression parser to improve mcdc coverage. (CVS 6093) (check-in: 13146b3493 user: danielk1977 tags: trunk)
07:08
Add pseudo-random tests of the fts3 expression parser. Revise the fix in (6091). (CVS 6092) (check-in: 11c2d46861 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/fts3expr.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 2006 September 9
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the FTS3 module.
#
# $Id: fts3expr.test,v 1.3 2009/01/01 07:08:55 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 2006 September 9
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#*************************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is testing the FTS3 module.
#
# $Id: fts3expr.test,v 1.4 2009/01/01 07:42:49 danielk1977 Exp $
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {
139
140
141
142
143
144
145






















146
147
148
149
150
151
152
} {AND {NEAR/10 two three} {AND four five}}
do_test fts3expr-3.11 {
  test_fts3expr2 "(two NEAR three) (four NEAR five)"
} {AND {NEAR/10 two three} {NEAR/10 four five}}
do_test fts3expr-3.12 {
  test_fts3expr2 "(two NEAR three) OR (four NEAR five)"
} {OR {NEAR/10 two three} {NEAR/10 four five}}
























#------------------------------------------------------------------------
# The following tests, fts3expr-4.*, test the parsers response to syntax
# errors in query expressions. This is done using a real fts3 table and
# MATCH clauses, not the parser test interface.
# 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
} {AND {NEAR/10 two three} {AND four five}}
do_test fts3expr-3.11 {
  test_fts3expr2 "(two NEAR three) (four NEAR five)"
} {AND {NEAR/10 two three} {NEAR/10 four five}}
do_test fts3expr-3.12 {
  test_fts3expr2 "(two NEAR three) OR (four NEAR five)"
} {OR {NEAR/10 two three} {NEAR/10 four five}}

do_test fts3expr-3.13 {
  test_fts3expr2 "(two NEAR/1a three)"
} {AND {AND {AND two near} 1a} three}

do_test fts3expr-3.14 {
  test_fts3expr2 "(two NEAR// three)"
} {AND {AND two near} three}
do_test fts3expr-3.15 {
  test_fts3expr2 "(two NEAR/: three)"
} {AND {AND two near} three}

do_test fts3expr-3.16 {
  test_fts3expr2 "(two NEAR three)OR(four NEAR five)"
} {OR {NEAR/10 two three} {NEAR/10 four five}}
do_test fts3expr-3.17 {
  test_fts3expr2 "(two NEAR three)OR\"four five\""
} {OR {NEAR/10 two three} {four five}}
do_test fts3expr-3.18 {
  test_fts3expr2 "one \u0080wo"
} "AND one \u0080wo"



#------------------------------------------------------------------------
# The following tests, fts3expr-4.*, test the parsers response to syntax
# errors in query expressions. This is done using a real fts3 table and
# MATCH clauses, not the parser test interface.
#