summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2023-03-23 18:14:24 +0000
committerSam Thursfield <sam@afuera.me.uk>2023-03-23 18:14:24 +0000
commitba6a9608f3b82d7708eae5b6477719668830e7e6 (patch)
treee90447c58310bfe6f6e135c4026e7f5c56503a7f /tests
parent6409812d31697ba430ebb843133304b46991d637 (diff)
parent827ba585eec44cf3710a82406783f47bcb64f9c3 (diff)
downloadtracker-ba6a9608f3b82d7708eae5b6477719668830e7e6.tar.gz
Merge branch 'wip/carlosg/orderless-fts-terms' into 'master'
core: handle FTS search terms individually See merge request https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/585
Diffstat (limited to 'tests')
-rw-r--r--tests/fts/fts3aa-4.out8
-rw-r--r--tests/fts/fts3aa-4.rq1
-rw-r--r--tests/fts/fts3aa-5.out4
-rw-r--r--tests/fts/fts3aa-5.rq1
-rw-r--r--tests/fts/fts3aa-6.out2
-rw-r--r--tests/fts/fts3aa-6.rq1
-rw-r--r--tests/fts/fts3aa-7.out8
-rw-r--r--tests/fts/fts3aa-7.rq2
-rw-r--r--tests/fts/fts3aa-8.out4
-rw-r--r--tests/fts/fts3aa-8.rq2
-rw-r--r--tests/fts/fts3aa-9.out1
-rw-r--r--tests/fts/fts3aa-9.rq1
-rw-r--r--tests/fts/tracker-fts-test.c2
13 files changed, 36 insertions, 1 deletions
diff --git a/tests/fts/fts3aa-4.out b/tests/fts/fts3aa-4.out
new file mode 100644
index 000000000..4bdf28b05
--- /dev/null
+++ b/tests/fts/fts3aa-4.out
@@ -0,0 +1,8 @@
+"http://www.example.org/test#20"
+"http://www.example.org/test#21"
+"http://www.example.org/test#22"
+"http://www.example.org/test#23"
+"http://www.example.org/test#28"
+"http://www.example.org/test#29"
+"http://www.example.org/test#30"
+"http://www.example.org/test#31"
diff --git a/tests/fts/fts3aa-4.rq b/tests/fts/fts3aa-4.rq
new file mode 100644
index 000000000..76f97168c
--- /dev/null
+++ b/tests/fts/fts3aa-4.rq
@@ -0,0 +1 @@
+SELECT ?o WHERE { ?o fts:match "three five" } order by asc ?o
diff --git a/tests/fts/fts3aa-5.out b/tests/fts/fts3aa-5.out
new file mode 100644
index 000000000..a2f64826a
--- /dev/null
+++ b/tests/fts/fts3aa-5.out
@@ -0,0 +1,4 @@
+"http://www.example.org/test#20"
+"http://www.example.org/test#21"
+"http://www.example.org/test#22"
+"http://www.example.org/test#23"
diff --git a/tests/fts/fts3aa-5.rq b/tests/fts/fts3aa-5.rq
new file mode 100644
index 000000000..9dbb5f174
--- /dev/null
+++ b/tests/fts/fts3aa-5.rq
@@ -0,0 +1 @@
+SELECT ?o WHERE { ?o fts:match "\"three five\"" } order by ?o
diff --git a/tests/fts/fts3aa-6.out b/tests/fts/fts3aa-6.out
new file mode 100644
index 000000000..2e57c7ed9
--- /dev/null
+++ b/tests/fts/fts3aa-6.out
@@ -0,0 +1,2 @@
+"http://www.example.org/test#15"
+"http://www.example.org/test#31"
diff --git a/tests/fts/fts3aa-6.rq b/tests/fts/fts3aa-6.rq
new file mode 100644
index 000000000..3482fe180
--- /dev/null
+++ b/tests/fts/fts3aa-6.rq
@@ -0,0 +1 @@
+SELECT ?o WHERE { ?o fts:match " \"two three\" four one" } order by ?o
diff --git a/tests/fts/fts3aa-7.out b/tests/fts/fts3aa-7.out
new file mode 100644
index 000000000..a082546ee
--- /dev/null
+++ b/tests/fts/fts3aa-7.out
@@ -0,0 +1,8 @@
+"http://www.example.org/test#10"
+"http://www.example.org/test#11"
+"http://www.example.org/test#14"
+"http://www.example.org/test#15"
+"http://www.example.org/test#26"
+"http://www.example.org/test#27"
+"http://www.example.org/test#30"
+"http://www.example.org/test#31"
diff --git a/tests/fts/fts3aa-7.rq b/tests/fts/fts3aa-7.rq
new file mode 100644
index 000000000..46aab7bda
--- /dev/null
+++ b/tests/fts/fts3aa-7.rq
@@ -0,0 +1,2 @@
+# Match contains an unfinished quote
+SELECT ?o WHERE { ?o fts:match "four \"two" } order by ?o
diff --git a/tests/fts/fts3aa-8.out b/tests/fts/fts3aa-8.out
new file mode 100644
index 000000000..9de74cce2
--- /dev/null
+++ b/tests/fts/fts3aa-8.out
@@ -0,0 +1,4 @@
+"http://www.example.org/test#10"
+"http://www.example.org/test#11"
+"http://www.example.org/test#26"
+"http://www.example.org/test#27"
diff --git a/tests/fts/fts3aa-8.rq b/tests/fts/fts3aa-8.rq
new file mode 100644
index 000000000..0874c737c
--- /dev/null
+++ b/tests/fts/fts3aa-8.rq
@@ -0,0 +1,2 @@
+# Match contains an unfinished quote
+SELECT ?o WHERE { ?o fts:match " \"two four " } order by ?o
diff --git a/tests/fts/fts3aa-9.out b/tests/fts/fts3aa-9.out
new file mode 100644
index 000000000..feaf7fc17
--- /dev/null
+++ b/tests/fts/fts3aa-9.out
@@ -0,0 +1 @@
+"http://www.example.org/test#31"
diff --git a/tests/fts/fts3aa-9.rq b/tests/fts/fts3aa-9.rq
new file mode 100644
index 000000000..72e1c98ed
--- /dev/null
+++ b/tests/fts/fts3aa-9.rq
@@ -0,0 +1 @@
+SELECT ?o WHERE { ?o fts:match "\"four five\" three \"one two\"" } order by ?o
diff --git a/tests/fts/tracker-fts-test.c b/tests/fts/tracker-fts-test.c
index b05da1aee..fd2308c4b 100644
--- a/tests/fts/tracker-fts-test.c
+++ b/tests/fts/tracker-fts-test.c
@@ -33,7 +33,7 @@ struct _TestInfo {
};
const TestInfo tests[] = {
- { "fts3aa", 3 },
+ { "fts3aa", 9 },
{ "fts3ae", 1 },
{ "consistency/partial-update", 2 },
{ "consistency/insert-or-replace", 2 },