[tracker] libtracker-data: Add basic/base-prefix-3 test



commit 24ef9b558adf833871392aebee3bc8a4c41dfc37
Author: Jürg Billeter <j bitron ch>
Date:   Thu Mar 18 14:42:44 2010 +0100

    libtracker-data: Add basic/base-prefix-3 test

 configure.ac                                  |    1 +
 tests/libtracker-data/Makefile.am             |    1 +
 tests/libtracker-data/basic/Makefile.am       |    8 ++++++
 tests/libtracker-data/basic/base-prefix-3.out |    1 +
 tests/libtracker-data/basic/base-prefix-3.rq  |    4 +++
 tests/libtracker-data/basic/data-1.ontology   |   34 +++++++++++++++++++++++++
 tests/libtracker-data/basic/data-1.ttl        |   10 +++++++
 tests/libtracker-data/tracker-sparql-test.c   |    1 +
 8 files changed, 60 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4ea52d8..37484e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1668,6 +1668,7 @@ AC_CONFIG_FILES([
 	tests/libtracker-data/aggregates/Makefile
 	tests/libtracker-data/algebra/Makefile
 	tests/libtracker-data/anon/Makefile
+	tests/libtracker-data/basic/Makefile
 	tests/libtracker-data/bnode-coreference/Makefile
 	tests/libtracker-data/bound/Makefile
 	tests/libtracker-data/datetime/Makefile
diff --git a/tests/libtracker-data/Makefile.am b/tests/libtracker-data/Makefile.am
index f8b7355..c513471 100644
--- a/tests/libtracker-data/Makefile.am
+++ b/tests/libtracker-data/Makefile.am
@@ -4,6 +4,7 @@ SUBDIRS = 			\
 	aggregates		\
 	algebra			\
 	anon			\
+	basic			\
 	bnode-coreference	\
 	bound 			\
 	datetime		\
diff --git a/tests/libtracker-data/basic/Makefile.am b/tests/libtracker-data/basic/Makefile.am
new file mode 100644
index 0000000..bf3b5bd
--- /dev/null
+++ b/tests/libtracker-data/basic/Makefile.am
@@ -0,0 +1,8 @@
+include $(top_srcdir)/Makefile.decl
+
+EXTRA_DIST = 	 	\
+	base-prefix-3.out	\
+	base-prefix-3.rq	\
+	data-1.ontology	\
+	data-1.ttl
+
diff --git a/tests/libtracker-data/basic/base-prefix-3.out b/tests/libtracker-data/basic/base-prefix-3.out
new file mode 100755
index 0000000..9782c57
--- /dev/null
+++ b/tests/libtracker-data/basic/base-prefix-3.out
@@ -0,0 +1 @@
+"d:x ns:p"
diff --git a/tests/libtracker-data/basic/base-prefix-3.rq b/tests/libtracker-data/basic/base-prefix-3.rq
new file mode 100755
index 0000000..67ea109
--- /dev/null
+++ b/tests/libtracker-data/basic/base-prefix-3.rq
@@ -0,0 +1,4 @@
+PREFIX ns: <http://example.org/ns#>
+PREFIX x:  <http://example.org/x/>
+
+SELECT * WHERE { x:x ns:p ?v }
diff --git a/tests/libtracker-data/basic/data-1.ontology b/tests/libtracker-data/basic/data-1.ontology
new file mode 100644
index 0000000..47752d6
--- /dev/null
+++ b/tests/libtracker-data/basic/data-1.ontology
@@ -0,0 +1,34 @@
+ prefix ns: <http://example.org/ns#> .
+ 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 x:  <http://example.org/x/> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+ prefix z:  <http://example.org/x/#> .
+
+ns: a tracker:Namespace ;
+	tracker:prefix "ns" .
+
+x: a tracker:Namespace ;
+	tracker:prefix "x" .
+
+z: a tracker:Namespace ;
+	tracker:prefix "z" .
+
+x:A a rdfs:Class ;
+	rdfs:subClassOf rdfs:Resource .
+
+z:A a rdfs:Class ;
+	rdfs:subClassOf rdfs:Resource .
+
+ns:p a rdf:Property ;
+	rdfs:domain x:A ;
+	rdfs:range xsd:string .
+
+x:p a rdf:Property ;
+	rdfs:domain x:A ;
+	rdfs:range xsd:string .
+
+z:p a rdf:Property ;
+	rdfs:domain z:A ;
+	rdfs:range xsd:string .
diff --git a/tests/libtracker-data/basic/data-1.ttl b/tests/libtracker-data/basic/data-1.ttl
new file mode 100755
index 0000000..8a4c14f
--- /dev/null
+++ b/tests/libtracker-data/basic/data-1.ttl
@@ -0,0 +1,10 @@
+ prefix ns: <http://example.org/ns#> .
+ prefix x:  <http://example.org/x/> .
+ prefix z:  <http://example.org/x/#> .
+
+x:x a x:A .
+x:x ns:p  "d:x ns:p" .
+x:x x:p   "x:x x:p" .
+
+z:x a z:A .
+z:x z:p   "z:x z:p" .
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index b04405d..60d2b58 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -55,6 +55,7 @@ const TestInfo tests[] = {
 	{ "algebra/filter-scope-1", "algebra/data-2", FALSE },
 	{ "algebra/var-scope-join-1", "algebra/var-scope-join-1", FALSE },
 	{ "anon/query", "anon/data", FALSE },
+	{ "basic/base-prefix-3", "basic/data-1", FALSE },
 	{ "bnode-coreference/query", "bnode-coreference/data", FALSE },
 	{ "bound/bound1", "bound/data", FALSE },
 	{ "datetime/delete-1", "datetime/data-3", FALSE },



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