summaryrefslogtreecommitdiff
path: root/test/fts3matchinfo.test
diff options
context:
space:
mode:
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