[tracker/harmattan-pre-signal-updates: 1378/1380] libtracker-data: Add test case for ORDER BY select variable



commit 34f718df9966e0986de30a39bbc306470f2fee3d
Author: Jürg Billeter <j bitron ch>
Date:   Wed Sep 22 16:42:18 2010 +0200

    libtracker-data: Add test case for ORDER BY select variable

 tests/libtracker-data/sort/Makefile.am      |    4 +++-
 tests/libtracker-data/sort/query-sort-7.out |    4 ++++
 tests/libtracker-data/sort/query-sort-7.rq  |    4 ++++
 tests/libtracker-data/tracker-sparql-test.c |    1 +
 4 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-data/sort/Makefile.am b/tests/libtracker-data/sort/Makefile.am
index e4cfc77..e35db6f 100644
--- a/tests/libtracker-data/sort/Makefile.am
+++ b/tests/libtracker-data/sort/Makefile.am
@@ -18,4 +18,6 @@ EXTRA_DIST = 			\
 	query-sort-5.out	\
 	query-sort-5.rq		\
 	query-sort-6.rq		\
-	query-sort-6.out
+	query-sort-6.out	\
+	query-sort-7.rq		\
+	query-sort-7.out
diff --git a/tests/libtracker-data/sort/query-sort-7.out b/tests/libtracker-data/sort/query-sort-7.out
new file mode 100644
index 0000000..a0dc772
--- /dev/null
+++ b/tests/libtracker-data/sort/query-sort-7.out
@@ -0,0 +1,4 @@
+"Alice"
+"Bob"
+"Eve"
+"Fred"
diff --git a/tests/libtracker-data/sort/query-sort-7.rq b/tests/libtracker-data/sort/query-sort-7.rq
new file mode 100644
index 0000000..f0c7d42
--- /dev/null
+++ b/tests/libtracker-data/sort/query-sort-7.rq
@@ -0,0 +1,4 @@
+PREFIX foaf:       <http://xmlns.com/foaf/0.1/>
+SELECT ?name AS ?namealias
+WHERE { ?x foaf:name ?name }
+ORDER BY ?namealias
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 3aea0a9..d84a6b6 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -105,6 +105,7 @@ const TestInfo tests[] = {
 	{ "sort/query-sort-4", "sort/data-sort-4", FALSE },
 	{ "sort/query-sort-5", "sort/data-sort-4", FALSE },
 	{ "sort/query-sort-6", "sort/data-sort-4", FALSE },
+	{ "sort/query-sort-7", "sort/data-sort-1", FALSE },
 	{ "subqueries/subqueries-1", "subqueries/data-1", FALSE },
 	{ "subqueries/subqueries-union-1", "subqueries/data-1", FALSE },
 	{ "subqueries/subqueries-union-2", "subqueries/data-1", FALSE },



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