[tracker/rss-enclosures] libtracker-data: Add test for GRAPH in predicate variable queries



commit 5e9fa97a8be3a7cf63f0405498c062bceac46c82
Author: Jürg Billeter <j bitron ch>
Date:   Wed Jun 9 17:10:14 2010 +0200

    libtracker-data: Add test for GRAPH in predicate variable queries

 tests/libtracker-data/graph/Makefile.am     |    4 +++-
 tests/libtracker-data/graph/graph-4.out     |    3 +++
 tests/libtracker-data/graph/graph-4.rq      |    5 +++++
 tests/libtracker-data/tracker-sparql-test.c |    1 +
 4 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-data/graph/Makefile.am b/tests/libtracker-data/graph/Makefile.am
index 6486af9..453a5ca 100644
--- a/tests/libtracker-data/graph/Makefile.am
+++ b/tests/libtracker-data/graph/Makefile.am
@@ -12,4 +12,6 @@ EXTRA_DIST = 		\
 	graph-2.out	\
 	graph-2.rq	\
 	graph-3.out	\
-	graph-3.rq
+	graph-3.rq	\
+	graph-4.out	\
+	graph-4.rq
diff --git a/tests/libtracker-data/graph/graph-4.out b/tests/libtracker-data/graph/graph-4.out
new file mode 100644
index 0000000..27656c6
--- /dev/null
+++ b/tests/libtracker-data/graph/graph-4.out
@@ -0,0 +1,3 @@
+"http://example/graphA";	"http://example/p";	"42"
+"http://example/graphA";	"http://www.w3.org/1999/02/22-rdf-syntax-ns#type";	"http://example/A";
+"http://example/graphA";	"http://www.w3.org/1999/02/22-rdf-syntax-ns#type";	"http://www.w3.org/2000/01/rdf-schema#Resource";
diff --git a/tests/libtracker-data/graph/graph-4.rq b/tests/libtracker-data/graph/graph-4.rq
new file mode 100644
index 0000000..6e72488
--- /dev/null
+++ b/tests/libtracker-data/graph/graph-4.rq
@@ -0,0 +1,5 @@
+SELECT ?g ?p ?v WHERE {
+	GRAPH ?g {
+		example:resource ?p ?v
+	}
+} ORDER BY ?g ?p ?v
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 3e2d409..7fa0557 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -90,6 +90,7 @@ const TestInfo tests[] = {
 	{ "graph/graph-1", "graph/data-1", FALSE },
 	{ "graph/graph-2", "graph/data-2", FALSE },
 	{ "graph/graph-3", "graph/data-3", FALSE },
+	{ "graph/graph-4", "graph/data-3", FALSE },
 	{ "optional/q-opt-complex-1", "optional/complex-data-1", FALSE },
 	{ "regex/regex-query-001", "regex/regex-data-01", FALSE },
 	{ "regex/regex-query-002", "regex/regex-data-01", FALSE },



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