[tracker/sparql-refactor: 16/16] libtracker-data: Add ASK test
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sparql-refactor: 16/16] libtracker-data: Add ASK test
- Date: Wed, 31 Mar 2010 12:45:37 +0000 (UTC)
commit 8f65e91ce8e68f5ad32c3c1460669d01276c72ca
Author: Jürg Billeter <j bitron ch>
Date: Wed Mar 31 14:11:12 2010 +0200
libtracker-data: Add ASK test
configure.ac | 1 +
tests/libtracker-data/Makefile.am | 1 +
tests/libtracker-data/ask/Makefile.am | 7 +++++++
tests/libtracker-data/ask/ask-1.out | 1 +
tests/libtracker-data/ask/ask-1.rq | 3 +++
tests/libtracker-data/ask/data.ontology | 16 ++++++++++++++++
tests/libtracker-data/ask/data.ttl | 8 ++++++++
tests/libtracker-data/tracker-sparql-test.c | 1 +
8 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 677ce3e..7c466a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1704,6 +1704,7 @@ AC_CONFIG_FILES([
tests/libtracker-data/aggregates/Makefile
tests/libtracker-data/algebra/Makefile
tests/libtracker-data/anon/Makefile
+ tests/libtracker-data/ask/Makefile
tests/libtracker-data/basic/Makefile
tests/libtracker-data/bnode-coreference/Makefile
tests/libtracker-data/bound/Makefile
diff --git a/tests/libtracker-data/Makefile.am b/tests/libtracker-data/Makefile.am
index 524b00b..3c8c817 100644
--- a/tests/libtracker-data/Makefile.am
+++ b/tests/libtracker-data/Makefile.am
@@ -4,6 +4,7 @@ SUBDIRS = \
aggregates \
algebra \
anon \
+ ask \
basic \
bnode-coreference \
bound \
diff --git a/tests/libtracker-data/ask/Makefile.am b/tests/libtracker-data/ask/Makefile.am
new file mode 100644
index 0000000..38bce2b
--- /dev/null
+++ b/tests/libtracker-data/ask/Makefile.am
@@ -0,0 +1,7 @@
+include $(top_srcdir)/Makefile.decl
+
+EXTRA_DIST = \
+ ask-1.out \
+ ask-1.rq \
+ data-1.ontology \
+ data-1.ttl
diff --git a/tests/libtracker-data/ask/ask-1.out b/tests/libtracker-data/ask/ask-1.out
new file mode 100644
index 0000000..f27b76c
--- /dev/null
+++ b/tests/libtracker-data/ask/ask-1.out
@@ -0,0 +1 @@
+"1"
diff --git a/tests/libtracker-data/ask/ask-1.rq b/tests/libtracker-data/ask/ask-1.rq
new file mode 100644
index 0000000..25f63cb
--- /dev/null
+++ b/tests/libtracker-data/ask/ask-1.rq
@@ -0,0 +1,3 @@
+PREFIX : <http://example/>
+
+ASK { :x :p 1 }
diff --git a/tests/libtracker-data/ask/data.ontology b/tests/libtracker-data/ask/data.ontology
new file mode 100644
index 0000000..855efe7
--- /dev/null
+++ b/tests/libtracker-data/ask/data.ontology
@@ -0,0 +1,16 @@
+ 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/> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+x: a tracker:Namespace ;
+ tracker:prefix "x" .
+
+x:A a rdfs:Class ;
+ rdfs:subClassOf rdfs:Resource .
+
+x:p a rdf:Property ;
+ rdfs:domain x:A ;
+ rdfs:range xsd:integer .
+
diff --git a/tests/libtracker-data/ask/data.ttl b/tests/libtracker-data/ask/data.ttl
new file mode 100755
index 0000000..41a361c
--- /dev/null
+++ b/tests/libtracker-data/ask/data.ttl
@@ -0,0 +1,8 @@
+ prefix : <http://example/> .
+ prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+:x a :A .
+:x :p "1"^^xsd:integer .
+:x :p "2"^^xsd:integer .
+:x :p "3"^^xsd:integer .
+
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index e46bc44..81578c0 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 },
+ { "ask/ask-1", "ask/data", FALSE },
{ "basic/base-prefix-3", "basic/data-1", FALSE },
{ "basic/predicate-variable", "basic/data-1", FALSE },
{ "basic/predicate-variable-2", "basic/data-1", FALSE },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]