[tracker/rss-enclosures] libtracker-data: Add test for triple block following simple optional
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libtracker-data: Add test for triple block following simple optional
- Date: Sat, 26 Jun 2010 23:29:26 +0000 (UTC)
commit 0cf572d0a717e801fbf3b4af5c50748a76c5c160
Author: Jürg Billeter <j bitron ch>
Date: Thu Jun 24 11:18:43 2010 +0200
libtracker-data: Add test for triple block following simple optional
tests/libtracker-data/optional/Makefile.am | 7 ++++-
.../optional/simple-optional-triple.ontology | 22 ++++++++++++++++++++
.../optional/simple-optional-triple.out | 1 +
.../optional/simple-optional-triple.rq | 7 ++++++
.../optional/simple-optional-triple.ttl | 5 ++++
tests/libtracker-data/tracker-sparql-test.c | 1 +
6 files changed, 41 insertions(+), 2 deletions(-)
---
diff --git a/tests/libtracker-data/optional/Makefile.am b/tests/libtracker-data/optional/Makefile.am
index 0f534fb..b9ef0cc 100644
--- a/tests/libtracker-data/optional/Makefile.am
+++ b/tests/libtracker-data/optional/Makefile.am
@@ -4,5 +4,8 @@ EXTRA_DIST = \
complex-data-1.ontology \
complex-data-1.ttl \
q-opt-complex-1.out \
- q-opt-complex-1.rq
-
+ q-opt-complex-1.rq \
+ simple-optional-triple.ontology \
+ simple-optional-triple.out \
+ simple-optional-triple.rq \
+ simple-optional-triple.ttl
diff --git a/tests/libtracker-data/optional/simple-optional-triple.ontology b/tests/libtracker-data/optional/simple-optional-triple.ontology
new file mode 100644
index 0000000..6ec57b5
--- /dev/null
+++ b/tests/libtracker-data/optional/simple-optional-triple.ontology
@@ -0,0 +1,22 @@
+ prefix example: <http://example.org/> .
+ prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
+ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+ prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+example: a tracker:Namespace ;
+ tracker:prefix "example" .
+
+example:A a rdfs:Class ;
+ rdfs:subClassOf rdfs:Resource .
+
+example:p a rdf:Property ;
+ rdfs:domain example:A ;
+ rdfs:range xsd:integer ;
+ nrl:maxCardinality 1 .
+
+example:q a rdf:Property ;
+ rdfs:domain example:A ;
+ rdfs:range xsd:integer ;
+ nrl:maxCardinality 1 .
diff --git a/tests/libtracker-data/optional/simple-optional-triple.out b/tests/libtracker-data/optional/simple-optional-triple.out
new file mode 100644
index 0000000..45542b6
--- /dev/null
+++ b/tests/libtracker-data/optional/simple-optional-triple.out
@@ -0,0 +1 @@
+"http://example.org/a" "42" "23"
diff --git a/tests/libtracker-data/optional/simple-optional-triple.rq b/tests/libtracker-data/optional/simple-optional-triple.rq
new file mode 100644
index 0000000..dad2841
--- /dev/null
+++ b/tests/libtracker-data/optional/simple-optional-triple.rq
@@ -0,0 +1,7 @@
+SELECT ?a ?p ?q
+WHERE
+{
+ ?a a example:A
+ OPTIONAL { ?a example:p ?p }
+ ?a example:q ?q
+}
diff --git a/tests/libtracker-data/optional/simple-optional-triple.ttl b/tests/libtracker-data/optional/simple-optional-triple.ttl
new file mode 100644
index 0000000..d5345ee
--- /dev/null
+++ b/tests/libtracker-data/optional/simple-optional-triple.ttl
@@ -0,0 +1,5 @@
+ prefix example: <http://example.org/> .
+
+example:a a example:A;
+ example:p 42;
+ example:q 23.
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index e4619a3..fa7bd96 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -92,6 +92,7 @@ const TestInfo tests[] = {
{ "graph/graph-3", "graph/data-3", FALSE },
{ "graph/graph-4", "graph/data-3", FALSE },
{ "optional/q-opt-complex-1", "optional/complex-data-1", FALSE },
+ { "optional/simple-optional-triple", "optional/simple-optional-triple", FALSE },
{ "regex/regex-query-001", "regex/regex-data-01", FALSE },
{ "regex/regex-query-002", "regex/regex-data-01", FALSE },
{ "sort/query-sort-1", "sort/data-sort-1", FALSE },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]