[tracker] SPARQL: Test GRAPH template followed by DOT



commit 2653017648eb2af20d00d3212154d9f663a2aaa3
Author: Jürg Billeter <j bitron ch>
Date:   Mon Apr 11 11:33:17 2011 +0200

    SPARQL: Test GRAPH template followed by DOT

 tests/libtracker-data/graph/Makefile.am     |    2 ++
 tests/libtracker-data/graph/data-4.ontology |   23 +++++++++++++++++++++++
 tests/libtracker-data/graph/data-4.rq       |    8 ++++++++
 tests/libtracker-data/tracker-sparql-test.c |    1 +
 4 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/tests/libtracker-data/graph/Makefile.am b/tests/libtracker-data/graph/Makefile.am
index 0117dcb..154c675 100644
--- a/tests/libtracker-data/graph/Makefile.am
+++ b/tests/libtracker-data/graph/Makefile.am
@@ -7,6 +7,8 @@ EXTRA_DIST =                                           \
 	data-2.rq                                      \
 	data-3.ontology                                \
 	data-3.rq                                      \
+	data-4.ontology                                \
+	data-4.rq                                      \
 	graph-1.out                                    \
 	graph-1.rq                                     \
 	graph-2.out                                    \
diff --git a/tests/libtracker-data/graph/data-4.ontology b/tests/libtracker-data/graph/data-4.ontology
new file mode 100644
index 0000000..2618b52
--- /dev/null
+++ b/tests/libtracker-data/graph/data-4.ontology
@@ -0,0 +1,23 @@
+ prefix example: <http://example/> .
+ 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:Graph a rdfs:Class ;
+	rdfs:subClassOf rdfs:Resource .
+
+example:A a rdfs:Class ;
+	rdfs:subClassOf rdfs:Resource .
+
+example:graphTitle a rdf:Property ;
+	rdfs:domain example:Graph ;
+	rdfs:range xsd:string .
+
+example:p a rdf:Property ;
+	rdfs:domain example:A ;
+	rdfs:range xsd:integer .
+
diff --git a/tests/libtracker-data/graph/data-4.rq b/tests/libtracker-data/graph/data-4.rq
new file mode 100644
index 0000000..e6e3939
--- /dev/null
+++ b/tests/libtracker-data/graph/data-4.rq
@@ -0,0 +1,8 @@
+INSERT {
+	GRAPH example:graphA {
+		example:resource a example:A ;
+			example:p 42
+	} .
+	example:graphA a example:Graph ;
+		example:graphTitle "Graph Foo" .
+}
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 23d67a7..ee5297a 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -101,6 +101,7 @@ const TestInfo tests[] = {
 	{ "graph/graph-2", "graph/data-2", FALSE },
 	{ "graph/graph-3", "graph/data-3", FALSE },
 	{ "graph/graph-4", "graph/data-3", FALSE },
+	{ "graph/graph-4", "graph/data-4", 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 },



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