[tracker/tracker-0.10] SPARQL: Test local time handling with optional patterns



commit 7db5a87750d1a7b9d3aba7da9d944de183e1010d
Author: Jürg Billeter <j bitron ch>
Date:   Mon May 9 16:07:01 2011 +0200

    SPARQL: Test local time handling with optional patterns

 tests/libtracker-data/datetime/Makefile.am         |    4 +++-
 .../datetime/functions-timezone-2.out              |    1 +
 .../datetime/functions-timezone-2.rq               |    6 ++++++
 tests/libtracker-data/tracker-sparql-test.c        |    1 +
 4 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-data/datetime/Makefile.am b/tests/libtracker-data/datetime/Makefile.am
index 1bb0d28..1516e7b 100644
--- a/tests/libtracker-data/datetime/Makefile.am
+++ b/tests/libtracker-data/datetime/Makefile.am
@@ -12,4 +12,6 @@ EXTRA_DIST =                                           \
 	functions-localtime-1.out                      \
 	functions-localtime-1.rq                       \
 	functions-timezone-1.out                       \
-	functions-timezone-1.rq
+	functions-timezone-1.rq                        \
+	functions-timezone-2.out                       \
+	functions-timezone-2.rq
diff --git a/tests/libtracker-data/datetime/functions-timezone-2.out b/tests/libtracker-data/datetime/functions-timezone-2.out
new file mode 100644
index 0000000..74e0347
--- /dev/null
+++ b/tests/libtracker-data/datetime/functions-timezone-2.out
@@ -0,0 +1 @@
+"7200"	
diff --git a/tests/libtracker-data/datetime/functions-timezone-2.rq b/tests/libtracker-data/datetime/functions-timezone-2.rq
new file mode 100644
index 0000000..d71a80d
--- /dev/null
+++ b/tests/libtracker-data/datetime/functions-timezone-2.rq
@@ -0,0 +1,6 @@
+SELECT fn:timezone-from-dateTime (?v) ?comment
+WHERE {
+	example:y a example:A ;
+	   example:p ?v
+        OPTIONAL { example:y rdfs:comment ?comment }
+}
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index ee5297a..e95f140 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -76,6 +76,7 @@ const TestInfo tests[] = {
 	{ "datetime/delete-1", "datetime/data-3", FALSE },
 	{ "datetime/functions-localtime-1", "datetime/data-1", FALSE },
 	{ "datetime/functions-timezone-1", "datetime/data-2", FALSE },
+	{ "datetime/functions-timezone-2", "datetime/data-2", FALSE },
 	{ "expr-ops/query-ge-1", "expr-ops/data", FALSE },
 	{ "expr-ops/query-le-1", "expr-ops/data", FALSE },
 	{ "expr-ops/query-minus-1", "expr-ops/data", FALSE },



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