[tracker/wip/carlosg/service-in-union-fix: 2/2] tests: Add another test for SERVICE being unioned with local data




commit 6397a9600a416f5c89beaf448aa36309fdc0d170
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Apr 16 00:24:43 2021 +0200

    tests: Add another test for SERVICE being unioned with local data
    
    This tests the other way around, to ensure we still match URNs as
    strings on both sides.

 .../service/service-union-with-local-3.out         |  2 ++
 .../service/service-union-with-local-3.rq          | 22 ++++++++++++++++++++++
 tests/libtracker-data/tracker-service-test.c       |  1 +
 3 files changed, 25 insertions(+)
---
diff --git a/tests/libtracker-data/service/service-union-with-local-3.out 
b/tests/libtracker-data/service/service-union-with-local-3.out
new file mode 100644
index 000000000..6eed860fd
--- /dev/null
+++ b/tests/libtracker-data/service/service-union-with-local-3.out
@@ -0,0 +1,2 @@
+"http://purl.org/dc/elements/1.1/";     "a"
+"http://tracker.api.gnome.org/ontology/v3/nao#hasTag";  "b"
diff --git a/tests/libtracker-data/service/service-union-with-local-3.rq 
b/tests/libtracker-data/service/service-union-with-local-3.rq
new file mode 100644
index 000000000..67eaf6293
--- /dev/null
+++ b/tests/libtracker-data/service/service-union-with-local-3.rq
@@ -0,0 +1,22 @@
+SELECT ?u ?s {
+  {
+    SELECT ?u ('a' AS ?s) {
+      ?u a rdfs:Resource
+    }
+    ORDER BY ?u
+    LIMIT 1
+  }
+  UNION
+  {
+    SELECT ?u ?s {
+      SERVICE <dbus:%s> {
+        SELECT ?u ('b' AS ?s) {
+          ?u nrl:indexed true
+        }
+        ORDER BY ?u
+        LIMIT 1
+      }
+      ?u a rdfs:Resource
+    }
+  }
+}
diff --git a/tests/libtracker-data/tracker-service-test.c b/tests/libtracker-data/tracker-service-test.c
index b0fb49615..d4ab48fe4 100644
--- a/tests/libtracker-data/tracker-service-test.c
+++ b/tests/libtracker-data/tracker-service-test.c
@@ -41,6 +41,7 @@ const TestInfo tests[] = {
        { "service/service-local-filter-1", FALSE },
        { "service/service-union-with-local-1", FALSE },
        { "service/service-union-with-local-2", FALSE },
+       { "service/service-union-with-local-3", FALSE },
        { "service/service-var-1", FALSE },
        { "service/service-var-2", FALSE },
        { "service/service-empty-1", FALSE },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]