[tracker] tests: Add unit test for Bugfix NB#172652
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tests: Add unit test for Bugfix NB#172652
- Date: Mon, 7 Jun 2010 16:13:58 +0000 (UTC)
commit d456c879aed43d92d7c0ea2b06d978280228e872
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Jun 7 19:12:10 2010 +0300
tests: Add unit test for Bugfix NB#172652
tests/libtracker-data/expr-ops/Makefile.am | 4 +++-
tests/libtracker-data/expr-ops/data.ontology | 3 +++
tests/libtracker-data/expr-ops/data.ttl | 5 +++++
tests/libtracker-data/expr-ops/query-res-1.out | 1 +
tests/libtracker-data/expr-ops/query-res-1.rq | 5 +++++
tests/libtracker-data/tracker-sparql-test.c | 1 +
6 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-data/expr-ops/Makefile.am b/tests/libtracker-data/expr-ops/Makefile.am
index 0f88b55..6395acd 100644
--- a/tests/libtracker-data/expr-ops/Makefile.am
+++ b/tests/libtracker-data/expr-ops/Makefile.am
@@ -16,4 +16,6 @@ EXTRA_DIST = \
query-unminus-1.out \
query-unminus-1.rq \
query-unplus-1.out \
- query-unplus-1.rq
+ query-unplus-1.rq \
+ query-res-1.rq \
+ query-res-1.out
diff --git a/tests/libtracker-data/expr-ops/data.ontology b/tests/libtracker-data/expr-ops/data.ontology
index 5f0401f..7a1e111 100644
--- a/tests/libtracker-data/expr-ops/data.ontology
+++ b/tests/libtracker-data/expr-ops/data.ontology
@@ -10,6 +10,9 @@ example: a tracker:Namespace ;
example:A a rdfs:Class ;
rdfs:subClassOf rdfs:Resource .
+example:B a rdfs:Class ;
+ rdfs:subClassOf rdfs:Resource .
+
example:p a rdf:Property ;
rdfs:domain example:A ;
rdfs:range xsd:integer .
diff --git a/tests/libtracker-data/expr-ops/data.ttl b/tests/libtracker-data/expr-ops/data.ttl
index 5429c77..b4e082d 100644
--- a/tests/libtracker-data/expr-ops/data.ttl
+++ b/tests/libtracker-data/expr-ops/data.ttl
@@ -10,3 +10,8 @@
:x2 :p "2"^^xsd:integer .
:x3 :p "3"^^xsd:integer .
:x4 :p "4"^^xsd:integer .
+
+<a> a :B .
+<b> a :B .
+<c> a :B .
+
diff --git a/tests/libtracker-data/expr-ops/query-res-1.out b/tests/libtracker-data/expr-ops/query-res-1.out
new file mode 100644
index 0000000..cdf1585
--- /dev/null
+++ b/tests/libtracker-data/expr-ops/query-res-1.out
@@ -0,0 +1 @@
+"c"
diff --git a/tests/libtracker-data/expr-ops/query-res-1.rq b/tests/libtracker-data/expr-ops/query-res-1.rq
new file mode 100755
index 0000000..b72ae86
--- /dev/null
+++ b/tests/libtracker-data/expr-ops/query-res-1.rq
@@ -0,0 +1,5 @@
+PREFIX : <http://example.org/>
+SELECT ?s WHERE {
+ ?s a :B .
+ FILTER((!(?s = <a> || ?s = <b>))) .
+}
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index af788b2..ed01199 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -75,6 +75,7 @@ const TestInfo tests[] = {
{ "expr-ops/query-plus-1", "expr-ops/data", FALSE },
{ "expr-ops/query-unminus-1", "expr-ops/data", FALSE },
{ "expr-ops/query-unplus-1", "expr-ops/data", FALSE },
+ { "expr-ops/query-res-1", "expr-ops/data", FALSE },
{ "functions/functions-property-1", "functions/data-1", FALSE },
{ "functions/functions-tracker-1", "functions/data-1", FALSE },
{ "functions/functions-tracker-2", "functions/data-2", FALSE },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]