summaryrefslogtreecommitdiff
path: root/test/fts3matchinfo.test
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2013-08-13 15:42:54 -0400
committerHans-Christoph Steiner <hans@eds.org>2013-08-13 15:42:54 -0400
commit08119c361d1181b3e8f1abb429236e488a664753 (patch)
tree77e5a8b6d411ca32c360c7e48df5c293b1e0baac /test/fts3matchinfo.test
parent1b5ba8e022836fa8ab93bc90df1b34a29ea6e134 (diff)
Imported Upstream version 2.2.1
Diffstat (limited to 'test/fts3matchinfo.test')
-rw-r--r--test/fts3matchinfo.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/fts3matchinfo.test b/test/fts3matchinfo.test
index 924db9c..3998c9a 100644
--- a/test/fts3matchinfo.test
+++ b/test/fts3matchinfo.test
@@ -407,5 +407,24 @@ do_catchsql_test 8.5.3.2 {
SELECT mit(matchinfo(t11, 'nxa')) FROM t11 WHERE t11 MATCH 'a*'
} {1 {database disk image is malformed}}
+#-------------------------------------------------------------------------
+do_execsql_test 8.1 {
+ CREATE VIRTUAL TABLE t12 USING fts4;
+ INSERT INTO t12 VALUES('a b c d');
+ SELECT mit(matchinfo(t12, 'x')) FROM t12 WHERE t12 MATCH 'a NEAR/1 d OR a';
+} {{0 0 0 0 0 0 1 1 1}}
+do_execsql_test 8.2 {
+ INSERT INTO t12 VALUES('a d c d');
+ SELECT mit(matchinfo(t12, 'x')) FROM t12 WHERE t12 MATCH 'a NEAR/1 d OR a';
+} {
+ {0 1 1 0 1 1 1 2 2} {1 1 1 1 1 1 1 2 2}
+}
+do_execsql_test 8.3 {
+ INSERT INTO t12 VALUES('a d d a');
+ SELECT mit(matchinfo(t12, 'x')) FROM t12 WHERE t12 MATCH 'a NEAR/1 d OR a';
+} {
+ {0 3 2 0 3 2 1 4 3} {1 3 2 1 3 2 1 4 3} {2 3 2 2 3 2 2 4 3}
+}
+
finish_test