[tracker/wip/carlosg/unrestricted-predicates: 2/2] tests: Add tests for negated property paths



commit f81286a82eedf9f2b869675b6f37805b4ac51e6d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jan 13 21:27:18 2019 +0100

    tests: Add tests for negated property paths

 tests/libtracker-data/property-paths/data.ttl           | 1 +
 tests/libtracker-data/property-paths/negated-path-1.out | 0
 tests/libtracker-data/property-paths/negated-path-1.rq  | 1 +
 tests/libtracker-data/property-paths/negated-path-2.out | 1 +
 tests/libtracker-data/property-paths/negated-path-2.rq  | 1 +
 tests/libtracker-data/property-paths/test.ontology      | 3 +++
 tests/libtracker-data/tracker-sparql-test.c             | 2 ++
 7 files changed, 9 insertions(+)
---
diff --git a/tests/libtracker-data/property-paths/data.ttl b/tests/libtracker-data/property-paths/data.ttl
index 5088a80d3..a13d7a27a 100644
--- a/tests/libtracker-data/property-paths/data.ttl
+++ b/tests/libtracker-data/property-paths/data.ttl
@@ -23,6 +23,7 @@ _:bob
 _:eve
     rdf:type      foaf:Person ;
     foaf:name     "Eve" ; 
+    foaf:aimChatID "Eve" ;
     foaf:knows    _:fred ;
     .
 
diff --git a/tests/libtracker-data/property-paths/negated-path-1.out 
b/tests/libtracker-data/property-paths/negated-path-1.out
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/libtracker-data/property-paths/negated-path-1.rq 
b/tests/libtracker-data/property-paths/negated-path-1.rq
new file mode 100644
index 000000000..d75ac4749
--- /dev/null
+++ b/tests/libtracker-data/property-paths/negated-path-1.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { ?u a foaf:Person . ?u !foaf:name "Alice" } order by foaf:name(?u)
diff --git a/tests/libtracker-data/property-paths/negated-path-2.out 
b/tests/libtracker-data/property-paths/negated-path-2.out
new file mode 100644
index 000000000..0686dec37
--- /dev/null
+++ b/tests/libtracker-data/property-paths/negated-path-2.out
@@ -0,0 +1 @@
+"Eve"
diff --git a/tests/libtracker-data/property-paths/negated-path-2.rq 
b/tests/libtracker-data/property-paths/negated-path-2.rq
new file mode 100644
index 000000000..fac0ee616
--- /dev/null
+++ b/tests/libtracker-data/property-paths/negated-path-2.rq
@@ -0,0 +1 @@
+select foaf:name(?u) { ?u !foaf:aimChatID "Eve" } order by foaf:name(?u)
diff --git a/tests/libtracker-data/property-paths/test.ontology 
b/tests/libtracker-data/property-paths/test.ontology
index de0a07b06..acc42d938 100644
--- a/tests/libtracker-data/property-paths/test.ontology
+++ b/tests/libtracker-data/property-paths/test.ontology
@@ -32,3 +32,6 @@ foaf:member a rdf:Property ;
        rdfs:domain foaf:Person ;
        rdfs:range foaf:Group .
 
+foaf:aimChatID a rdf:Property ;
+       rdfs:domain foaf:Agent ;
+       rdfs:range xsd:string .
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 2db5166ae..40ce29927 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -160,6 +160,8 @@ const TestInfo tests[] = {
        { "property-paths/recursive-path-2", "property-paths/data", FALSE },
        { "property-paths/alternative-path-1", "property-paths/data", FALSE },
        { "property-paths/alternative-path-2", "property-paths/data", FALSE },
+       { "property-paths/negated-path-1", "property-paths/data", FALSE },
+       { "property-paths/negated-path-2", "property-paths/data", FALSE },
        { "property-paths/mixed-inverse-and-sequence-1", "property-paths/data", FALSE },
        { "property-paths/mixed-inverse-and-sequence-2", "property-paths/data", FALSE },
        { "property-paths/mixed-inverse-and-sequence-3", "property-paths/data", FALSE },


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