[tracker/sparql-refactor: 9/16] libtracker-data: Add subquery union test
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sparql-refactor: 9/16] libtracker-data: Add subquery union test
- Date: Wed, 31 Mar 2010 12:45:01 +0000 (UTC)
commit baa3e44bc4ed842faa60e5cf189dde0642a95175
Author: Jürg Billeter <j bitron ch>
Date: Tue Mar 30 16:05:53 2010 +0200
libtracker-data: Add subquery union test
tests/libtracker-data/subqueries/Makefile.am | 12 +++++++-----
.../subqueries/subqueries-union-1.out | 7 +++++++
.../subqueries/subqueries-union-1.rq | 9 +++++++++
tests/libtracker-data/tracker-sparql-test.c | 1 +
4 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/tests/libtracker-data/subqueries/Makefile.am b/tests/libtracker-data/subqueries/Makefile.am
index 73eeb29..005717c 100644
--- a/tests/libtracker-data/subqueries/Makefile.am
+++ b/tests/libtracker-data/subqueries/Makefile.am
@@ -1,8 +1,10 @@
include $(top_srcdir)/Makefile.decl
-EXTRA_DIST = \
- data-1.ontology \
- data-1.ttl \
- subqueries-1.out \
- subqueries-1.rq
+EXTRA_DIST = \
+ data-1.ontology \
+ data-1.ttl \
+ subqueries-1.out \
+ subqueries-1.rq \
+ subqueries-union-1.out \
+ subqueries-union-1.rq
diff --git a/tests/libtracker-data/subqueries/subqueries-union-1.out b/tests/libtracker-data/subqueries/subqueries-union-1.out
new file mode 100644
index 0000000..a8d859d
--- /dev/null
+++ b/tests/libtracker-data/subqueries/subqueries-union-1.out
@@ -0,0 +1,7 @@
+"http://example.org/ns#group1" "group"
+"http://example.org/ns#group2" "group"
+"http://example.org/ns#msg1" "message"
+"http://example.org/ns#msg2" "message"
+"http://example.org/ns#msg3" "message"
+"http://example.org/ns#msg4" "message"
+"http://example.org/ns#msg5" "message"
diff --git a/tests/libtracker-data/subqueries/subqueries-union-1.rq b/tests/libtracker-data/subqueries/subqueries-union-1.rq
new file mode 100644
index 0000000..c3248b3
--- /dev/null
+++ b/tests/libtracker-data/subqueries/subqueries-union-1.rq
@@ -0,0 +1,9 @@
+SELECT ?s ?type WHERE {
+ {
+ SELECT ?s "message" AS ?type
+ WHERE { ?s a example:Message }
+ } UNION {
+ SELECT ?s "group" AS ?type
+ WHERE { ?s a example:Group }
+ }
+} ORDER BY ?s ?type
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index b8c0630..efd0cc6 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -89,6 +89,7 @@ const TestInfo tests[] = {
{ "sort/query-sort-4", "sort/data-sort-4", FALSE },
{ "sort/query-sort-5", "sort/data-sort-4", FALSE },
{ "subqueries/subqueries-1", "subqueries/data-1", FALSE },
+ { "subqueries/subqueries-union-1", "subqueries/data-1", FALSE },
/* Bracket error after WHERE */
{ "error/query-error-1", "error/query-error-1", TRUE },
/* Unknown property */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]