summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2022-05-09 13:05:52 +0000
committerSam Thursfield <sam@afuera.me.uk>2022-05-09 13:05:52 +0000
commit863a4da86814c7bf10b2ec00520fb4eea521e6fa (patch)
tree01573e3d5c5ddf15790ef81135f0b59c5ed95fa0 /tests
parent399ca329109ef92167b60154a8231e5eda83e700 (diff)
parent460e694dcfefbb94f028fa01861c817e0362aa15 (diff)
downloadtracker-863a4da86814c7bf10b2ec00520fb4eea521e6fa.tar.gz
Merge branch 'wip/carlosg/fts-consistence-fixes' into 'master'
libtracker-sparql: Fix handling of partial FTS deletion Closes #361 See merge request GNOME/tracker!510
Diffstat (limited to 'tests')
-rw-r--r--tests/fts/consistency/insert-or-replace-1.out1
-rw-r--r--tests/fts/consistency/insert-or-replace-1.rq1
-rw-r--r--tests/fts/consistency/insert-or-replace-2.out0
-rw-r--r--tests/fts/consistency/insert-or-replace-2.rq1
-rw-r--r--tests/fts/consistency/insert-or-replace-data.rq7
-rw-r--r--tests/fts/consistency/partial-update-1.out0
-rw-r--r--tests/fts/consistency/partial-update-1.rq1
-rw-r--r--tests/fts/consistency/partial-update-2.out1
-rw-r--r--tests/fts/consistency/partial-update-2.rq1
-rw-r--r--tests/fts/consistency/partial-update-data.rq11
-rw-r--r--tests/fts/tracker-fts-test.c2
11 files changed, 26 insertions, 0 deletions
diff --git a/tests/fts/consistency/insert-or-replace-1.out b/tests/fts/consistency/insert-or-replace-1.out
new file mode 100644
index 000000000..db6765d23
--- /dev/null
+++ b/tests/fts/consistency/insert-or-replace-1.out
@@ -0,0 +1 @@
+"http://www.example.org/test#1"
diff --git a/tests/fts/consistency/insert-or-replace-1.rq b/tests/fts/consistency/insert-or-replace-1.rq
new file mode 100644
index 000000000..794ae3ea4
--- /dev/null
+++ b/tests/fts/consistency/insert-or-replace-1.rq
@@ -0,0 +1 @@
+SELECT ?u { ?u fts:match 'two' }
diff --git a/tests/fts/consistency/insert-or-replace-2.out b/tests/fts/consistency/insert-or-replace-2.out
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/fts/consistency/insert-or-replace-2.out
diff --git a/tests/fts/consistency/insert-or-replace-2.rq b/tests/fts/consistency/insert-or-replace-2.rq
new file mode 100644
index 000000000..8223fa858
--- /dev/null
+++ b/tests/fts/consistency/insert-or-replace-2.rq
@@ -0,0 +1 @@
+SELECT ?u { ?u fts:match 'one' }
diff --git a/tests/fts/consistency/insert-or-replace-data.rq b/tests/fts/consistency/insert-or-replace-data.rq
new file mode 100644
index 000000000..3101faf81
--- /dev/null
+++ b/tests/fts/consistency/insert-or-replace-data.rq
@@ -0,0 +1,7 @@
+INSERT OR REPLACE {
+ test:1 a test:A ; test:p "one" .
+};
+
+INSERT OR REPLACE {
+ test:1 a test:A ; test:p "two" .
+};
diff --git a/tests/fts/consistency/partial-update-1.out b/tests/fts/consistency/partial-update-1.out
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/fts/consistency/partial-update-1.out
diff --git a/tests/fts/consistency/partial-update-1.rq b/tests/fts/consistency/partial-update-1.rq
new file mode 100644
index 000000000..66b5311dd
--- /dev/null
+++ b/tests/fts/consistency/partial-update-1.rq
@@ -0,0 +1 @@
+SELECT ?u { ?u fts:match "two" }
diff --git a/tests/fts/consistency/partial-update-2.out b/tests/fts/consistency/partial-update-2.out
new file mode 100644
index 000000000..db6765d23
--- /dev/null
+++ b/tests/fts/consistency/partial-update-2.out
@@ -0,0 +1 @@
+"http://www.example.org/test#1"
diff --git a/tests/fts/consistency/partial-update-2.rq b/tests/fts/consistency/partial-update-2.rq
new file mode 100644
index 000000000..6e4c74daa
--- /dev/null
+++ b/tests/fts/consistency/partial-update-2.rq
@@ -0,0 +1 @@
+select ?u { ?u fts:match 'three' }
diff --git a/tests/fts/consistency/partial-update-data.rq b/tests/fts/consistency/partial-update-data.rq
new file mode 100644
index 000000000..25b172a9e
--- /dev/null
+++ b/tests/fts/consistency/partial-update-data.rq
@@ -0,0 +1,11 @@
+INSERT DATA {
+ test:1 a test:A ; test:p "one" ; test:q "two" .
+};
+
+DELETE DATA {
+ test:1 test:q "two" .
+}
+
+INSERT DATA {
+ test:1 test:q "three" .
+};
diff --git a/tests/fts/tracker-fts-test.c b/tests/fts/tracker-fts-test.c
index baffbc3b4..b05da1aee 100644
--- a/tests/fts/tracker-fts-test.c
+++ b/tests/fts/tracker-fts-test.c
@@ -35,6 +35,8 @@ struct _TestInfo {
const TestInfo tests[] = {
{ "fts3aa", 3 },
{ "fts3ae", 1 },
+ { "consistency/partial-update", 2 },
+ { "consistency/insert-or-replace", 2 },
{ "prefix/fts3prefix", 3 },
{ "limits/fts3limits", 4 },
{ "input/fts3input", 3 },